Skip to main content
Level 2
Sep 24, 2024 9:23 AM UTC
Solved

Native PDF: Print requirement for multiples of 4 pages

Where PDFs will be printed there is a requirement to generate output PDFs with a page count which is a multiple of 4.

 

Is there a way to count and add pages, if required? I know we can run a JavaScript script post pagination  - does this give us access to the page information which would allow us to expand the number of pages, if required?

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Surbhi_MaheshwariAccepted solution
Adobe Employee
Sep 26, 2024 5:50 AM UTC

Hi Mike,

Yes, you can achieve this. I have tried with attached JavaScript and it works fine. It automatically fills your document with blank pages so that the total page count is divisible by four. In you page layout of PDF Template, you can add this:

 

 

<div data-region="content"> <script src="divisibleby4.js" type="text/javascript"></script> <script>autoFillPages({ multiple: 4 });</script> </div>

 

Whatever value you give in multiple above, that is honoured. If you give 5 then total page count will be divisible by 5.

Note: You will need to upload this js file in your template folder.

Please give it a try and let us know if it works for you.

 

Thanks and Regards,
Surbhi Maheshwari

1 reply

Surbhi_MaheshwariAdobe EmployeeAccepted solution
Adobe Employee
Sep 26, 2024 5:50 AM UTC

Hi Mike,

Yes, you can achieve this. I have tried with attached JavaScript and it works fine. It automatically fills your document with blank pages so that the total page count is divisible by four. In you page layout of PDF Template, you can add this:

 

 

<div data-region="content"> <script src="divisibleby4.js" type="text/javascript"></script> <script>autoFillPages({ multiple: 4 });</script> </div>

 

Whatever value you give in multiple above, that is honoured. If you give 5 then total page count will be divisible by 5.

Note: You will need to upload this js file in your template folder.

Please give it a try and let us know if it works for you.

 

Thanks and Regards,
Surbhi Maheshwari

Translate