PDFsharp & MigraDoc Forum

PDFsharp - A .NET library for processing PDF & MigraDoc - Creating documents on the fly
It is currently Tue Nov 04, 2025 6:55 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules

Also see our new Tailored Support & Services site.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Feb 14, 2014 3:11 pm 
Offline
Supporter

Joined: Fri May 15, 2009 3:28 pm
Posts: 96
Hi,

I have a bug report to fix, where when a PDF I generate using PDFSharp/MigraDoc prints (to paper) at about 200% scale, meaning the printed pages only have the top left quarter of the page on them.

This is only a problem in Chrome (i.e. not FF or IE), and if I disable Chrome's built in viewer plugin, and use the Adobe Reader plugin instead, it prints fine (or if I save the pdf to a file and open in Adobe Reader then print). I have tried different settings in the Chrome print dialog, to no avail, though the options are very limited.

I have also printed other PDFs from Chrome's default PDF viewer ok (although not all of them).

Is there something missing in the PDF header or something else I could change/add to get around this problem?

If there isnt a known solution, I plan to browser sniff Chrome and output the PDF to the page via a Save As prompt, rather than inline, which I believe should cause the PDF to always open in Adobe Reader (if the users have it installed, which they should) to get around this, but I would prefer to keep it all displaying inline x-browser.

Thanks,

Mike


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 14, 2014 3:35 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3136
Location: Cologne, Germany
Hi!
mikesowerbutts wrote:
I have also printed other PDFs from Chrome's default PDF viewer ok (although not all of them).
I don't like the standard support answer ("This is not a problem of our software."), but I think this is most likely a Chrome problem.
Probably PDFsharp could be changed as a workaround - if we knew what causes Chrome to print at the wrong size.

Is it exactly 200%? Or roughly factor 2?

I just printed two test pages, created with PDFsharp, with Chrome - and both pages look correct.
This leads to another standard support answer: "We cannot replicate the problem."

Print looks correct, page preview also looked correct.

Does the page preview look correct when the prints fail? Maybe a problem with the Chrome settings or the printer settings?
Would you provide a (ZIPped) PDF that prints incorrectly when you print it?

Weekend begins in 25 minutes and further investigation may have to wait till Monday.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 14, 2014 3:38 pm 
Offline
Supporter

Joined: Fri May 15, 2009 3:28 pm
Posts: 96
Hi,

I actually just fixed this problem by setting the page orientation to Portrait (it was defaulting to portrait before I believe).

Thanks for the quick response though!

Mike


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 241 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