View previous topic :: View next topic |
Author |
Message |
WolfiePDF
Joined: 05 Feb 2008 Posts: 4
|
Posted: Wed Feb 06, 2008 3:35 pm Post subject: Image Placement in PDF |
|
|
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. |
|
Back to top |
|
|
WolfiePDF
Joined: 05 Feb 2008 Posts: 4
|
Posted: Fri Feb 08, 2008 5:07 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
|