Saving/printing Form as PDF
- vegard.grutle
- Posts: 59
- Joined: Fri Mar 17, 2017
Hi!
Is there a way to use one of these functions to save/print PDF with a dynamic name.
I have a SLT field called "Transmittal ID" (TransmittalID) wich holds the name of the PDF i would like save/print.
Thanks in advance!
Vegard
Is there a way to use one of these functions
Code: Select all
fd.saveAsPDF()
Code: Select all
fd.printForm()
I have a SLT field called "Transmittal ID" (TransmittalID) wich holds the name of the PDF i would like save/print.
Thanks in advance!
Vegard
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Vegard,
If you want to save PDF file with a specific name, please, put the name inside like this:
In your case, it would be something like this:
Print code only prints the form in the browser, it has nothing to do with saving as PDF.
If you want to save PDF file with a specific name, please, put the name inside like this:
Code: Select all
fd.saveAsPDF("invoice.pdf")
Code: Select all
fd.saveAsPDF(fd.field("TransmittalID").value() + ".pdf")
Cheers
- vegard.grutle
- Posts: 59
- Joined: Fri Mar 17, 2017
Thanks Nikita!
It work beautifull when slightly modifying it
Is it possible to programmatically save this PDF in a nominated library with a on click function on a button? I have a library called "TransmittalCoverSheetLibrary" where i keep my PDFs.
Thanks!
V
It work beautifull when slightly modifying it
Code: Select all
fd.saveAsPDF(fd.field("TransmittalID").value())
Thanks!
V
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Vegard,
Unfortunately, that's not possible with JS. You might be able to achieve similar result with our different products Workflow Action Pack or with Actions, using either Workflow or Flow. These products allow you to generate PDF file from template, using item's fields as data fill in the template.
Here's an example for Workflow Action Pack - https://plumsail.com/docs/workflow-acti ... plate.html
And here's an example for Actions - https://plumsail.com/docs/actions/v1.x/ ... plate.html
It might be easier to manually upload PDF files, though.
Unfortunately, that's not possible with JS. You might be able to achieve similar result with our different products Workflow Action Pack or with Actions, using either Workflow or Flow. These products allow you to generate PDF file from template, using item's fields as data fill in the template.
Here's an example for Workflow Action Pack - https://plumsail.com/docs/workflow-acti ... plate.html
And here's an example for Actions - https://plumsail.com/docs/actions/v1.x/ ... plate.html
It might be easier to manually upload PDF files, though.
Cheers
- vegard.grutle
- Posts: 59
- Joined: Fri Mar 17, 2017
Hi,
Well received. Thanks for the prompt feedback!
Well received. Thanks for the prompt feedback!
-
- Information
-
Who is online
Users browsing this forum: No registered users and 18 guests