Page 1 of 1

PDF Output configuration...

Posted: 30 Nov 2017
by pselman
Hi

is there any way of doing the following with the PDF Export control;

1. Set the title of the outputted form to the value of a field in the source list?
2. Enter page breaks in the output document, to allow us to have footers on each "page"?
3. Allow background images that all content will float over the top of?

Thanks

Re: PDF Output configuration...

Posted: 01 Dec 2017
by Nikita Kurguzov
Hello, Pselman!
I would recommend adding a custom button with code to save form as PDF on click:

Code: Select all

fd.saveAsPDF(‘invoice.pdf’);
Prior to this code, you can add JavaScript to manipulate the form as much as necessary. Pagebreak might be harder to do, since FD Forms are built on HTML tables, but changing Title and background dynamically shouldn't be a problem.

Then, after saving the form as PDF, you can remove all the added formatting.

Re: PDF Output configuration...

Posted: 01 Dec 2017
by pselman
Thanks Nikita

So we can use a button to create the pdf...will we be able to set the title of the created pdf as part of that?

Re: PDF Output configuration...

Posted: 01 Dec 2017
by Nikita Kurguzov
If you mean the name of the file, then yes, you pass it as a parameter to fd.saveAsPDF(‘document-name.pdf’);
You can read more in the article that I've linked - https://spform.com/printing/printing-sh ... orting-pdf

If you want actual title inside PDF to be different, you will need to use JavaScript to modify something on the form. For example, set the text of Plain Text control to the value from one of the fields.

Re: PDF Output configuration...

Posted: 01 Dec 2017
by pselman
Great, thanks Nikita!