Free Support Forum - groupdocs.com

Documents printed from GroupDocs Viewer .NET library is not full sized


#1

Hi,


As we have successfully embed GroupDocs Viewer .NET library inside our project and made it works now, we found that documents printed from GroupDocs Viewer is not full sized and there are header and footer on printed papers as well. If we enable “Use Pdf Printing”, we can get full-sized printed documents in
almost all browsers except Firefox, which opens a new tag and containing the pdf
file instead.

I was wondering if there is any better solution and I have attach a PDF document as an example of the printing result at https://www.dropbox.com/s/h618ze0d3n8ee4y/Title%20of%20Your%20Event.pdf . You can see the content is on left-up corner and doesn’t fill the whole page

#2

Hello,

We are sorry to hear that you have such issue.

The problems that you had described (header, footer, size) depends not from GroupDocs.Viewer but from your software environment and configuration. When you clicks a “Print” button GroupDocs.Viewer sends a POST HTTP-request to the “document-viewer/GetPrintableHtml” HTTP-handler with current document name. This handler forms a HTML-page dedicated for printing and returns it back to client. Then this page is sent to the printer. If you look at this page, you will see that it is very simple: it contains little CSS code and a set of images, that represents rasterized document pages (one image per one page). And nothing more - no headers, footers and anything like that. There is no problem with size or text positioning on it, because every image is an exact rasterized copy of corresponding page from document.

Header and footer are not “problems” but defined behavior of printing software that handles HTML-page. For example, when I use “Adobe PDF” printing device in modal window, in resulted PDF I also have header and footer, but slightly different (in footer instead of “1 of 1” I have “Стр. 1 из 1” because my default locale is not English, but Russian, and datetime in bottom right corner also has different format). When I select “Send to OneNote 2010” it also adds its own labels (nearly the same as Adobe PDF). And document’s content also is centered for me. So this behavior is defined by programs that handle HTML-page, not by GroupDpocs.Viewer.

The only little modification which GroupDocs.Viewer applies to document for printing, is scaling. When forming an HTML-page for printing, Viewer decrease its scale to the 93% from original. It is done for fixing a bug in Internet Explorer and Google Chrome; these browsers insert empty page after every page of a document.

If you want to print a document with original 100% scale, you may download document as PDF (or send to Adobe PDF while printing), open it in PDF viewer, correct zoom ratio and print.


If you will have more questions please feel free to contact us.


#3

Hi Denis,


Thanks for your explanation about the cause of scaling of printed documents. I enabled ‘UsePdfPrinting’ and I was wondering why it doesn’t print the documents but open a new window in Firefox.