webERP Forum
PDF Print to folder - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1)
+--- Forum: Development Discussion & Specification (http://www.weberp.org/forum/forumdisplay.php?fid=10)
+--- Thread: PDF Print to folder (/showthread.php?tid=2647)



PDF Print to folder - daveparrish - 12-18-2015

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


RE: PDF Print to folder - daveparrish - 12-18-2015

I got it here is the code
$pdf->Output('C:/inetpub/webERP/docs/invoices/'.$_SESSION['DatabaseName'] . '_' . $InvOrCredit . '_' . $FromTransNo . '.pdf','F');