I have been working on this since my last post and Im afraid I just dont understand what im doing wrong.
To keep things simplified I have utilised the c# sample code based on the “testPage_btn_Click” that comes with PDFCreator.
Within the PrintWindowsTestPage() Method I have substituted the original code for a Revit SubmitPrint() routine as below.
private void PrintWindowsTestPage()
ViewSet ViewSetName = selectViewsData.SelectedViews;
foreach (Autodesk.Revit.DB.View view in ViewSetName) //For the purpose of the test there is only one view in the ViewSet
using (Transaction transaction = new Transaction(m_revitDoc, "Print to PDF"))
PrintManager printManager = m_revitDoc.PrintManager;
printManager.PrintSetup.CurrentPrintSetting = printManager.PrintSetup.InSession;
ViewSheetSetting viewSheetSetting = printManager.ViewSheetSetting;
printManager.CombinedFile = true;
PrintSetup pSetup =printManager.PrintSetup;
PrintParameters pParam = pSetup.CurrentPrintSetting.PrintParameters;
foreach (Autodesk.Revit.DB.PaperSize pSize in printManager.PaperSizes)
if (pSize.Name.Equals("A1"))// Work required to get actual paper size
catch (Exception ex)
The routine prints the document with the required name in the required location but appears to disregard the Print settings set within the Revit print routine.
I have assumed that once the print settings are set within the Revit routine they do not require setting within the pdfCreator routine?
I have tried to omitted the code “printJob.SetProfileByGuid("DefaultGuid");” from the pdfCreator sample and this appears to have no effect.
Do I need to create my own printJob profile?
If so I can see how for example I could change the sheet profile: printJob.SetProfileSetting("PdfSettings.PageOrientation","Landscape");
But for example how would I change the sheet size?
Can anyone identify what I am doing wrong?