PDF Output configuration...

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
pselman
Posts: 24
Joined: Wed Nov 04, 2015

30 Nov 2017

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

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

01 Dec 2017

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.
Cheers

pselman
Posts: 24
Joined: Wed Nov 04, 2015

01 Dec 2017

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?

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

01 Dec 2017

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.
Cheers

pselman
Posts: 24
Joined: Wed Nov 04, 2015

01 Dec 2017

Great, thanks Nikita!

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests