Print Page | Close Window

Can't edit existing pdf docs

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=1046
Printed Date: 04 Apr 26 at 5:35AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Can't edit existing pdf docs
Posted By: nwebster
Subject: Can't edit existing pdf docs
Date Posted: 26 Mar 09 at 5:38PM
I've got a pdf document (that I did not create) that I need to add some text to. However, whenever I try and use DrawText on the document, nothing happens. Even if I insert a new page and try to draw on it, nothing happens. Its only new documents that I create with QuickPDF that I can write to. Is this a limitation of the software, or am I missing something here?

I'm looking for the ability to add a new page with some content in the beginning, and then add a watermark on each page. This is being done in C#. Can anyone assist me with these issues?



Replies:
Posted By: Ingo
Date Posted: 26 Mar 09 at 5:56PM
Hi Noah!

What i can tell you first is ..
What you wanna do is possible. Adding something is always a good job for QuickPDF - Removing content is for each pdf-library a hard job ;-)

Please have a look here:
http://www.quickpdf.org/forum/forum_posts.asp?TID=1035
If the file is existing after the unlock-function you have to use
LoadFromFile ...
Please use the search-function from the menu above and search for "DrawText"... I'm pretty sure that you#ve written something on your samples but perhaps it's too small or out of the normal range 'cause you didn't set the starting main values like SetMeasurementUnits and SetOrigin.

Don't be afraid - It's easy with QuickPDF!

Cheers, Ingo


Posted By: nwebster
Date Posted: 26 Mar 09 at 6:04PM
Thanks. I've tried setting the Origin to 1, and I left the standard units as is. But it won't draw on an existing pdf file. Only when I create a new pdf. When I do this:

pdfLibrary.NewDocument();
pdfLibrary.DrawText(100, 500, "sample text here");
pdfLibrary.SaveToFile("samplefile.pdf");

It works fine. But when I do this:

pdfLibrary.LoadFromFile("originalpdf.pdf");
pdfLibrary.DrawText(100, 500, "sample text here");
pdfLibrary.SaveToFile("samplefile.pdf");

It doesn't work. I can delete and add pages to the existing doc, but can't use drawtext (or draw anything for that matter) on it.


Posted By: Ingo
Date Posted: 26 Mar 09 at 6:08PM
Hi Noah!

Is the original pdf encrypted (Then first unencrypt it)?
Is there a main or user password (then first unlock the file with the correct password)?
BTW: It's more clean if you#re using a new layer if you want to add text.

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