I'm using Apache FOP to create a PDF file that renders an HTML page. This page contains charts generated using a JavaScript library (https://www.shieldui.com). I was able to perform HTML (-> FOP) -> PDF conversion, but the output PDF file does not display any charts, only text.
Am I missing any steps? Is there any way of including JavaScript libraries into FOP XSLT?
Related
Is there any way to convert PDF to HTML that can be edited?When a user uploads a PDF file, it can be converted into HTML, and some contents in it can be replaced.
Not without a third party library. Most likely you will have to save the PDF to the server, run the third party library against it, render the HTML.
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 have a php script to download some webpages. The problem is that the downloaded files haven't got the dynamic content which is written by javascript.
I suppose I need a javascript engine or something similar. Is there some php library or command-line program for downloading a webpage with all its dynamic content?
Example of what I need: I want to download the webpage www.example.com/product.html.
Now: I'm able to download the code:
<h1></h1>
What I want: I want to download the code:
<h1>Title written by javascript</h1>
This is happening because the JavaScript is not downloaded properly. You are only downloading the HTML file and not the attached JavaScript files.
Once the JavaScript will be available for the HTML page, all the dynamic content would be coming correctly.
Another Workaround:
You can use selenium like web automation libraries that actually opens the page in a browser, let the browser execute the js and prepare the DOM. After this you can download the HTML content.
One more:
You can make use of PhantomJs to download the HTML page, process the Javascript and give you the final output for save.
https://superuser.com/questions/448514/command-line-browser-with-js-support
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...:)
I'm using graphviz to generate a client side imagemap, which generates both the image file and a text file containing the map HTML code. Is there anyway I can dynamically read this file and write this map information onto the HTML page when it loads?
You can use a server side scripting language for this purpose.