Print Page | Close Window

Print Landscape

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=2707
Printed Date: 20 May 24 at 1:00AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Print Landscape
Posted By: BASSIES
Subject: Print Landscape
Date Posted: 15 Aug 13 at 12:59PM
Hello,

With this code i can print a pdf , but it is in landscape.

Now is print a half document , what do i change in the code to print landscape?

 This function prints a document

        ' Setup general parameters
        Dim fileName As String = "C:\VTS\Hello.pdf"

        ' Load the document that you want to print into memory
        Dim docID As Integer = QP.LoadFromFile(fileName, "")

        ' Set the paramters for the PrintDocument function
        Dim PrinterName As String = QP.GetDefaultPrinterName()
        Dim StartPage As Integer = 1
        ' Set first page number
        Dim EndPage As Integer = QP.PageCount()
        ' Set last page number
        ' Set the paramters for the PrintOptions function
        Dim PageScaling As Integer = 0
        Dim AutoRotateCenter As Integer = 0
        Dim Title As String = fileName

        ' Assign the options for printing to an int variable
        Dim Options As Integer = QP.PrintOptions(PageScaling, AutoRotateCenter, Title)

        ' Print the document with the required paramters and options specified
        QP.PrintDocument(PrinterName, StartPage, EndPage, Options)

        ' Remove document from memory
        QP.RemoveDocument(docID)



Replies:
Posted By: BASSIES
Date Posted: 15 Aug 13 at 1:07PM
Found it 

Dim AutoRotateCenter As Integer = 1



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