Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Tue Nov 03, 2015 9:33 am

I have an document print in c# in two PCs.
one in Windows 7 and one in Windows 10.
I found that the print out in Windows 7 is normal,
But that one in Windows 10 is enlarged and the content is out of the boundary

The paper size is 72mm x 200mm and here is the code
Code: Select all

foreach (PaperSize psize in document.PrintDocument.PrinterSettings.PaperSizes)
{
    if (psize.PaperName.Contains("72mm x 200mm"))
    {
        document.PrintDocument.DefaultPageSettings.PaperSize = psize;       
        section.PageSetup.PageSize = new SizeF(psize.Width, psize.Height);
        break;
    }
}
document.PrintDocument.Print();


Is there any solution to solve it?

jdelicense
 
Posts: 4
Joined: Thu Sep 17, 2015 8:57 am

Wed Nov 04, 2015 3:01 am

Hello,

Thanks for your inquiry.
Please provide us with your document to help us do an investigation.
Thanks.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3046
Joined: Wed Jun 27, 2012 8:50 am

Wed Nov 04, 2015 6:24 am

In fact,
I have put a .jpg picture as a logo of the document
The problem does not happen again when i remove the picture.
I wonder the size and the alignment of the picture affects the size of the section.

Therefore I putting the picture into a table and the problem is avoided.

Thanks for your support.

jdelicense
 
Posts: 4
Joined: Thu Sep 17, 2015 8:57 am

Wed Nov 04, 2015 7:35 am

Hi,

Thanks for your message.
Welcome to write to us again if you have further problems. We are here to help you.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3046
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Doc