tecnickcom / TCPDF

Official clone of PHP library to generate PDF documents and barcodes
https://tcpdf.org
Other
4.18k stars 1.51k forks source link

Gap in output code #506

Open XTeslaUA opened 2 years ago

XTeslaUA commented 2 years ago

Hi! When I am use $pdf->Output($fileattname, 'E') I see gap in output code in key filename. Bold lower. Is that how it should be? The file does not arrive in the mail when using the code:

$message .= "--{$mime_boundary}".PHP_EOL . chunk_split($pdf->Output($fileattname, 'E')).PHP_EOL .PHP_EOL. "--{$mime_boundary}--";

Content-Type: application/pdf; name="Rachunok_from_www.marazm.org.ua.pdf"

Content-Transfer-Encoding: base64 Content-Disposition: attachment; filen ame="Rachunok_from_www.marazm.org.ua.pdf"

supervirus commented 2 years ago

Just remove the chunk_split around the call to TCPDF. The file data returned is already split in chunks.