<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Print/Save to PDF Issue in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/print-save-to-pdf-issue/m-p/3504366#M135975</link>
    <description>&lt;P&gt;UPDATE:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to remove the "Rely on system fonts only; do not use document fonts" error&amp;nbsp;by simply configuring my printer so that this box is always unchecked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now when I SubmitPrint() I do not receive an error but the Save As... dialog box comes up which I would like to avoid.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try PrintToFile("filename") I get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Acrobat could not open '[name of file]' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To create an Adobe PDF document, go to the source application. Then print the document to Adobe PDF."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, any help would be greatly appreciated. Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jun 2012 13:27:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-06-18T13:27:36Z</dc:date>
    <item>
      <title>Print/Save to PDF Issue</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/print-save-to-pdf-issue/m-p/3502788#M135974</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am simply trying to print or save an Inventor .DWG file to a .PDF file via C# - the issue being that the .PDF page size must correspond to the active sheet size in Inventor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try printing to a PDF using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;oPrint.Printer = "Adobe PDF";&lt;/P&gt;&lt;P&gt;oPrint.ScaleMode = PrintScaleModeEnum.kPrintBestFitScale;&lt;/P&gt;&lt;P&gt;oPrint.PaperSize = PaperSizeEnum.kPaperSize11x17;&lt;/P&gt;&lt;P&gt;oPrint.Orientation = PrintOrientationEnum.kLandscapeOrientation;&lt;/P&gt;&lt;P&gt;oPrint.SetSheetRange(1, 1);&lt;/P&gt;&lt;P&gt;oPrint.PrintRange = PrintRangeEnum.kPrintSheetRange;&lt;/P&gt;&lt;P&gt;oPrint.SubmitPrint();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get a message saying I have to uncheck "Rely on system fonts only; do not use document fonts." in the Adobe PDF settings. Is there a way to do this programmatically?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I export to PDF using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TranslatorAddIn PDFAddin = (TranslatorAddIn)instance.ApplicationAddIns.get_ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}");&lt;/P&gt;&lt;P&gt;TranslationContext oContext = instance.TransientObjects.CreateTranslationContext();&lt;/P&gt;&lt;P&gt;oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism;&lt;/P&gt;&lt;P&gt;NameValueMap oOptions = instance.TransientObjects.CreateNameValueMap();&lt;/P&gt;&lt;P&gt;DataMedium oData = instance.TransientObjects.CreateDataMedium();&lt;/P&gt;&lt;P&gt;oOptions.set_Value("Sheet_Range", PrintRangeEnum.kPrintCurrentSheet);&lt;/P&gt;&lt;P&gt;oData.FileName = @"C:\Users\bsmith\Desktop\test.pdf";&lt;/P&gt;&lt;P&gt;PDFAddin.SaveCopyAs(oDoc, oContext, oOptions, oData);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works but I cannot set the PDF page size. Again, is there a way to do this programmatically?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using Inventor 2010, Adobe Acrobat 9 Pro,&amp;nbsp;Windows 7, 64 bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help/suggestions would be greatly appreciated. Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2012 18:22:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/print-save-to-pdf-issue/m-p/3502788#M135974</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-15T18:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Print/Save to PDF Issue</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/print-save-to-pdf-issue/m-p/3504366#M135975</link>
      <description>&lt;P&gt;UPDATE:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to remove the "Rely on system fonts only; do not use document fonts" error&amp;nbsp;by simply configuring my printer so that this box is always unchecked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now when I SubmitPrint() I do not receive an error but the Save As... dialog box comes up which I would like to avoid.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try PrintToFile("filename") I get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Acrobat could not open '[name of file]' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To create an Adobe PDF document, go to the source application. Then print the document to Adobe PDF."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, any help would be greatly appreciated. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2012 13:27:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/print-save-to-pdf-issue/m-p/3504366#M135975</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-18T13:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Print/Save to PDF Issue</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/print-save-to-pdf-issue/m-p/3505044#M135976</link>
      <description>&lt;P&gt;PrintToFile() and SubmitPrint() work fine with &lt;A href="http://www.cutepdf.com/products/cutepdf/writer.asp" target="_self"&gt;CutePDF Writer,&lt;/A&gt; it's free as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Public Sub TrinityCutePDF()
    Set oApp = ThisApplication
    If oApp.ActiveDocument.DocumentType = kDrawingDocumentObject Then
        Dim oDrgDoc As DrawingDocument
        Set oDrgDoc = ThisApplication.ActiveDocument
        Dim oDrgPrintMgr As DrawingPrintManager
        Set oDrgPrintMgr = oDrgDoc.PrintManager
        
        'Printer name
        oDrgPrintMgr.Printer = "CutePDF Writer"
        
        'Paper size, scale and orientation
        oDrgPrintMgr.AllColorsAsBlack = True
        oDrgPrintMgr.ColorMode = kPrintGrayScale
        oDrgPrintMgr.ScaleMode = kPrintBestFitScale
        oDrgPrintMgr.PaperSize = kPaperSize11x17
        oDrgPrintMgr.PrintRange = kPrintAllSheets
        oDrgPrintMgr.Orientation = kLandscapeOrientation
  
        oApp.StatusBarText = "Creating PDF"
        oDrgPrintMgr.SubmitPrint
    End If
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2012 18:24:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/print-save-to-pdf-issue/m-p/3505044#M135976</guid>
      <dc:creator>jdkriek</dc:creator>
      <dc:date>2012-06-18T18:24:35Z</dc:date>
    </item>
  </channel>
</rss>

