Email Attachment - pagination

By: Wojciech Zdunek | Asked: 07/08/2024
ForumsCategory: Code SnippetsEmail Attachment - pagination
Wojciech Zdunek asked 2 weeks ago

Hello, I have a question about adding pagination to the PDF generated that is send by email.

 I'm using a custom PDF view as attachment using the code I found on the official website as posted below.

How should I use pdf_args to add pagination to the view? or there is something else I should do?

add_filter( 'frm_pdfs_email_attachment_args', 'add_view_to_attached_pdf', 10, 2 );
function add_view_to_attached_pdf( $pdf_args, $args ) {
	if($args['form']->id ==5) { //change 5 to the ID of the form
         $pdf_args['view'] = 10; // ID of view.
	   $pdf_args['id']   = $args['entry']->id; // Do this to show the detail view, otherwise, it shows the listing view.
	   return $pdf_args;
   }
}

I appreciate any help. Thanks!

2 Answers
Wojciech Zdunek answered 2 weeks ago
Ill' check it out, thanks, also expanding a bit on the question how do I add page numbers to the email attached PDF?
Rob LeVineRob LeVine replied 2 weeks ago

I've done that before, but I'm pretty sure that was using E2PDF, not the Formidable PDF addon. There might be a way to do it using CSS but I tried a couple of things with no luck. It can be frustrating that something that appears to be so easy is not.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right