DLL distribution

Hi,

We are planning to use Pdf.Kit as a part of our application running on windows PC (not server-side application). As I distribute Pdf.Kit.dll to a client windows PC with our application assemblies, some Pdf.Kit function does not work properly. For instance, we got an error at PdfViewer#OpenPdfFile() line.

private bitmap[] getBitMap( byte[] byteMoni )
{
Aspose.Pdf.Kit.PdfViewer viewer = new Aspose.Pdf.Kit.PdfViewer();
viewer.Resolution = 100;
memoryStream = new MemoryStream( byteMoni );
viewer.OpenPdfFile( memoryStream );
allPage = viewer.PageCount;
currentPage = 1;
return viewer.DecodeAllPages();
}


System.IO.IOException: pages are corrupt or too many pages
at Aspose.Pdf.Kit.PdfViewer.OpenPdfFile(Stream inputStream)

However, if I install Pdf.Kit to a client PC from msi file, this error doesn't occur. Similar symptom seems to be happened when using PdfConverter class.

Do I have to install Pdf.Kit from msi to all client PC, not just distribute Pdf.Kit.dll ? We are testing Pdf.Kit 3.5.0.0 on Windows XP SP3 JP environment.

Hi Yosuke,

You don’t have to install the Aspose.Pdf.Kit from MSI file on each PC; you can distribute the DLL with your application.

Please share the details that how you’re adding the reference to the DLL in your project. Is it happening with some particular file? If so, please share the PDF file as well.

We’re sorry for the inconvenience.
Regards,

Hi Shahzad,

I attached .sln file and .csproj file. We have just tested one type of pdf file, so we will be able to investigate another pdf file later.

This error seems to happen only when our app calls PdfViewer#OpenPdfFile() method or some other method of PdfCoverter class on a client PC. Other method (e.g. Form.FillField() ) is properly working with the same type of pdf without installing Pdf.Kit on a client PC.

regards,

Hi

I tested whether my app can open another PDF file using PdfViewer#OpenPdfFile() on a client PC which Pdf.Kit is not installed in (just put Pdf.Kit.dll under the app directory), but I got the exactly same error that I posted before.

Please help.

regards,

Hi Yosuke,

Please share a complete sample project along with the problematic PDF which can reproduce the issue at our end. Also, please share the system specifications you’re trying to run your application on.

We’re sorry for the inconvenience.
Regards,

Hi,

I found we are testing wrong dll version (3.4.0.0). The latest revision works fine.

Thanks for your help.

regards,