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
DrawCurrentPage on a non-current page?
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?
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?