You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had added a dynamic footer text in ten pages single PDF file but now I am stuck in adding two different footers for different pages in the barryvdh/laravel-dompdf composer package in laravel.
I have to add two different footer texts for two different pages in a ten pages single pdf file generated by the above package.
For example:-
Page_1 => footer_text_1 with page_number_1
Page_2 => footer_text_1 with page_number_2
Page_3 => footer_text_1 with page_number_3
Page_4 => footer_text_2 with page_number_1 (again)
Page_5 => footer_text_2 with page_number_2
Please help me out as it's my client's requirement. Below I am sharing my pdf-generating code.
It might be easier to render each page as an individual PDF then concatenate them together. I use FPDI library and import the pages from the files generated.
I've also used ghostscript (gs) to concatenate multiple PDF renderings into 1 document.
Thanks @markkimsal I think that's probably the best option. I was trying to work out a method using HTML+CSS plus some callback logic but there are challenges there that I hadn't yet found a way to overcome.
Ultimately something like this would be made possible by adding named page support, but nothing planned for that functionality yet.
I had added a dynamic footer text in ten pages single PDF file but now I am stuck in adding two different footers for different pages in the barryvdh/laravel-dompdf composer package in laravel.
I have to add two different footer texts for two different pages in a ten pages single pdf file generated by the above package.
For example:-
Page_1 => footer_text_1 with page_number_1
Page_2 => footer_text_1 with page_number_2
Page_3 => footer_text_1 with page_number_3
Page_4 => footer_text_2 with page_number_1 (again)
Page_5 => footer_text_2 with page_number_2
Please help me out as it's my client's requirement. Below I am sharing my pdf-generating code.
Here is my controller code:-
Here is my blade file code for generating one footer text with dynamic page numbers for every single page:-
At the top of the body tag-
At the bottom of the body tag-
Any help would be appreciable.
Thank you in advance!!
The text was updated successfully, but these errors were encountered: