Print Page | Close Window

Editing PDF objects

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1086
Printed Date: 25 Jun 25 at 5:52PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Editing PDF objects
Posted By: RobertN
Subject: Editing PDF objects
Date Posted: 15 May 09 at 5:32PM
If I want to change a piece of text or delete it or replace it with a formfield,
how is it done or is it possible. Is it possible to create a pdf editor with your library?
 
Thank you,
Robert



Replies:
Posted By: Ingo
Date Posted: 16 May 09 at 6:37AM
Hi Robert!

With the textextractfunctions you can get the rectangle points of the strings (x1, y1, x2, y2, ...). With drawbox-functions you can overwrite the string-locations with color white (for example)... That's your deletion. Now you have these position-points the old textstring and you can use the draw-functions to insert your new textstring ... so you see it's possible to create a pdf-editor but it's only theoretically ;-)

Cheers, Ingo



Posted By: RobertN
Date Posted: 16 May 09 at 8:49AM

If I do this is, does the old text along with the white drawbox objects still exist in that location or does your pdf save functions clean up the overlapping objects? If it doesn't clean up, won't your extract text functions then list the old text as well? If this is the case, then couldn't you just add an objectid to each object you read when converting the pdf to your internal objects and just expose this objectid to all your routines. Then you could simply add a DeleteObject(objectid). This would also allow for a GetObject(objectid), and allow for direct editing of objects. This would open up your PDF library to all kinds of interesting routines.

Thank you,
Robert


Posted By: Ingo
Date Posted: 16 May 09 at 8:57AM
Hi!
You can test it yourself.
Do it and then make textextraction... Is it still there?
I can't add anything to the library and i can't say if "yes" or if "not" ...
I'm a user - not the producer.
Cheers, Ingo



Posted By: ukobsa
Date Posted: 18 May 09 at 8:31AM
Robert,

what you want to do is not possible with QuickPDF (at least I cannot imagine any way). Deleting one portion of text from a pdf would require the adjustment of each following text (in short, text in PDF is mostly a collection of letters with position for each letter). So you would have to implement your own algorithms for line breaking, page breaking, ...

The way to hide the text by a form field would still make text extractable as it is not deleted from pdf.
So if you want to do some real editing on a pdf use Adobe Acrobat.


best regards,
Ulrich


Posted By: Ingo
Date Posted: 18 May 09 at 12:13PM
Hi!

i've written that it's only theoretically ;-)

Cheers, Ingo



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk