PDF export buggy?

A

Andy

Please excuse my post if its somewhat off-topic, but I'm hoping to
reach a wider audience that may have a solution but doesn't frequent
the SSRS group.. thanks.

I have a LocalReport, when I'm exporting to a PDF using the following
code:


Warning[] warnings;
string mimeType;
string encoding;
string fileNameExtension;
string[] streams;
byte[] pdfContent;
string fileName;
FileStream pdfFile;


fileName = Path.GetTempPath();
fileName = Path.Combine( fileName, Report.DisplayName +
".pdf" );


pdfContent = report.Render( "PDF", null, out mimeType,
out
encoding,
out fileNameExtension, out streams, out warnings );


using ( pdfFile = new FileStream( fileName,
FileMode.Create ) ) {
pdfFile.Write( pdfContent, 0, pdfContent.Length );
}


Using the PCL drivers for a laser printer we have here, the PDF
prints
fine. Uninstalling the print drivers and installing the PS printer
drivers, and we get one page with a few portions of text, followed by
a second page with this text:

ERROR: unmatchedmark
OFFENDING COMMAND: ]


STACK:


8


Any idea what I can do to correct this? Is this a known issue?

Thanks
Andy
 
R

rossum

Using the PCL drivers for a laser printer we have here, the PDF
prints fine. Good.

Uninstalling the print drivers and installing the PS printer
drivers, and we get one page with a few portions of text, followed by
a second page with this text:
PS is PostScript. Are you sure that the PS drivers can handle PDF?
Try exporting your document as PS instead of PDF and see if that
works.

rossum
 
A

Andy

PS is PostScript. Are you sure that the PS drivers can handle PDF?

Yes, other pdfs have printed just fine.
Try exporting your document as PS instead of PDF and see if that
works.

That's not supported by SSRS, AFAIK.

I did find the solution however; I had a lone PNG graphic in the
report. Changing the PNG to a JPG has resolved the issue. I don't
know if it was the specific PNG or if Render simply cannot handle PNGs
in general correctly, but JPG is working.

Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top