Frequently Asked Question:
Rotated pages do not print?
I have some VB6 code the successfully rotates pages in memory and saves the resulting PDF back to the original file. When I then use Quick PDF to print that document, it shows the original orientation. I am trying to rotate even pages so that the person looking at the printed document can just filp the page (in landscape) to see the reverse side.
I am using 7.22 BETA (but the issue exists in 7.19 also). Running on Windows 2000 Professional and the code is VB 6 ... see below:
Dim Result As Long
Dim QuickPDF As QuickPDFAX0722.PDFLibrary
Set QuickPDF = CreateObject("QuickPDFAX0722.PDFLibrary")
Dim startPage As Integer
Dim EndPage As Integer
startPage = 1
Call QuickPDF.SetGDIPlusFileName(App.Path & "\GDIPLUS.DLL")
Call QuickPDF.SetGDIPlusOptions(0, 0)
Call QuickPDF.SetGDIPlusOptions(1, 0)
Call QuickPDF.SetGDIPlusOptions(2, 0)
If QuickPDF.UnlockKey(KEY) = 1 Then
Result = QuickPDF.LoadFromFile(pdfFile)
Call QuickPDF.SetNeedAppearances(1)
rotateEvenPages(pdfFile)
docPages = QuickPDF.PageCount
printerName = QuickPDF.GetDefaultPrinterName
printerOptions = QuickPDF.PrintOptions(0, 1, QuickPDF.GetDocumentFileName)
Result = QuickPDF.PrintDocument(printerName, 1, docPages, printerOptions)
End If
Public Static Sub rotateEvenPages(ByVal pdfFile As String)
Dim Result As Long
Dim QuickPDF As QuickPDFAX0722.PDFLibrary
Set QuickPDF = CreateObject("QuickPDFAX0722.PDFLibrary")
Dim startPage As Integer
Dim EndPage As Integer
startPage = 1
Call QuickPDF.SetGDIPlusFileName(App.Path & "\GDIPLUS.DLL")
Call QuickPDF.SetGDIPlusOptions(0, 0)
Call QuickPDF.SetGDIPlusOptions(1, 0)
Call QuickPDF.SetGDIPlusOptions(2, 0)
If QuickPDF.UnlockKey("jf6jp55o4f38ub4hj6m18jb9y") = 1 Then
Result = QuickPDF.LoadFromFile(pdfFile)
Dim numberOfPages As Long
Dim fieldMaxLen As Long
Dim fieldWidth As Double
Dim fieldHeight As Double
Dim fontSize As Long
Dim textForFieldLen As Long
Dim textForField As String
Dim fieldName1 As String
Dim currentFieldTextSize As Double
Dim numberOfChars As Double
Dim fVal As String
Dim x As Long
numberOfPages = QuickPDF.PageCount
If numberOfPages > 1 Then
For x = 2 To numberOfPages Step 2
Result = QuickPDF.SelectPage(x)
QuickPDF.UpdateAppearanceStream (Result)
Result = QuickPDF.RotatePage(270)
QuickPDF.UpdateAppearanceStream (Result)
Result = QuickPDF.SaveToFile(pdfFile)
Next x
End If
End If
End Sub
Thanks for reporting this issue. I'm happy to report that it has been fixed and the fix was included in the 7.22 beta 2 release and will be included in all versions from 7.22 onwards.