Folks,
Not sure how to quite solve this. I have a bunch of existing PDFs that I'm trying to modify. My goal is to add a small bit of text at the very top of every existing page within the PDF... basically a page header. I have been playing around with the PDFCreator and have been able to successfully write text inside the PDF... but not insert something at the very top.
Is there a way to do this? Insert something at the very top of a page? I imagine I would need to scale the rest of the elements on the page so that they would still fit on one page.
Any suggestions?
Thanks!
-Jeff
[Solved] Inserting an object at the top of an existing Page
If you're looking to just overlay it on top of everything else, then you can just add your element and then use the bring to front function.
If you're looking to add, say an inch, to the top of the page, then you would need to iterate through each element in your file and adjust them according to the scaled amount. I use the following to iterate through the items in vb
If you're looking to add, say an inch, to the top of the page, then you would need to iterate through each element in your file and adjust them according to the scaled amount. I use the following to iterate through the items in vb
Code: Select all
thepage = "Pages[1]"
theobjects = Ppdf.ObjectAttribute(thepage, "Objects")
For Each singleobject In theobjects
Adjust each items property accordingly
next