DrawCurrentPage on a non-current page?

If you are a C/C++/C# developer and have any questions about using our products from your application here is the place to post them.
Post Reply
beandog
Posts: 33
Joined: Wed Dec 14 2005

DrawCurrentPage on a non-current page?

Post by beandog »

I'm repeatedly calling DrawCurrentPage on the PDF control to render a thumbnail view. Unfortunately, I have to repeatedly change the current page to make this work.

If I hide the control, render all the pages, and then display the control again, it works all right (without showing the user every page of their document), but of course the control disappears for a second.

Is there a good way to draw a page besides the current page to an HDC?



Ben Dilts
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

Hello,

Another possible solution is to create an other instance of the Creator in memory and use that instance to create your thumbnail image.

I've included a vb code snippet to illustrate this:

Dim pdfobj As Object

'Picture Box
Picture1.AutoRedraw = True
Set pdfobj = CreateObject("PDFCreactiveX.PDFCreactiveX")
pdfobj.SetLicenseKey LicenseTo, ActivationCode

pdfobj.Open App.Path & "\source_docs\image.pdf", ""
pdfobj.ZoomFactor = 40
pdfobj.CurrentPage = 1 'or what everpage


pdfobj.DrawCurrentPage Picture1.hdc, 1
Picture1.Refresh
Set pdfobj = Nothing


hope this helps?
Post Reply