PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Apr 19, 2024 7:43 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Nov 01, 2007 4:13 pm 
Offline

Joined: Tue Oct 30, 2007 6:27 pm
Posts: 12
created a small C# application based on some of the c# samples. the top 1/3 of the page is text and lines. below that, there is a BMP graphic that gets loaded onto the form. when i show the PreviewForm, i see the graphic as it should be (scaled to the page so it'll fit), but clicking on print, the graphic goes off the page. clicking on CreatePDF, i'm presented with an Adobe Reader window with the graphic sized correctly. from here, if i click on print, the page is printed as it looks on the form, and on the original preview form. is there something in the PreviewForm print that should be updated? if not, any other ideas? i like the preview form and it's features, but could "roll my own" set of functions that goes directly to the Adobe Reader, but don't think it'd be as graceful. maybe i'm doing something wrong in loading the graphc??

thanks,

Pete Turner
Sun Nuclear Corp.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Nov 05, 2007 9:50 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
I have no explanation.
It could be there's a bug in the renderer used for printing that is not present in the PdfRenderer.

Maybe there's something unusual about the BMP.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Nov 06, 2007 8:29 pm 
Offline

Joined: Tue Oct 30, 2007 6:27 pm
Posts: 12
what my application does is to build a "form" then display it using the preview sample. from there, if you click on print, the displayed form ends up being larger than the paper for the printer. but, if you click on create PDF, the image in the PDF viewer is fine, as is the printout.

doing a bit of digging, in the PrintPage function of the PreviewForm, there's a line with PageSizeConverter. the "default" is PageSize.A4. if i change this to PageSize.Letter, the printout is better, but it's still too big. is there an argument that can be substituted for the XSize... calculation so that the graphics image that is copied into the gfx structure is a 1 to 1 (same size) copy of the original?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Nov 06, 2007 9:24 pm 
Offline

Joined: Tue Oct 30, 2007 6:27 pm
Posts: 12
in the mean time, i made the MakePDF function public in the PreviewForm file, and, from my form, instead of calling form.ShowDialog to show the preview form, i call form.MakePDF. it goes right to the PDF viewer. from there, i have similar abilities to the preview form (smaller, larger, save, print, etc).


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 299 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