New templated report: Save to PDF

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

New templated report: Save to PDF

Post by htuser »

Dear CSPro Developer Team,
I'm thinking to save lots of questionnaire reports to PDF. It's because i would like to know:
a) Does the new document object support PDF?
b) Does the new report.save can save to a PDF format?

If both are no, please can you advise a way for doing it using HTML Canvas and Jspdf?
I find lot of way to do it manually and it will be downloaded in the browser.
https://stackoverflow.com/questions/689 ... -or-jquery
https://stackoverflow.com/questions/172 ... javascript

But what i need it to save them in PDF in a specific folder using a forcase loop. Something like:
forcase QUESTIONNAIRE_DICT do
       
QUESTIONNAIRE_REPORT.save (maketext("%d.pdf", QUESTIONNAIRE_ID));
    endfor;
   
In the future when we can run Javascript in CSPro logic in a new Cspro function RunScript by wrapping
https://docs.microsoft.com/en-us/micros ... javascript
https://developer.android.com/guide/web ... JavaScript
https://pretagteam.com/question/call-ja ... id-webview
this will greater facilitate lots of user defined improvements.

Thanks in advance for your help and support!
G.VOLNY, a CSProuser from Haiti, since 2004
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: New templated report: Save to PDF

Post by Gregory Martin »

If you're doing this on Windows, you could save the report as HTML and then convert it to PDF using software like this:

https://wkhtmltopdf.org/

You could launch the conversion using execsystem or SystemApp. We use that software to create the PDF versions of the CSPro helps.
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: New templated report: Save to PDF

Post by htuser »

Thanks Greg. This will solve my request.
G.VOLNY, a CSProuser from Haiti, since 2004
Post Reply