Error finding acPDFCreator.Net in 64 bit environment

The PDF Creator .NET Library enables you to create secure PDF documents on the fly and to view, print and process existing PDF documents. If you have any questions about PDF Creator .Net, please post them here.
Post Reply
avarnon
Posts: 3
Joined: Thu Oct 29 2009
Location: University Park, Illinois
Contact:

Error finding acPDFCreator.Net in 64 bit environment

Post by avarnon »

I have the folowing code theat runs fine in a 32 bit XP professional environment, but creates an error in 64 bit XP professional:

Private Shared Sub AmyuniPrint(ByVal strmPDF As IO.Stream, ByVal oPrinterSettings As Drawing.Printing.PrinterSettings, ByVal oPageSettings As Drawing.Printing.PageSettings)
acPDFCreatorLib.Initialize()

Try
Dim asData As String() = GetAmyuniLicenseSet()

Using oCreator As New Amyuni.PDFCreator.PDFCreator
oCreator.SetLicenseKey(asData(0), asData(1))
With oCreator.Document
.OpenEx(strmPDF, Nothing)

.Print(oPrinterSettings.PrinterName, False)
End With
End Using

Finally
acPDFCreatorLib.Terminate()
End Try
End Sub

Error:
Could not load file or assembly 'acPDFCreator.Net, Version=4.0.0.8, Culture=neutral, PublicKeyToken=8aedc7a81d17941d' or one of its dependencies. An attempt was made to load a program with an incorrect format.

We are using the latest download of PDF Creator (vs 4.0.0.8 ). I also tried installing the x64 version of the C++ Runtime assemblies with no difference. Any help you could provide with this issue would be much appreciated.

Sincerely,
Andrew Varnon

Applied Systems, Inc.
Advancing the business of insurance™
avarnon
Posts: 3
Joined: Thu Oct 29 2009
Location: University Park, Illinois
Contact:

Re: Error finding acPDFCreator.Net in 64 bit environment

Post by avarnon »

I tried building our application with a targeted platform of x86 instead of Any CPU. PDFCreator now works but this is not a valid solution for us. Our application *must* be built with a targeted platform of Any CPU.

I was able to use the Microsoft utility CorFlags http://msdn.microsoft.com/en-us/library/ms164699.aspx to look at acPDFCreator.Net.dll and see that it was built with a targeted platform of x86.

Is PDF Creator 4.0 made for 64 bit environments?
Andrew Varnon

Applied Systems, Inc.
Advancing the business of insurance™
Post Reply