I am using jspdf to generate pdf. I am using that library to generate pdf in my ionic app which generates somekind of report and the file plugin, mail plugin are used to create file and attach to email app and this is pretty cool and easy there.
But i am migrating this to web user. I can also generate the pdf in the browser and can be saved to user pc.Is there handy method that i can attach generated pdf instantly to the form ?(I think mailto: cannot be used to attach the file so i want to use form to send the pdf file to server).
And last question, i can send the base64 data to php server.Is there any method that base64 can be converted to pdf in php? (i am not much familiar with the php)
Related
I am working on a in-website document editor(word and excel document). So far I am able to edit ODT files using WEBODF. Is there any way to convert DOCX file to ODT using javascript so that i can use the file in the editor? any alternatives for editing word and excel documents inside a website? I have tried saving the file in OneDrive and then using the share link to open editing on sharepoint but this editor cannot be inserted inside an website and can only be done in a new tab? i need the editor inside the website as i need to implement azure versioning of the documents
WebODF is an awesome tool to be used as an online editor. Assuming you have no restrictions implementing a separate backend server, you can use libreoffice, which gives you a command line utility to exactly perform that job. You can convert docx file to odt file using the following command -
soffice --headless --convert-to odt <input file>.docx
The approach would be to create an API
Which would take docx file as input
Store that file temporarily somewhere and run the above command
Serve the converted odt file and delete the temporary files.
If you want to store those files in the server, then you can maintain a database to achieve that as well.
To take care of restricted cross origin policy, you can implement AJAX calls in the front-end to perform file uploading and viewing operations using Javascript blobs.
We have one requirement where we need to generate HTML to PDF and store it on document Library.
So far we are able to generate the HTML to PDF but not able to store it in SharePoint Document Library.
Note: we are using kendo plugin for PDF conversion, Kendo giving SaveAs option to save the PDF locally, our requirement to store the PDF in SharePoint Environment.
Code Snipped:
kendo.drawing.pdf.saveAs(“PDFName”)
If anyone did similar requirement in past Please revert back to me.
We are Interested to achieve the solution with Client side programming. MS flow is not in scope as of now.
You could upload the file to sharepoint library via rest api:
create a file and add it to a folder.
And below is a sample:
How to Upload File in Document Library in SharePoint Using REST API & jQuery
I am aware that it's possible to generate an ICS file and prompt the user to download it via javascript:
https://github.com/nwcell/ics.js
And it is possible to set up a webcal url that points to an ICS file hosted on the internet, such as:
webcal://ical.mac.com/ical/US32Holidays.ics
But is it possible, without server-side intervention, to give the user a webcal url that uses the dynamically generated ICS? I would like to generate a dynamic calendar event in my front-end javascript application and would ideally not involve a backend in the process.
I have to integrate pdf files in my PHP web application such that the viewer of the file can not save/download/print the pdf file.
I am finding a way of doing this in any way like using javascript, jquery or straight in PHP or any other way if any.
I think you'd need a custom PDF viewer in your app, like what Google Drive does with images and documents.
I'm not aware of any functionality that allows an app to tell Chrome/Firefox or the registered PDF handler to limit user interaction like you mention.
How to disable pdf download using jquery or javascript.
In my website I am loading some pdf files in iframe. I need to protect my files.
So how can I dissable pdf file download, print those kind of options.
Please help me.
My website created using html. jquery, mysql and php
Since you are delivering pdf file directly into the browser, displayed using Adobe Reader ActiveX, how can it be possible to prevent file download, since the files are displayed after downloaded into your temp directory?
So it is not possible using ANY JavaScript library.
The only way to secure your master PDF files is by creating Images for each page and present those to the user on the web via your own interface (html, flash etc).
You may use ImageMagick along with GhostScript for this.
You may go through www.veryinteractivepeople.com/?p=521
Hope this helps...:)