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?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
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
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
Views
Likes
Replies
Views
Likes
Replies