Modifying specific text elements

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics or PDF-XChange Viewer SDK if appropriate.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
ashmid
User
Posts: 27
Joined: Fri Jan 06, 2012 12:35 am

Modifying specific text elements

Post by ashmid »

I am using PDF Tools SDK Pro to manipulate a set of PDF documents. The PDF documents contain bookmarks, images, text, and more. I need to modify a few specific properties of certain text elements.

I understand from another thread on the forum that there is no way with the current PDF Tools to modify specific text elements without rewriting the entire document (https://forum.pdf-xchange.com/ ... =44&t=7312).

I would like to request, then: can you please post sample C# code which performs the task of reading one PDF with all its elements (bookmarks, text, images, etc.) and rewriting it into a new PDF? That way I'll be able to insert code to catch the rewriting of the text elements, and to modify them as needed before rewriting them.

I'll note: in the help file for the function PXCp_ET_AnalyzePageContent() there is a function which demonstrates how to read all text and rewrite it into another file. That's a good start. But I want to make sure that I preserve *everything* else about the PDF, also - images, bookmarks, annotations, logical page numbering elements, etc. Hence I'd like to request sample code to do an accurate rewriting of an existing PDF.
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Modifying specific text elements

Post by Vasyl-Tracker Dev Team »

Hi, ashmid.
But I want to make sure that I preserve *everything* else about the PDF, also - images, bookmarks, annotations, logical page numbering elements, etc. Hence I'd like to request sample code to do an accurate rewriting of an existing PDF.
I'm afraid but you will be able to do it only with our new PDF-Editor SDK (upcoming).

Best
Regards.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
ashmid
User
Posts: 27
Joined: Fri Jan 06, 2012 12:35 am

Re: Modifying specific text elements

Post by ashmid »

Well, then, even if the current version of the SDK can't preserve everything, I imagine it can preserve most things. My current project unfortunately can't wait for the next version - we need to work somehom with the Pro SDK that we've purchased. So, let's say we limit it to Text streams, Images, and Bookmarks. Can you post code that will read in a PDF's text streams, images, and bookmarks, and then rewrite them one by one into a new PDF, such that I can modify individual text elements as they are rewritten?
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: Modifying specific text elements

Post by John - Tracker Supp »

Hi,

I am afraid we really cannot provide extensive examples to order - please review what you wish to code and use the current examples and documentation to allow you to do so yourself and should you still be having issues - then send us a working example restricted the problem items in both project source and compiled form with any required 3rd party dll's, resources (e.g. images, PDF files, text files etc) to allow us to both run your compiled code and review your project source and we will endeavour to assist as best we can. Please ZIP/RAR/7zip any files posted or emailed.

Please also provide simple instructions to allow us to use what is sent - and finally please remove all license info (serial numbers and developer license strings etc) if posting to the user forums - if they are included on a forum post this will mean we will have to block them form further use to avoid them leaking into unlicensed hands.

If you prefer you can email to support@pdf-xchange.com with a link back this forum post for reference.

Thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
Post Reply