VintaSoft Barcode .NET SDK Discussions

Questions, comments and suggestions concerning VintaSoft Barcode .NET SDK.

Board index < VintaSoft Barcode < VintaSoft Barcode .NET SDK Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

Exception with PdfViewer



Exception with PdfViewer

Post by paolozan »

Good day.
I'm evaluating the latest version of the barcode library with Vs2010 but, I have this exception:
ObjectDisposedException crossed a native/managed boundary - Cannot access a closed stream

in the line
ImgPdf = Pdf.GetImage(0, TmpNomiImmagini[0]);

this is my code:
Image ImgPdf = null;

if (Path.GetExtension(NomeFile).ToUpper() == ".PDF")
{
Vintasoft.Pdf.PdfImageViewer Pdf = new Vintasoft.Pdf.PdfImageViewer(NomeFile);

if (Pdf.PageCount == 0)
{
Pdf.Dispose();
return false;
}

string [] TmpNomiImmagini = Pdf.GetImageNames(0);

if (TmpNomiImmagini.Length == 0)
{
return false;
}

try
{
ImgPdf = Pdf.GetImage(0, TmpNomiImmagini[0]);
}
catch
{
Pdf.Dispose();
return false;
}

Pdf.Dispose();
}

What's wrong ? Thank you. Paolo.


Re: Exception with PdfViewer

Post by Alex »

Hello Paolo,

We cannot reproduce the problem. Please send us a demo project and PDF document to support@vintasoft.com - we need to reproduce the problem.

Best regards, Alexander


Page 1 from 1: 1