Print Page | Close Window

Can you DrawText on PDF opened with DAOpenFile

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=1972
Printed Date: 04 Apr 26 at 11:05PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Can you DrawText on PDF opened with DAOpenFile
Posted By: bmcdonald
Subject: Can you DrawText on PDF opened with DAOpenFile
Date Posted: 23 Sep 11 at 8:40PM
Hello All,

I have the following code and it does not display the text on the saved pdf. My question is can you use the Draw methods with files that are opened with the DAOpenFile?

m_fh = m_qp.DAOpenFile("C:\Temp\MyPDFFile.pdf", "")
   
Call m_qp.SetOrigin(1)
Call m_qp.SetTextSize(10)
Call m_qp.SetTextAlign(1)
Call m_qp.DrawText(m_qp.PageWidth() / 2, m_qp.PageHeight / 2 + (m_qp.GetTextSize() / 2), "This it my centred text")
   
Call m_qp.DASaveAsFile(m_fh, "C:\temp\test.pdf")

Thanks in advance.




Replies:
Posted By: Wheeley
Date Posted: 23 Sep 11 at 9:16PM
The short answer is no. You can only use the direct access functions when you open a function using the direct access method (DAOpenFile). So to do drawing, you need to open the whole file to memory using the other open file methods.

Wheeley


Posted By: Ingo
Date Posted: 24 Sep 11 at 5:36PM
So if you need both functionalities... a bit from DA... and a bit from NON-DA...
you should do it in two steps:
First the DA-functionalities and after Free a new Load and the NON-DA-functions.

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