Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > General Discussion
  New Posts New Posts RSS Feed - Printing - Fit Document
  FAQ FAQ  Forum Search   Register Register  Login Login

Printing - Fit Document

 Post Reply Post Reply
Author
Message
davidgm View Drop Down
Beginner
Beginner


Joined: 20 Jul 17
Location: Spain
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote davidgm Quote  Post ReplyReply Direct Link To This Post Topic: Printing - Fit Document
    Posted: 20 Jul 17 at 11:34AM
Hello,

I got a PDF document with a paper size of 140x210mm.

I use the following code to print to A4 (210x297 mm):

                        var custom = QP.NewCustomPrinter("My Printer");
                        var iPrintOptions = QP.PrintOptions(0, 0, "Printing Sample");
                        QP.PrintDocument(custom, 1, 1, iPrintOptions);

The document is printed, and it does not fit the page fully, as expected.

If i try to change the print options, according to the documentation i should set PageScaling to 1 to Fit to Paper:

                        var iPrintOptions = QP.PrintOptions(1, 0, "Printing Sample");

I execute the code, and the document is printed, but, it does not fit the page "correctly".

The size of the document is increased from 140x210 to 210x297, but it is "cropped" to (0,0,140,297), and the area outside this box is white.

Is there a way to fit the document properly to an A4 ?

Thank you very much

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 20 Jul 17 at 12:58PM
Hi David,

option "fit to page" will try to fit all sides
but it will keep always the original aspect ratio.
Due to this it won't be possible to morph 140x210 to 210x297.

Cheers and welcome here,
Ingo


Cheers,
Ingo

Back to Top
davidgm View Drop Down
Beginner
Beginner


Joined: 20 Jul 17
Location: Spain
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote davidgm Quote  Post ReplyReply Direct Link To This Post Posted: 20 Jul 17 at 5:19PM
I understand.

What about if i set a paper size manually, that keeps the original aspect ratio of the document, but fits as max as possible into an A4 ?

Thank you.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 20 Jul 17 at 7:16PM
These two categories will help:
http://www.debenu.com/docs/pdf_library_reference/RenderingAndPrinting.php
http://www.debenu.com/docs/pdf_library_reference/ImageHandling.php
If there are further probs you can search here:
http://www.debenu.com/docs/pdf_library_reference/Search.php

Cheers,
Ingo

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store