You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a simple service where I get a pdf file.
I need to add a header to every page. The header has a fixed size. So I want the content to be paginated accordingly.
So if I have an unmodified PDF file
Page 1 :
------------------------
| |
| Old pdf content |
| More content |
| Even more content |
------------------------
Page 2 :
------------------------
| |
| Old pdf content |
| More content |
| Even more content |
------------------------
The new PDF should look like this...
Page 1 :
------------------------
| Header Content-1 |
| Header Content-2 |
| |
| Old pdf content-1 |
------------------------
Page 2 :
------------------------
| Header Content-1 |
| Header Content-2 |
| More content-1 |
| Even more content-1 |
------------------------
Page 3 :
------------------------
| Header Content-1 |
| Header Content-2 |
| |
| Old pdf Content-2 |
------------------------
Page 4 :
------------------------
| Header Content-1 |
| Header Content-2 |
| More content-2 |
| Even more content-2 |
------------------------
Is there a way to do this?
The text was updated successfully, but these errors were encountered:
If you are asking that there is an option in API for this kind of operation, I guess not.
But if you want to crop pages manually,
It depends on definition of your content. Cases are:
Full text: You need to break text, I think it would be difficult (Not sure is it possible or not) Full image: Doesn't contain any text, fully image. Well then you should crop images, easier than text case. Mixed: Text makes it difficult, again.
I think, even if cropping your content is _possible, It won't be _feasible.
An alternative to cropping is faking. I mean you wrap your pages with XObjects, and then put XObject-wrapped pages into new pages. First copy to page 1, second goes to 2, .... Of course with different y coordinates. If you really need to do this operation, you should try faking.
But If I were you, I would try to resize pages, not to break them. Just shrink page, and put your headers, footers, etc.
I'm trying to create a simple service where I get a pdf file.
I need to add a header to every page. The header has a fixed size. So I want the content to be paginated accordingly.
So if I have an unmodified PDF file
The new PDF should look like this...
Is there a way to do this?
The text was updated successfully, but these errors were encountered: