This topic is locked
[SOLVED]

Email PDF of Custom Page

1/30/2024 8:49:10 AM
PHPRunner General questions
C
copper21 author

Good Morning,

I am looking to email a pdf version of a custom page that I copied from the view page. Basically, I copied the view page, created the layout I needed and called it "invoice". I do have "Print PDF" enabled. The URL looks something like ....orders_view.php?editid1=653&page=invoice.

I have been following the tutorial on how to email pages as separate pdfs and I got it to work with just the view page.

In the client before code, I need to specify the page to email as pdf.

selectedRecords.forEach( function( ajaxRow, idx ) {
pdfParams[ idx ] = {
pageType: 'view',
keys: ajaxRow.getKeys()
};

Above is an excerpt from that client before code. Here you name the page you want to send. Print & View are the options.

My question is this. Can my "invoice" page be emailed as PDF? It technically is the view page, but it has the "page" parameter in the URL.

Thank you in advance

admin 1/30/2024

The manual says that you can use page parameter to specify the page name:
https://xlinesoft.com/phprunner/docs/pdf_parameters.htm

C
copper21 author 1/30/2024

Looking at the fine print helps!

Thank you. I got it working.