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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Editing PDF objects
  FAQ FAQ  Forum Search   Register Register  Login Login

Editing PDF objects

 Post Reply Post Reply
Author
Message
RobertN View Drop Down
Beginner
Beginner


Joined: 13 May 09
Location: Canada
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote RobertN Quote  Post ReplyReply Direct Link To This Post Topic: Editing PDF objects
    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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3529
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
RobertN View Drop Down
Beginner
Beginner


Joined: 13 May 09
Location: Canada
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote RobertN Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3529
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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



Edited by Ingo - 18 May 09 at 1:44AM
Back to Top
ukobsa View Drop Down
Senior Member
Senior Member


Joined: 29 May 06
Location: Germany
Status: Offline
Points: 115
Post Options Post Options   Thanks (0) Thanks(0)   Quote ukobsa Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3529
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 09 at 12:13PM
Hi!

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

Cheers, Ingo
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store