[Solved] Inserting an object at the top of an existing Page

The PDF Creator enables you to create secure PDF documents and to view, print and process existing PDF documents.
If you have any questions about the installation and usage of the PDF Creator please post them here.
Post Reply
jmsantos
Posts: 2
Joined: Wed Feb 20 2008

[Solved] Inserting an object at the top of an existing Page

Post by jmsantos » Wed Feb 20 2008

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

mtsdave
Posts: 6
Joined: Fri Feb 08 2008

Post by mtsdave » Thu Feb 21 2008

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

Code: Select all

thepage = "Pages[1]"
theobjects = Ppdf.ObjectAttribute(thepage, "Objects")
For Each singleobject In theobjects
     Adjust each items property accordingly
next

jmsantos
Posts: 2
Joined: Wed Feb 20 2008

Post by jmsantos » Tue Feb 26 2008

Thanks for the reply!

I ended up doing as you indicated.. looping over each object on the page, and scaling it down accordingly. Lucky for me, there was only 1 image object.. so it was cake.

Thanks!

Post Reply