Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Editing PDF objects |
Post Reply ![]() |
Author | |
RobertN ![]() Beginner ![]() Joined: 13 May 09 Location: Canada Status: Offline Points: 6 |
![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
RobertN ![]() Beginner ![]() Joined: 13 May 09 Location: Canada Status: Offline Points: 6 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
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 Edited by Ingo - 18 May 09 at 1:44AM |
|
![]() |
|
ukobsa ![]() Senior Member ![]() Joined: 29 May 06 Location: Germany Status: Offline Points: 115 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi!
i've written that it's only theoretically ;-) Cheers, Ingo |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store