PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

PDFSharp generates empty pages
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3745
Page 1 of 1

Author:  mike45069 [ Sun Mar 18, 2018 3:42 pm ]
Post subject:  PDFSharp generates empty pages

Hi all,

I was handed legacy code that is generating PDF documents.
The process is as follows:
Create Silverlight Canvas and bind to data in memory -> Create System.Drawing image from Canvas -> Generate PDF report from the image using PDFSharp library.
Application is hosted in ASP.NET Web Forms 4.0 web application.

Now everything works as expected if I run it on my local machine, however, as soon as I deploy application to QA machine it stats to generate empty pages.
Amount of pages generated is the same on both environments (e.g. if on my local machine generated PDF has 4 pages so does PDF generated on QA machine, with the diff. that on QA machine all pages are empty).

On FAQ page I see that PDFSharp doesn't depend on any other tool/library.

So my question is what can cause this diff. in generated PDF between local machine & QA machine.
Both are Windows machines, however, my local machine runs on Windows 10 whereas QA machine runs on Windows Server 2008 R2.

I'm not sharing any code because it's scattered and clumsy, but if any piece is of particular interest please do let me know and I'll post it here.

Author:  mike45069 [ Mon Mar 19, 2018 9:33 am ]
Post subject:  Re: PDFSharp generates empty pages

To add to this, I tried Hello, World sample from the wiki and it runs on both local & QA environment creating pdf file with "Hello, World" added to it.

Author:  Thomas Hoevel [ Mon Mar 19, 2018 10:27 am ]
Post subject:  Re: PDFSharp generates empty pages

Hi!

Maybe image files cannot be found or cannot be accessed?
Maybe different Silverlight versions installed?

Add an image to the Hello World sample like the images in your application and investigate that.
Maybe add some debug information to the PDF (e.g. dimensions of the image).to see if it was found and loaded.

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