I need to selectively find and modify images in a pdf. Not all of the images only some. But I'm not sure how to return information on the pdfs so that I can change the images I need to change, and leave other images alone.
Another alternative would be to like add bookmarks to the pdf using Adobe Acrobat 9 and then use them like bookmarks so that my code will know where to put the new images.
any help would be appreciated
how to identify/replace images in a pdf
Page 1 of 17 Replies - 2051 Views - Last Post: 06 January 2010 - 11:53 AM
Replies To: how to identify/replace images in a pdf
#2
Re: how to identify/replace images in a pdf
Posted 05 January 2010 - 03:02 PM
if you could be bit for more specific I could help you, but I am not quite sure what you are attempting
#3
Re: how to identify/replace images in a pdf
Posted 05 January 2010 - 03:33 PM
I have a program that is dynamically creating a pdf file.
There are images in the pdf that need to be modified based upon the user.
So i need my code to be able to identify the images I need to change in the generated pdf, so that I can modify them.
There are images in the pdf that need to be modified based upon the user.
So i need my code to be able to identify the images I need to change in the generated pdf, so that I can modify them.
#4
Re: how to identify/replace images in a pdf
Posted 05 January 2010 - 03:40 PM
OK, so you are trying to make pdf with image files in it, and you want the program to know what images need changing and what dont. If this accepts input, eg. the user says all images created on "this" date need to be modified ect. Then you could assign each image a constant integer, or string what ever works for what you are doing. Then the program will search through the integers ("links" to images) and find which ones have the integers code that matches the required images. You then add the integers to something such as a list, and go from there.
Did I do good, or do you want more specifics, or am I not answering your question? I hope I helped!
Did I do good, or do you want more specifics, or am I not answering your question? I hope I helped!
#5
Re: how to identify/replace images in a pdf
Posted 05 January 2010 - 03:42 PM
I think the best question to ask here is: are you using any kind of 3rd party library to manipulate these PDFs that we should know about? If not, elaborate on "I have a program that is dynamically creating a pdf file." please.
#6
Re: how to identify/replace images in a pdf
Posted 05 January 2010 - 04:29 PM
I am using Itextsharp library to generate the PDF.
I'm assuming that itextsharp or PDFsharp or a similiar library has a way for me to detect and identify the images in the PDF i'm creating but I'm not sure how to do that.
I'm assuming that itextsharp or PDFsharp or a similiar library has a way for me to detect and identify the images in the PDF i'm creating but I'm not sure how to do that.
#7
Re: how to identify/replace images in a pdf
Posted 05 January 2010 - 04:59 PM
Have you read through the tutorial for ITextSharp? - http://itextsharp.so...orial/ch06.html
I'm sorry I'm not being more helpful. API troubleshooting is hard and involved and frankly I just cannot invest any time in learning this API to be of more help.
It seems to me though that the Document maintains a collection of image objects. You can use that collection and swap out various images I would guess.
I'm sorry I'm not being more helpful. API troubleshooting is hard and involved and frankly I just cannot invest any time in learning this API to be of more help.
It seems to me though that the Document maintains a collection of image objects. You can use that collection and swap out various images I would guess.
#8
Re: how to identify/replace images in a pdf
Posted 06 January 2010 - 11:53 AM
I've been looking at tutorial, but I just cant find the methods to get the images out of an existing PDF.
I need something like
ImageArray[] = document.getImages():
so that I can
ImageArray[2].modifyImage();
I need something like
ImageArray[] = document.getImages():
so that I can
ImageArray[2].modifyImage();
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|