How do I insert page number to PDF ?

Feature Requests for GdPicture.NET.
Post Reply
alvinchan
Posts: 3
Joined: Wed Jul 27, 2022 10:03 am

How do I insert page number to PDF ?

Post by alvinchan » Mon Nov 07, 2022 10:50 am

Is there any method allow me to merge PDF and show page number at the footer ?

Hugo
Posts: 194
Joined: Tue Dec 18, 2018 10:09 am

Re: How do I insert page number to PDF ?

Post by Hugo » Wed Nov 09, 2022 6:02 pm

Hi Alvinchan,

Thank you for your question.

These are 2 separate requests however you can do both with GdPicture.
Here is a simple example demonstrating how to merge 2 PDFs (links ordered by most general case to most precise case):
https://www.gdpicture.com/guides/gdpict ... ring).html
https://www.gdpicture.com/guides/gdpict ... ring).html
https://www.gdpicture.com/guides/gdpict ... files.html

Here are some of the methods which should allow you to show page number at the footer:
https://www.gdpicture.com/guides/gdpict ... Count.html
https://www.gdpicture.com/guides/gdpict ... wText.html
https://www.gdpicture.com/guides/gdpict ... ation.html

The above methods do not all need to be used but these can give you an idea of what we offer and allow you to choose your prefered approach depending on your requirements.

Let me know if you need anything else.

Regards,
Hugo Cudd
Technical Support

alvinchan
Posts: 3
Joined: Wed Jul 27, 2022 10:03 am

Re: How do I insert page number to PDF ?

Post by alvinchan » Fri Nov 11, 2022 9:51 am

Dear Hugo

Thank you for your reply. For draw text function ,we need to manually calculate the width and height and draw the page number ,is there any pre build function from Gdpicture which can directly insert the page number ?

Hugo
Posts: 194
Joined: Tue Dec 18, 2018 10:09 am

Re: How do I insert page number to PDF ?

Post by Hugo » Mon Nov 14, 2022 6:08 pm

Alvinchan,

You will need to calculate the height and width to do this yes. It should be very straight forward and should require minimal effort on your end as we have functions to calculate page height and width.
If there were a prebuilt function, we would not know where to put this as some prefer the page number to be in the bottom right of the page, and others scenarios would indicate the page number to be center bottom of the page.
If we were to provide a pre-built function, this would be the same speed as if you were to calculate it on your end as we would essentially be doing this internally instead.

Let me know if you need anything else.

Regards,
Hugo Cudd
Technical Support

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests