Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PDF Print to folder
12-18-2015, 05:44 AM,
#1
PDF Print to folder
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
Reply
12-18-2015, 07:40 AM,
#2
RE: PDF Print to folder
I got it here is the code
$pdf->Output('C:/inetpub/webERP/docs/invoices/'.$_SESSION['DatabaseName'] . '_' . $InvOrCredit . '_' . $FromTransNo . '.pdf','F');
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)