PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.de/

Support Options
http://forum.pdfsharp.de/viewtopic.php?f=2&t=1536
Page 1 of 1

Author:  GaryR [ Tue Feb 08, 2011 9:30 pm ]
Post subject:  Support Options

I posted last week that I wrote the code to password protect an existing 4 page PDF file and afterwards when I open it, It requires a password which is fantastic howerer after entering the password, the PDF is 4 blank pages.

What are my support options if nobody replies? Is there a pay per incident option as my application is finished but this is the last tiny part is all that I need to get fixed before publishing.

Thanks!

Author:  GaryR [ Wed Feb 09, 2011 12:00 am ]
Post subject:  Re: Support Options

I wanted to update my previous post so I am hoping this is the preferred method in this forum ...

I did some more testing and it appears that the "only" time the pages get blanked out when adding a password to the PDF file using the PdfSharp-WPF assembly is when the file was created by exporting from the SQL Report Viewer. PDF files created by exporting from a Crystal Report Viewer are fine as are any other PDF file I test. So this is really frustrating as I have no idea what the difference is.

I realize this is not a SQL Report forum but my SQL report is getting exported to PDF just fine. Perhaps there is a problem with the way I am generating the PDF that is making PDF Sharp blank out all the pages?


Warning[] warnings;
string deviceInfo = null;
string[] streamids;
string mimeType;
string encoding;
string filenameExtension;

//Render the report to a byte array
byte[] bytes;

if (reportViewer.ProcessingMode == ProcessingMode.Local)
{
bytes = reportViewer.LocalReport.Render(format, deviceInfo, out mimeType, out encoding, out filenameExtension, out streamids, out warnings);
}
else
{
bytes = reportViewer.ServerReport.Render(format, deviceInfo, out mimeType, out encoding, out filenameExtension, out streamids, out warnings);
}

//Write report out to file
using (FileStream fs = new FileStream(report.ExportOptions.Filename, FileMode.Create))
{
fs.Write(bytes, 0, bytes.Length);
fs.Close();
}

Author:  Thomas Hoevel [ Wed Feb 09, 2011 8:44 am ]
Post subject:  Re: Support Options

GaryR wrote:
Is there a pay per incident option

Yes, there is - but details haven't been published yet.

Author:  Thomas Hoevel [ Wed Feb 09, 2011 9:02 am ]
Post subject:  Re: Support Options

GaryR wrote:
I did some more testing and it appears that the "only" time the pages get blanked out when adding a password to the PDF file using the PdfSharp-WPF assembly is when the file was created by exporting from the SQL Report Viewer.

Not sure if this is the same problem, but maybe it helps to disable compression.
See here:
viewtopic.php?p=1613#p1613

ballinator wrote:
For the DeviceSettings parameter for the Render method on the ReportExecutionService object, pass this value:

theDeviceSettings = "<DeviceInfo><HumanReadablePDF>True</HumanReadablePDF></DeviceInfo>";

This disables PDF file compression for SSRS 2008. Then, PDFSharp is able to handle the resulting uncompressed PDF file. (Note: SSRS 2005 ignores this setting so it can be passed to both SSRS versions.)


Maybe a change in PDFsharp can help.
See here:
viewtopic.php?p=3611#p3611

Author:  GaryR [ Wed Feb 09, 2011 8:21 pm ]
Post subject:  Re: Support Options

ballinator you are my freaking hero!!!!

Thank you so much!!

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/