Hi,
I am trying to use the PDF Creator activeX control.
For the purposes of my test, I have created a form and dropped the control onto it.
I have then put the following code into the formLoad event of the form:
AxPDFCreactiveX1.Open("c:\archive\200333965919468.PDF", "")
However, when I run the app, the control comes up and very rapidly flicks through all the pages in the PDF document then shows the last page even though the control say it is displaying the first page.
The control shows the correct number of pages, but all except the first appear to be blank.
Any thoughts on this?
Regards,
Chris Mayers
Problem with PDFCreator ActiveX
Problem with PDFCreator ActiveX - additional Info
The PDF that I have this problem with was created by me using PDF Creator. If I use another PDF file (eg the PDF Creator Developer Manual) then the pages are OK. I assume this means I have done somthing wrong when creating my PDF file.
My code for creating the PDF is somthing like:
PDF1 = New ACPDFCREACTIVEX.PDFCreactiveX()
PDF1.SetLicenseKey("Amyuni Evaluation Version", "1234")
for currentPage = 1 to 5
If currentPage > 1 Then
.AddPage(currentPage)
End If
.CreateObject(ObjectTypeConstants.acObjectTypePicture, "pic" & cp.ToString())
.ObjectAttribute("pic" & cp.ToString(), "FileName") = "TEST.BMP"
.ObjectAttribute("pic" & cp.ToString(), "Page") = currentPage
.ObjectAttribute("pic" & cp.ToString(), "LEFT") = 0
.ObjectAttribute("pic" & cp.ToString(), "TOP") = 0
.ObjectAttribute("pic" & cp.ToString(), "RIGHT") = .PageWidth
.ObjectAttribute("pic" & cp.ToString(), "BOTTOM") = .PageLength
.RedrawObject("pic" & cp.ToString())
next
.Save("TEST.PDF", FileSaveOptionConstants.acFileSaveAll)
Have I missed a step out that would cause the problem with the viewer a mentioned above?
My code for creating the PDF is somthing like:
PDF1 = New ACPDFCREACTIVEX.PDFCreactiveX()
PDF1.SetLicenseKey("Amyuni Evaluation Version", "1234")
for currentPage = 1 to 5
If currentPage > 1 Then
.AddPage(currentPage)
End If
.CreateObject(ObjectTypeConstants.acObjectTypePicture, "pic" & cp.ToString())
.ObjectAttribute("pic" & cp.ToString(), "FileName") = "TEST.BMP"
.ObjectAttribute("pic" & cp.ToString(), "Page") = currentPage
.ObjectAttribute("pic" & cp.ToString(), "LEFT") = 0
.ObjectAttribute("pic" & cp.ToString(), "TOP") = 0
.ObjectAttribute("pic" & cp.ToString(), "RIGHT") = .PageWidth
.ObjectAttribute("pic" & cp.ToString(), "BOTTOM") = .PageLength
.RedrawObject("pic" & cp.ToString())
next
.Save("TEST.PDF", FileSaveOptionConstants.acFileSaveAll)
Have I missed a step out that would cause the problem with the viewer a mentioned above?
Hello,
We have looked at the code you sent and it seems to be OK. Can you send a sample of PDF document you are using to canada.support@amyuni.com?
Thanks
We have looked at the code you sent and it seems to be OK. Can you send a sample of PDF document you are using to canada.support@amyuni.com?
Thanks
Sorry, my mistake!
Fixed it!,
It would seem that line causing the problem is :
.ObjectAttribute("pic" & cp.ToString(), "Page") = currentPage
I'm not sure why this causes the problem that it does, but in this case, it is not needed as (according to the manual) the object is automatically added to the current page when it is created with the
.CreateObject(ObjectTypeConstants.acObjectTypePicture ....
Best regards,
ChrisM
It would seem that line causing the problem is :
.ObjectAttribute("pic" & cp.ToString(), "Page") = currentPage
I'm not sure why this causes the problem that it does, but in this case, it is not needed as (according to the manual) the object is automatically added to the current page when it is created with the
.CreateObject(ObjectTypeConstants.acObjectTypePicture ....
Best regards,
ChrisM