Hey mates,
i encountered a problem which i can't solve.
Right now i reworked the invoice-PDF module, so it can send e-mails.
For that case, i need to create a PDF on the fly and either store in in the filesystem, or create it from the binary string.
I found the snippet which creates the PDF and everything works fine when i output it with the paramter "I" (default).
As soon as I change the parameter to "F" or "S" (file or string), my PDF file is empty. I can open it (so the structure of the binary code seems to be correct, since it doesn't throw any errors) - but for some reason, my whole content is gone.
Any ideas?
For example, i'm trying this:
This returns the binary-code of the PDF
Right now, when i try to create it with:
its just empty. Any ideas?
sigh ...
i encountered a problem which i can't solve.
Right now i reworked the invoice-PDF module, so it can send e-mails.
For that case, i need to create a PDF on the fly and either store in in the filesystem, or create it from the binary string.
I found the snippet which creates the PDF and everything works fine when i output it with the paramter "I" (default).
As soon as I change the parameter to "F" or "S" (file or string), my PDF file is empty. I can open it (so the structure of the binary code seems to be correct, since it doesn't throw any errors) - but for some reason, my whole content is gone.
Any ideas?
For example, i'm trying this:
PHP Code:
$output = $oPdf->output(OX_BASE_PATH."/tmp/".$sFilename, 'S');
Right now, when i try to create it with:
PHP Code:
file_put_contents($filename, $output);
sigh ...