Follow Programe Code is PrintFileName is empty
SwModel.Extension.PrintOut2 vPageArray, 1, True, SwDraw.Printer, ""
result is
Manually select the output file PDF file,see picture
if Programe code is PrintFileNmae not Empty
SwModel.Extension.PrintOut2 vPageArray, 1, True, SwDraw.Printer, PrintFileName
Programe Error is
When you create the postscript file, you have to send the main font. Please go to the printer properties "AdobepDF settings" page and deselect the "don't send fonts to Distiller" option
My target is Auto Print Adodb Pdf file.
Thanks .
the programe code is
Sub lll1()
Dim SwDraw As DrawingDoc, SwModel As ModelDoc2
Set SwModel = Application.SldWorks.ActiveDoc
Set SwDraw = SwModel 'Application.SldWorks.ActiveDoc
PdfName = Split(SwDraw.GetTitle, " - ")(0)
FileName = SwDraw.GetPathName
PrintFileName = Left(FileName, InStr(FileName, "SwHG20592") + 8) & "\PDF\" & PdfName & ".Pdf"
Debug.Print PrintFileName
Dim Ps As PageSetup
Set Ps = SwDraw.PageSetup
Ps.Orientation = 2 ' 1=Portrait '2 = Landscape
Dim pageArray(3) As Long
pageArray(0) = 1: pageArray(1) = 1:
pageArray(2) = 1: pageArray(3) = SwDraw.GetSheetCount
Dim vPageArray As Variant
vPageArray = pageArray
''
SwModel.Extension.PrintOut2 vPageArray, 1, True, SwDraw.Printer, PrintFileName
End Sub
Programe Error is
When you create the postscript file, you have to send the main font. Please go to the printer properties "AdobepDF settings" page and deselect the "don't send fonts to Distiller" option
当您创建postscript文件时,您不得不发送主字体。请跳到打印机属性的“AdobepDF设置“页面并取消选择”不要发送字体到Distiller"选项
SolidworksApi macros