I know I can print a web URL (rendered though a fetch request to html) to PDF from the app.
I know I can print an HTML stored on a cloud task.
But how can I read the contents of a local HTML in app JS, so that I can print 2 PDF?
If you can upload the HTML to your Assets folder in OXIDE, then you can make use of the HTML component and the JourneyApps iFrame Client in your app to print that HTML to a PDF.
Hi Jamie. The html is in the asset folder. Can you maybe provide the js code to print it. I tried printing the html component (populated by the asset file) but all that printed was a blank file with the text string URL ref. i.e. “/html/my_file.html”
@martin Generating an HTML / PDF document in app is only recommended if you need to do it offline, otherwise you should generate the HTML / PDF from CloudCode.
The reason for this is the process of dynamically generating HTML / PDF in app is more complicated in app than it is in CloudCode. To do it, you need to make use of our JourneyiFrameClient (aka HTML Bridge)
I will try to give you a sample as soon as I can, but for now please check this post on how to use HTML Bridge and the Journey-iFrame-Client