Jeiia Posted December 16, 2003 Posted December 16, 2003 Hi, all I have a peculiar problem that I cannot figure out. In Excel I have a procedure that takes defined output range and print this to a pdf-file. The script works fine, the only problem is that the output is rotated 90 degrees to the left! The consequence is that I have to manually errect this by clicking into the file, select rotate and tweak it to the right. This should be very unnecessary! I have tried to alter the output range, changed from landscape to portrait and so on, but with the same result. The script I�ve used is stated below. What I�d like is to build in some sort of control function so that what I see on the screen is in the same form and shape in the pdf output file - which should be landscape and on two pages. Hope you can help� Sub PrintOut() Dim PSFileName As String PSFileName = "C:\abc\myPostScript.ps" ActiveSheet.PrintOut copies:=1, preview:=False, ActivePrinter:="Acrobat Distiller", PrintToFile:=True, collate:=True, PrToFileName:=PSFileName Dim PDFFileName As String PDFFileName = "C:\abc\myPDF.pdf" Dim myPDF As PdfDistiller Set myPDF = New PdfDistiller myPDF.FileToPDF PSFileName, PDFFileName, "" Kill "C:\abc\myPostScript.ps" SourceFile = "C:\abc\myPDF.pdf" Filename = "Test " & ".pdf" FilePath = "C:\abc\" DestinationFile = FilePath & Filename FileCopy SourceFile, DestinationFile Kill "C:\abc\myPDF.pdf" End Sub :confused: :confused: :confused: Quote
Aralius Posted August 31, 2006 Posted August 31, 2006 Did you find and answer? Hello, I am having the same problem you have here did you ever find an answer to get it to rotate back the way it should be? Thanks, Hank.Sutherland@Newellco.com Quote
Jeiia Posted August 31, 2006 Author Posted August 31, 2006 Hello, I am having the same problem you have here did you ever find an answer to get it to rotate back the way it should be? Thanks, Hank.Sutherland@Newellco.com Hi Hank, No, not really. Have not found a way to controll the orientation. But I discovered that the same script gave different results as to orientation on other workstations. Go figure :) Quote
Aralius Posted August 31, 2006 Posted August 31, 2006 orientation If that is the case I wonder if it has something to do with the Adobe settings or Adobe Printer settings on that particular workstation? Quote
WaddellG Posted January 13, 2010 Posted January 13, 2010 Hi, Not sure if this is useful or not but it maybe part of the issue. Unlike Word, Excel etc Acrobat does not base it's page coordinates from the top left of a page but rather from the bottom left. e.g. If I want to put a 3pt * 3pt square shape into word that is 2 pt in and 6pt down I'd use: wdDoc.Shapes.AddTextbox(1, 2, 6, 3, 3).Select() However in Acrobat, I'd have to find the height of the Page, set the top value as the page height - 6, then specify the bottom value as pageheight -9 (6+3) Quote
Recommended Posts