static void PrinttoPDF(Args _args)
{
PurchFormLetter purchFormLetterp;
PrintJobSettings printJobSettings;
VendInvoiceJour vendInvoiceJour;
PrintFormat PrintFormat;
Args args = new Args();
#File
purchFormLetterp = PurchFormLetter::construct(DocumentStatus::Invoice,false);
printJobSettings = new PrintJobSettings();
printJobSettings.setTarget(PrintMedium::File);
// printJobSettings.preferredTarget(PrintMedium::File);
printJobSettings.format(PrintFormat);
printJobSettings.fileName( @'c:\TEMP\myfile2.pdf');
printJobSettings.warnIfFileExists(false);
purchFormLetterp.updatePrinterSettingsFormLetter(printJobSettings.packPrintJobSettings());
select vendInvoiceJour where vendInvoiceJour.Purchid == 'PO/15-16/00421';
// vendInvoiceJour.printJournal(purchFormLetterp);
args.record(vendInvoiceJour);
args.caller(purchFormLetterp);
new MenuFunction(menuitemoutputstr(Purchinvoicecopy), MenuItemType::Output).run(args);
}
{
PurchFormLetter purchFormLetterp;
PrintJobSettings printJobSettings;
VendInvoiceJour vendInvoiceJour;
PrintFormat PrintFormat;
Args args = new Args();
#File
purchFormLetterp = PurchFormLetter::construct(DocumentStatus::Invoice,false);
printJobSettings = new PrintJobSettings();
printJobSettings.setTarget(PrintMedium::File);
// printJobSettings.preferredTarget(PrintMedium::File);
printJobSettings.format(PrintFormat);
printJobSettings.fileName( @'c:\TEMP\myfile2.pdf');
printJobSettings.warnIfFileExists(false);
purchFormLetterp.updatePrinterSettingsFormLetter(printJobSettings.packPrintJobSettings());
select vendInvoiceJour where vendInvoiceJour.Purchid == 'PO/15-16/00421';
// vendInvoiceJour.printJournal(purchFormLetterp);
args.record(vendInvoiceJour);
args.caller(purchFormLetterp);
new MenuFunction(menuitemoutputstr(Purchinvoicecopy), MenuItemType::Output).run(args);
}
No comments:
Post a Comment