webERP Forum

Full Version: PDF Print to folder
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi I have setup weberp to print pdf flies to a folder in the class.pdf.php with this code

function OutputF($DocumentFilename = 'Document.pdf') {
if (($DocumentFilename == null) or ($DocumentFilename == '')) {
$DocumentFilename = _('Document.pdf');
}
$this->Output('C:/inetpub/webERP/docs/' . $DocumentFilename, 'F');

This works all well but what I would like to do is have each document print to different folders like invoices go to a invoices folder.

So in PrintCustTransPortrait.php around line 544 is

$pdf->OutputF($_SESSION['DatabaseName'] . '_' . $InvOrCredit . '_' . $FromTransNo . '.pdf');
I have added this line
$this->Output('C:/inetpub/webERP/docs/invoices/' . $DocumentFilename, 'F');
}

And I am getting errors.
Any help would be greatly appreciated.
Thanks
Dave
I got it here is the code
$pdf->Output('C:/inetpub/webERP/docs/invoices/'.$_SESSION['DatabaseName'] . '_' . $InvOrCredit . '_' . $FromTransNo . '.pdf','F');