PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Wed Apr 24, 2024 3:14 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Image Placement in PDF
PostPosted: Wed Feb 06, 2008 3:35 pm 
Offline

Joined: Tue Feb 05, 2008 2:39 pm
Posts: 4
I need to place an image inside of a PDF in a very specific spot. That spot will vary from PDF and will not be known at the time of image insertion.

I have researched the following techniques, but haven't come up with a solution:

1. Place a text field in the PDF, and use it's dimensions and placement to lay the image over the text field. I haven't been able to extract the exact positioning of the text field yet, I did find the dimensions though, but finding the X/Y coordinates of that field in the PDF escapes me.

2. Use the new Image Field provided in Adobe Designer and Live Cycle. To PDFSharp this field just shows up as a PDFButtonField, and there isn't an href property to set. The href property is stored in the XFA, but I can't figure out how to modify or set values in the XFA through PDFSharp.

3. Other named anchors. I do have control over the creation of the PDF's, if there are any easier to access named anchors I could use for placement and sizing of an image in a PDF let me know. I tried to just replace an existing image, but you can't name images so there is no way to tell if I am replacing the appropriate image in the PDF.

Thanks in advance for any guidance.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 08, 2008 5:07 pm 
Offline

Joined: Tue Feb 05, 2008 2:39 pm
Posts: 4
After working on this for days the final solution was to do #1, but using AspPDF to pull it off.

XFA is not the easiest thing to modify, and even when I did it didn't always update the document.

I couldn't find any other named anchors that PDFSharp or ITextSharp would support.

For #1 both PDFSharp and ITextSharp I could extract the dimensions, etc to size and place the image, but once placed the image was never lined up perfectly.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 221 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group