Print Page | Close Window

Appending Text to any existing PDF file.

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=290
Printed Date: 09 May 24 at 9:23PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Appending Text to any existing PDF file.
Posted By: Kapil
Subject: Appending Text to any existing PDF file.
Date Posted: 27 Jan 06 at 5:27AM

Hi there,

My Problem is that i am unable to append any text or image to and existing PDF document. I am using QuickPDF activeX dll in VC7.

Regards,

Kapil

 




Replies:
Posted By: JanN
Date Posted: 27 Jan 06 at 6:39AM
Kapil,

could you provide a little bit more information? Can you give us a piece of your source code?


Posted By: Kapil
Date Posted: 27 Jan 06 at 6:45AM

hi JanN,

Here is a code snippet

CoInitialize(NULL);

CComPtr<IQuickPDF> qp;

qp.CoCreateInstance(CLSID_QuickPDF);

qp->UnlockKey("---------------------------------");

long filehandle = qp->DAOpenFile("c.pdf", "");

qp->DANewPage(filehandle );

qp->SelectPage(2);

qp->DrawText(100, 500, "Why I cannot write ??? ");

qp->DAAppendFile(filehandle);



Posted By: JanN
Date Posted: 27 Jan 06 at 7:36AM
The DirectAccess functions are completely separate from the other functions. You cannot use e.g. DrawText in combination with the DA functions.

To add text you have to do something like this:

...
qp->LoadFromFile("test.pdf");
qp->NewPage; // automatically selected as current page
qp->DrawText(100, 500, "Now you should be able to write :) ??? ");
qp->SaveToFile("test2.pdf");
...


Posted By: Kapil
Date Posted: 30 Jan 06 at 6:50AM

Hi Jan

Thanks it worked..but i was wondering what is the use of DAOpenFile and other DA...() functions..

Regards,

Kapil



Posted By: JanN
Date Posted: 30 Jan 06 at 7:52AM
Kapil,

with the DA functions you can work with files without having to load them into memory. But the possible changes are limited - as you already experienced. ;)


Posted By: Kapil
Date Posted: 30 Jan 06 at 8:06AM

Hi JanN,

I am having 1 more problem, i have created a 2 radio buttons, and i want to set one of the radiobutton value to true ie select one option by default.

How can i do this...?

and how can i save the changes...?

Sorry for bugging u so much....

Regards,

Kapil...



Posted By: JanN
Date Posted: 30 Jan 06 at 8:23AM
I'm afraid I cannot help you in this case. I have no experience with radio buttons or other form fields.

Please create a new thread for this problem.



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