Q: I am currently testing out your new PDFNet WebViewer Sample project
from PDFNet SDK. I'm running into some issues with the following
1. I've setup visual studio to use CassiniDev as suggested.
o When running the project in VS 2008 using CassiniDev I get an error
(see attached CassiniDev_Error.png)
2. I’ve tried using IIS and have setup virtual directory, and
converted the virtual directory to an application
o With this setup I get an asp.net stack trace (see attached
Looks like I need some additional help setting up this project.
Any help would be appreciated,
A: The problem is that PDFNet DLL and the web server process are
incompatible (32 vs 64 bit).
you could use 32 bit version of PDFNet with IIS as follows…
... in your IIS 2008 R2 Web Server application pool, set the Identity
to "LocalSystem" (for both .NET 2.0 and .NET 4.0). Also, make sure to
set the "Enable 32-Bit Applications" to "True".
I've made the changes and PDFNet now works on the web server, however
I am now getting the following js error/alert message:
"Wrong signature in local header: 1836345404"
What you can do in this case is to open the Index.aspx file, and modify the URL for the document conversion request (the initialDoc parameter) accordingly - in your case, you may want to change it to “/PdfWebViewer/ConvertAndStream.aspx”.
If you are using IIS on Azure, and you’re seeing this “BadImageFormatException” (“Could not load file or assembly ‘PDFNet’ or one of its dependencies. An attempt was made to load a program with an incorrect format” ) when using IIS on Azure, you may need to select the correct architecture:
I have done as you mentioned above but unfortunately “Platform” is not available in my Azure web app service. My Azure account is a free test account and to use this feature I need to upgrade. How do you want to instruct us to proceed in my situation? or do I have to upgrade my Azure to a paid account?
If the only option is to upgrade, what is the recommended pricing tier/app service plan to use that enables the “Platform” option?
Since Azure is not our service, we are not able to provide advice regarding its options for free or paid subscriptions.
That said, we do provide some advice when running WebViewer Server on Azure. In that case, we recommend using a Linux VM or the Container Instances service:
WebViewer Server is an easier way to deploy WebViewer than building your own conversion queue (https://www.pdftron.com/documentation/web/guides/deployment-options/webviewer-server).