[#Form: Sales Color] Add : Button : InvPDF [Button : InvPDF] Title : "Save As PDF" Key : Alt + F Action : call : SaveAsPDF [Function : SaveAsPDF] Variable : PrintFileName : String 500 : SET : PrintFileName : $$String:"C:\Accounts\" + $$String:$PartyLedgerName 600 : SET : SVExportFormat : $$SysNameDF 800 : SET : VCHPrintJurisdiction : "QUEPEM" ;If $$IsEmpty@DSPJurisdictionValue Then ##SAJurisdiction Else @@DSPJurisdictionValue 900 : SET : SVPrintMode : "Neat Mode" 940 : SET : SVPrinterName : "A5 PDF Printer" 950 : SET : SVPaperSize : "A5" ;1000 : SET : SAHeight : 8.25 ;11.69 ;1100 : SET : SAWidth : 5.875 ;8.27 1200 : SET : SASpace : 0.25 1300 : SET : SASpaceLeft : 0.50 1400 : SET : SVPrintFileName : $$MakeExportName:##PrintFileName:##SVExportFormat 1500 : SET : SVOpenFileAfterExport : No 1600 : EXPORT REPORT :.: TRUE 1700 : Log : $$LastResult 1800 : Return [#Report: Printed Invoice] Print SET : SVPrinterName : "A5 PDF Printer" SET : SVPaperSize : If $$IsSales:##VchType Then "A5" Else "A4" SET : SVBrowserWidth : If $$IsSales:##VchType Then "5.875" Else "8.27" ;5.875 ;8.27 SET : SVBrowserHeight : If $$IsSales:##VchType Then "8.25" Else "11.69" ;8.25 ;11.69 Document Properties once saved shows A4 even created dummy printer with A5 as default page