PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Jul 04, 2024 9:22 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Support Options
PostPosted: Tue Feb 08, 2011 9:30 pm 
Offline

Joined: Sat Feb 05, 2011 7:30 pm
Posts: 15
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!


Top
 Profile  
Reply with quote  
 Post subject: Re: Support Options
PostPosted: Wed Feb 09, 2011 12:00 am 
Offline

Joined: Sat Feb 05, 2011 7:30 pm
Posts: 15
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();
}


Top
 Profile  
Reply with quote  
 Post subject: Re: Support Options
PostPosted: Wed Feb 09, 2011 8:44 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
GaryR wrote:
Is there a pay per incident option

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

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: Re: Support Options
PostPosted: Wed Feb 09, 2011 9:02 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
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

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: Re: Support Options
PostPosted: Wed Feb 09, 2011 8:21 pm 
Offline

Joined: Sat Feb 05, 2011 7:30 pm
Posts: 15
ballinator you are my freaking hero!!!!

Thank you so much!!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 133 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group