Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support

All forums · Statistics · Search ·

Two Pilots forum / For software developers / PDF Creator Pilot stops working when creating PDF
Author Message
# Posted: 18 Nov 2010 05:02

Version 4.3.2842.0

I'm trying to deploy an ASP.NET application that uses PDF Creator PIlot.
I have the Interop DLL in the project's bin folder, end PDFCreatorPilot.dll in C:WindowsSystem32. I used regsvr32 to register the latter.

When I run the application in my browser and try to generate a PDF file, the page takes forever to load. After this, I get an error message saying something like 'Page cannot be displayed'

When I run the application on an XP machine, the Windows Log contains error messages about aspnet_wp.exe. When the app is installled an a Server 2003 R2 machine, the Log mentions problems with w3wp.exe.

I used the program DependencyWalker to make sure all required dependencies are present on the host machine. It returned quite a long list of missing DLL's:
- API-MS-WIN-*-l1-1-0.DLL (18 of those)

I tried copying these files to the bin folder manually, but this didn't solve the problem either.

I'm completely at a loss right now. Anybody has any idea what could be the problem?

# Posted: 22 Nov 2010 08:22

First of all you need to locate the problem on a target machine.

1) Download the latest version of PDF Creator Pilot from our site (, uninstall yours and install the latest one.

2) create a simple VBS file on a target machine with folowing lines:
'------ file "test.vbs" -------
Set PDF = CreateObject("PDFCreatorPilot.PDFDocument4")
PDF.SetLicenseData "your_name", "your_key"
fnt1 = PDF.AddFont("Arial", false, false, false, false, 1) 'FontCharset.fcDefault
PDF.UseFont fnt1, 16
PDF.ShowTextAt 50, 50, "This is a PDF document."
PDF.SaveToFile "test.pdf", true
'------ end -------

3) run it as: cscript.exe test.vbs

4) if it produces the PDF file then the library is installed OK and is available as a COM class.

5) if the PDF will not appear then you need to manually re-register DLL with admin's credentials: regsvr32 PDFCreatorPilot.dll

If the VBS works ok, then the problem is located somewhere else.
Next step is to remove the PDF Creator Pilot from your ASP.NET project and add it again (to rebuild interop files).
This article might be helpfull: tor-pilot-on-x64-systems-with-microsoft-visual-stu dio/

Also you need to be sure that your application has permissions to read/write folders (where you want to save PDF file) etc.

Max Filimonov,

# Posted: 24 Nov 2010 08:55

The PDF component seems to be installed correctly - that VBS script works just fine.
These are the errors I find in my Windows log:

Event Type: Error
Event Source: .NET Runtime
Event Category: None
Description:.NET Runtime version 2.0.50727.3615 - Fatal Execution Engine Error (7A0979AE) (80131506)
Event ID : 1000
Raw Event ID : 1000
Record Nr. : 15
Category : None
Source : .NET Runtime 2.0
Error Reporting Type : Error
Message : Faulting application w3wp.exe, version 6.0.3790.1830, stamp 42435be1, faulting module mscorwks.dll, version 2.0.50727.42, stamp 4333e7ec, debug? 0, fault address 0x000e9f96.
(The exact data in the last error is slightly different, but generally this is what it says. I had to copy it from the Internet since I'm using a Dutch version of Windows)

There seems to be a Microsoft hotfix for this kind of problem, but it won't install on my system.
Another possible cause could be that I'm using VirtualBox.

# Posted: 26 Nov 2010 08:18

> The PDF component seems to be installed correctly - that VBS script works just fine.

If VBS works fine then the library is installed correctly and works fine.

> There seems to be a Microsoft hotfix for this kind of problem, but it won't install on
> my system.


> Another possible cause could be that I'm using VirtualBox.

If you find a solution please tell us.

Max Filimonov,

# Posted: 29 Nov 2010 05:47

>> There seems to be a Microsoft hotfix for this kind of problem, but it won't install on
>> my system.
> Why?
It said something about the update not being suitable for the software installed on my system.

> If you find a solution please tell us.
I surely will.

# Posted: 3 Dec 2010 08:39

I tried a different approach today: I created a C#.NET Console Application (in Visual Studio 2008, .NET Framework 3.5) that creates a PDF document. Code:

using System;
using PDFCreatorPilotLib;

namespace PdfTest
class Program
static void Main(string[] args)
PDFDocument4Class pdf = new PDFDocument4Class();
pdf.SetLicenseData("demo@demo", "demo");
int fnt1 = pdf.AddFont("Arial", false, false, false, false, fontCharset.fcDefault);
pdf.UseFont(fnt1, 16);
pdf.ShowTextAt(50, 50, "PDF Test");
pdf.SaveToFile("PdfTest.pdf", true);
catch (Exception ex)
Console.WriteLine("Exception: " + ex.Message);
if (ex.InnerException != null)
Console.WriteLine("Inner exception: " + ex.InnerException.Message);

I ran this from the command line on the systems that I've succesfully tested the VB script on. I got the following output:
Exception: Attempted to read or write protected memory. This is often an indication that other memory has been corrupted

There seems to be a problem with the combination .NET Framework + Interop. Can anybody reproduce this? Does anybody have any idea how I could solve this?
Thanks in advance.

# Posted: 7 Dec 2010 08:33

Did you try to update to the latest version?
Because we have .NET 3.5 + PDF Creator Pilot 4.3.3200 instaled on a web server and all is fine:

Max Filimonov,

# Posted: 15 Dec 2010 09:01

I installed the new version on both my development PC and the web server that I test our app on. I built the app with the new PDFCreatorPilot version. It had no effect - still the same problem.

Just to be sure: which DLLs should be present on the web server? Which of them have to be registered using regsvr32?

# Posted: 15 Dec 2010 10:50

PDFCreatorPilot.dll itself. And gdiplus.dll (without this dll the command "regsvr32 pdfcreatorpilot.dll" will fail). Thats it.

Max Filimonov,

# Posted: 16 Dec 2010 07:16

Both files are present on the web server.
PDFCreatorPilot.dll resides in C:WindowsSystem32
I found several instances of GDIPlus.dll in folders with incredibly long names (C:WINDOWSWinSxSx86_Microsoft.Windows.GdiPlus_*).

I used the installer to get PDF CreatorPilot on the web server, so I assume PDFCreatorPilot.dll has been placed and registered correctly.

How about the interop DLL? Where should it be? Should this also be registered somehow?

# Posted: 16 Dec 2010 07:36

I'll give a more detailed description of my situation:

We have several servers that are used by the developers to test our applications.
One of them is called devserver1, and it acts as the file server. This is a physical machine.
Then there is a server called devserver3, which runs as a VirtualBox image on devserver1. This one acts as a web server. That means that IIS runs here, and web applications are accessed via this server. This is also the server that I installed PDF Creator Pilot on. The virtual folder in IIS for our web app points to the app files on devserver1 (UNC path).

I hope this extra information will help shed some more light on the subject.

# Posted: 16 Dec 2010 10:07

No, unfortunatelly I'm not experienced in IIS administration...
But you do not have to register interop dlls. You just need to create them and put in the app's "bin" folder.
Please remember to choose proper machine type if you use x64 platform/dll.

"C:/Program Files/Microsoft SDKs/Windows/v6.0A/bin/TlbImp.exe" PDFCreatorPilot.dll /out:Interop.PDFCreatorPilotLib.dll /namespace:Interop.PDFCreatorPilotLib

"C:/Program Files/Microsoft SDKs/Windows/v6.0A/bin/TlbImp.exe" PDFCreatorPilot.dll /out:Interop.PDFCreatorPilotLib.dll /namespace:Interop.PDFCreatorPilotLib /machine:X64

(I replaced backslashes to slashes)

Max Filimonov,

# Posted: 16 Dec 2010 11:21

I don't understand the 2 command lines you mentioned. How should I use those?

# Posted: 16 Dec 2010 14:05

Those two commands are used to create Interop wrappers (dlls) manually. But if you use Visual Studio it should create interops automatically.
You may create interop dlls manually and put them in the project's "Bin" folder on a wes server.

Max Filimonov,



Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.015


Page top