Hi All,
I need a job to extract all Customer invoices, get them on PDF format,
When i click Preview/Print, it's crash after 150 PDFs
Is there any way to extract all Customer invoices on PDF format, and get them saved on System Folder.

I've tried the following code, but it's not working.
I need each Customer invoice in separated folder , AND the name of the invoice = name of PDF File
static void Invoices2PDF(Args _args)
{
CustInvoiceJour custInvoiceJour;
SalesInvoiceJournalPrint salesInvoiceJournalPrint;
Set set = new Set(Types::Record);
SRSPrintDestinationSettings srsPrintDestinationSettings;
while select custInvoiceJour
where custInvoiceJour.dataAreaId == "303"
{
// Add record
set.add(CustInvoiceJour::findRecId(custInvoiceJour.recId));
// Set printer settings
srsPrintDestinationSettings = new SRSPrintDestinationSettings();
srsPrintDestinationSettings.fileFormat(SRSReportFileFormat::PDF);
srsPrintDestinationSettings.fileName(strFmt(@'C:\temp\301\%1',custInvoiceJour.InvoiceId,".pdf"));
//filename =strfmt('C:\\Temp\\Invoices\\%1%2',_custInvoiceJour.InvoiceId,".pdf");
srsPrintDestinationSettings.printMediumType(SRSPrintMediumType::File);
srsPrintDestinationSettings.numberOfCopies(1);
srsPrintDestinationSettings.overwriteFile(true);
// Initalize
salesInvoiceJournalPrint = SalesInvoiceJournalPrint::construct();
salesInvoiceJournalPrint.parmPrintFormletter(NoYes::Yes);
salesInvoiceJournalPrint.parmUsePrintManagement(false);
salesInvoiceJournalPrint.parmPrinterSettingsFormLetter(srsPrintDestinationSettings.pack());
// Print
salesInvoiceJournalPrint.printJournal(set);
info(strFmt("Well saved on folder"));
}
}