Different header footer for PDF
Question
Application Type
Reactive
Service Studio Version
11.12.7 (Build 51940)

Hi All,

I have used ultimate PDF component for PDF generation.. its gives a predefined layout with header  and footer , but we have a requirement that for few pages (mostly at top and bottom) we have images with different footers, so applying a common footer to all using layout will not solve my problem.

Can you please help me regarding this.

Thanks

Shivangi 

Solution

Hello @Shivangi Thakur 

Picking up from this post, I tried a few things but was unable to implement an 'if' conditional logic to display distinct footers using Ultimate PDF/ Simple Reports Reactive.

Given your urgency around this, I had an alternative suggestion. 

The PDF Sharp asset in the Forge has server actions that you can use in a Reactive App. I have confirmed this. It allows you to merge multiple PDF documents into one document, and also allows you to append 1 page at a time to an existing document.

You could just create the PDF docs/pages with the footers of your choice and then merge/ append them in the right order. Tedious but possible. There is a catch - You won't be able to place page numbers on those docs as they will repeat over multiple documents since each document you append/merge will have its own Page 1,2,3 etc.

PDF Sharp (Extension name - PDF_Tools) comes with a sample application so you get an idea on how to use these actions 

If you do go this route, then the only difference from the Sample Traditional app and your own Reactive App would be => you would need to create a Server Action where for e.g. you merge the documents and then return the Binary output to a Client Action in your UI and then download the file in the Client action.

This is the best I could come up with, hope it is of some help to you,

Regards,

AJ

Hi @AJ. 

Thank you for providing the solution. I will try this.

Can I use simple report pdf component for reactive apps, because as per my requirement header footer is different for cover pages which are at start and end of the PDF . Will this gonna work ??


Thanks  

Shivangi 

I have not used the Simple Reports Reactive component and ran into issues of my own in trying to replicate what I did for the cover page using the Traditional version in this post.

If you only need different headers/footers only on the first and last pages, then my previous recommendation may be easier to implement.


Thanks @AJ.  for your help !

It worked ! :)

I am so glad it worked out for you šŸ‘!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.