Web page to PDF conversion

Hi there!

I was wondering if there was a method of converting web content to a PDF file within workflow. I have a requirement where i’m using javascript to produce content that does not seem possible within a print context, but can be done in the web context. I would now like to convert this content to a PDF for easy printing and font embedding capability.

Any hints would be appreciated! Thank you.

Hi wallj,

welcome to the forum. I think there is no perfect and easy way to do that. You can try to load the html file within a iframe.

Create a new script in Connect Designer, use body as selector and use a code like the following:

results.html('<iframe style="width:100%; height:100%;" scrolling="no" frameborder="0" src="file:///C:/yourPath/website.html"></iframe>');

This is far from a clean solution but an idea. Maybe someone else has a better idea (hope so).

Hi Thomas, thanks for the idea.

I neglected to mention that the javascript i am running is client side and embedded in the html file. It is run by the browser to generate the result. Therefore using that method of inserting the file into iframe in a print context will produce a result where the javascript does not get executed, and therefore the page will not look the way it’s required to (I’m just trying to make some text run along a curve dynamically).

So my thinking was I’d like to create a PDF from the result of the page after the shifting of the text to the curve has taken place, If that is possible.

I did try the iframe method, and sadly it did not work in my case, although it was worth a try, thank you.