Hi,
I'm trying to print a PDF from a byte array and got the following exception:
AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
The code that threw the exception is as follows:
var rptBytes = ReportReader.GetReportBytes("/Sales/OrdersToday");
ceTe.DynamicPDF.Printing.InputPdf ipdf = new ceTe.DynamicPDF.Printing.InputPdf(rptBytes);
var printJob = new ceTe.DynamicPDF.Printing.PrintJob(ceTe.DynamicPDF.Printing.Printer.Default, ipdf);
I know that the byte array is a valid PDF because I can save it to a file and view/print that file with a normal PDF reader. I'd like to use the PrintManager to print PDFs from a windows service.
Is there another way to print from a byte array?
Error printing from byte array
Re: Error printing from byte array
Support · May 19, 2010Hello,
What build of our product are you using? Can you please try using the latest build of our product downloading from our CustomerArea
by logging in using your current serial number? If you are evaluating then you can get the latest from our website
.
Thanks,
ceTe Software Support Team.
Re: Error printing from byte array
Forum member · May 19, 2010I just downloaded the file yesterday. It was version 1.0.1.15267, build date 3/15/2010.
Re: Error printing from byte array
Support · May 19, 2010Hello,
Can you please try adding the path th the PDf file directly to the InputPdf constructor and then see if you still see the same error message. If yes, can you please send the PDF document to our [^a|mailto:support@cete.com|Support Team^] so that they can look into it further? Also please give the printer details.
Thanks,
ceTe Software Support Team
Re: Error printing from byte array
Forum member · May 19, 2010It does print when I load the document from a file, but not from a byte array. I've emailed the file to support.