I have been attempting to create a pdf for tabloid 11x17 landscape
and I can't get it to work ... it cuts it off every time no matter what the print options are set to ... help !
I have been attempting to create a pdf for tabloid 11x17 landscape
and I can't get it to work ... it cuts it off every time no matter what the print options are set to ... help !
I think there is an issue with PDFCreator and paper sizes.
Nota bene - From Excelguru.ca, there are a few points on using PDF Creator.
http://www.excelguru.ca/node/33
I've tried setting the paper size as done via Excelguru, but also looked into setting the papersize via the Printer object (code below). Unfortunately, when I run this code, the paper size on the printer (according to the debug.print statements) *does* change from A4 to Letter (9 to 1), but the paper size does not when looking at PDFCreator from the Printers And Faxes - PDFCreator - Printer - Properties - Printing Preferences - Advanced button. The 'Paper/Output' paper size still remains at A4. Grrrr.
This was written for VB6, BTW...
Dim p As Printer
Dim OldPrinter As String
For Each p In Printers
If p.DeviceName = "PDFCreator" Then 'or whatever the printer name is...
'Save the old printer reference and create a new one.
OldPrinter = Printer.DeviceName
Set Printer = p
End If
Next p
debug.print Printer.PaperSize
' Add to ensure paper size is correct
Printer.PaperSize = vbPRPSLetter
debug.print Printer.PaperSize
Dim pdfjob As PDFCreator.clsPDFCreator
'Check if PDFCreator is already running and attempt to kill the process if so
Do
bRestart = False
Set pdfjob = New PDFCreator.clsPDFCreator
If pdfjob.cStart("/NoProcessingAtStartup") = False Then
'PDF Creator is already running. Kill the existing process
Shell "taskkill /f /im PDFCreator.exe", vbHide
DoEvents
Set pdfjob = Nothing
bRestart = True
End If
Loop Until bRestart = False
With pdfjob
.cVisible = False
.cOption("PaperSize") = "Letter"
End With