Problem with PDFCreator ActiveX

The PDF Creator enables you to create secure PDF documents and to view, print and process existing PDF documents.
If you have any questions about the installation and usage of the PDF Creator please post them here.
Post Reply
chrisM
Posts: 13
Joined: Wed Oct 01 2003

Problem with PDFCreator ActiveX

Post by chrisM »

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
chrisM
Posts: 13
Joined: Wed Oct 01 2003

Problem with PDFCreator ActiveX - additional Info

Post by chrisM »

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?
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

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
chrisM
Posts: 13
Joined: Wed Oct 01 2003

Sorry, my mistake!

Post by chrisM »

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
Post Reply