Page 1 of 1
PDF Writer
Posted: Wed Dec 02, 2020 3:43 am
by stevek2
Hi all
Can someone recommend an easy to integrate (and robust) PDF writer (using ActiveX or .net)
We have been using a product called novaPDF writer and while easy enough it has constant issues and latest version does not integrate well with Jade
Regards
Stevek
Re: PDF Writer
Posted: Wed Dec 02, 2020 10:30 am
by BeeJay
Hi Steve,
I've recently been testing using the Microsoft Print to PDF printer driver, which seems to be available on all recent Windows releases.
So far I've yet to hit any problems with sending JADE reports to this printer using app.printer.print( <frame> ) etc.
If you use app.printer.setPrintFileName( <filename> ) prior to starting your printing, then it also suppresses the 'file save' dialog.
Hope that helps.
Cheers,
BeeJay.
Any thoughts expressed are my own and in no way reflect the views of my employer. If this reply includes any sample code, I believe that this sample code is accurate and reliable and has been prepared with care but give no guarantee that the sample code will be free of defects or errors. No responsibility or liability, financial or otherwise, is accepted for any consequences arising out of the use of any sample code including loss of profits, indirect, special or consequential losses or damages.
Re: PDF Writer
Posted: Wed Dec 02, 2020 10:51 am
by Stokes
Thanks for that BeeJay, if that works that would be amazing to get rid of our third party pdf software. Hopefully will get a chance to check this over the Christmas period when things are a bit quieter
Re: PDF Writer
Posted: Wed Dec 02, 2020 2:11 pm
by mjagers
We have moved to the Microsoft Print to PDF as well and have moved off a 3rd party PDF convertor.
To-date we've had no problems with the Microsoft Print to PDF driver.
regards
Martin Jagers
Re: PDF Writer
Posted: Thu Dec 03, 2020 3:21 am
by stevek2
Thanks Beejay
I will start playing with this option straight away and hopefully this will solve my problems
I intended to use the print to file option as all our PDFs end up as attachments to emails anyway
Much appreciated
steve
Re: PDF Writer
Posted: Thu Dec 03, 2020 4:54 am
by stevek2
Hi Beejay
Your solution worked a treat and is significantly easier over virtually every other third-party PDF writer
One question, I am trying to create the PDF output (via Jade printer output) but want to specify the default folder to be used
(without having to use the default Windows printer dialog)
When using app.printer.setFileName, Jade documentation indicates that the default folder is used (e.g. x:\Jade\bin) and only when the FILE: option is used do I get the dialog to change the folder location.
Is there another way that jade provides either
app.printer.setFolderName or (similar) OR
via the Jade ini file (e.g. section [JadePrinting])
Regards
Steve
Re: PDF Writer
Posted: Thu Dec 03, 2020 8:08 am
by BeeJay
Hi Steve,
For my printing I provide a fully qualified filename such as the following sample code. For this code, I have the defaultFolder and the fileName in suitably named strings already. For this example, I'm assuming the defaultFolder string has a trailing '\' or '/' folder separator already appended to the string:
Code: Select all
app.printer.setPrintFileName( defaultFolder & fileName );
Cheers,
BeeJay.
Any thoughts expressed are my own and in no way reflect the views of my employer. If this reply includes any sample code, I believe that this sample code is accurate and reliable and has been prepared with care but give no guarantee that the sample code will be free of defects or errors. No responsibility or liability, financial or otherwise, is accepted for any consequences arising out of the use of any sample code including loss of profits, indirect, special or consequential losses or damages.
Re: PDF Writer
Posted: Thu Dec 03, 2020 9:25 pm
by stevek2
Thanks Beejay
I had tried that option earlier but obviously missed something
Using fully qualified filename does the trick
Cheers
Steve
Re: PDF Writer
Posted: Mon Jan 11, 2021 10:53 am
by Stokes
I just realised that this won't work for us because we generate HTML and turn that into the PDF. It will work for any standard Jade Print Form but most of our PDFs are HTML so clients can easily create/adjust them when required