Print Page | Close Window

Does not work AutoRotateCenter (-1)

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3279
Printed Date: 04 Apr 26 at 7:28PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Does not work AutoRotateCenter (-1)
Posted By: Nick
Subject: Does not work AutoRotateCenter (-1)
Date Posted: 07 Mar 16 at 3:15PM

Does not work AutoRotateCenter (-1) in iPrintOptions := QP.PrintOptions(0, -1, ‘’);.

Always returns clockwise instead anticlockwise.

NormalizePage does not give result.

What's the problem?




Replies:
Posted By: Ingo
Date Posted: 07 Mar 16 at 10:05PM
Hi Nick,

perhaps it's better to post the piece of code where these functionality is used.
The value you're using is part of PrintOptions.
In iPrintOptions you'll get an integer value and this integer value you can use as last parameter in PrintDocument and then (processing PrintDocument) you'll see the affect.
If functionality like NormalizePage shall have permanent affect then you should save the file.




-------------
Cheers,
Ingo



Posted By: Nick
Date Posted: 08 Mar 16 at 4:13PM

Hello, Ingo!

 

This is my snippet:

 

Delphi XE7, Win 10;

Delphi 7, Win XP;

Quick PDF Library 11.12 and 11.13

 

CustomPrinter := QP.NewCustomPrinter(ComboBox1.Text);

iPrintOptions := QP.PrintOptions(1, -1, '');

QP.SetupCustomPrinter(CustomPrinter,   1,  Letter);   

QP.PrintDocument(CustomPrinter,  1,  QP.PageCount,  iPrintOptions);

 

Always returns clockwise.

 

It from the ”Debenu Quick PDF Library 11.12 Reference Guide”:

 

AutoRotateCenter:

 0 = Do not rotate pages automatically

1 = Rotate pages to fit on the output medium, and center on the page

-1 = Rotate pages to fit on the output medium, and center on the page

but rotate anticlockwise instead.

 

It from the ”Debenu Quick PDF Library 11.13 Dashboard (4.10)”:

 

/* Create a custom printer and specify your own settings  */

// Load a sample file from the input folder

QP.LoadFromFile(GetInputFolder() + "01_Landscape.pdf", "");

// Create the custom printer

CustomPrinter = QP.NewCustomPrinter("Microsoft XPS Document Writer");

// Setup the settings for the customer printer

// Medium quality

QP.SetupCustomPrinter(CustomPrinter, 5, 2);

// Monochrome

QP.SetupCustomPrinter(CustomPrinter, 6, 1);

// Horizontal Duplex

QP.SetupCustomPrinter(CustomPrinter, 7, 3);

// Configure print options

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

// Print the current document to the default printing

// using the options as configured above

QP.PrintDocument(CustomPrinter, 1, 1, iPrintOptions);

 

Result of the same.

 

Thank you very much.




P.S.


Options with numbers:


QP.PrintDocument(CustomPrinter, 1, QP.PageCount, 115201); // 0 = OK!

QP.PrintDocument(CustomPrinter, 1, QP.PageCount, 115217); // 1 = OK!

QP.PrintDocument(CustomPrinter, 1, QP.PageCount, 115249); // -1 = 1. Why?


Thanks a lot!





Posted By: Ingo
Date Posted: 08 Mar 16 at 8:22PM
Hi Nick,

did you do the three tests with the same document?
My idea:
If the document was initially created with RotatePage 180
and now there are PrintOptions with -1 then it can be rotated
to 90?
Try any editor and open the relevant pdf document...
search for "Rotate...". I think you'll find something?



-------------
Cheers,
Ingo




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk