Menu

#1146 Blank page at the end of the PDF file.

v1.0_(example)
open
blankpage (1)
1
2019-08-01
2019-08-01
No

Hi Nicola,

I found the issue with blank page at the end of the dokument.
I debugged it and it looks like it should be removed in tcpdf.php in lines 19724 - 19735:
if (($plendiff > 0) AND ($plendiff < 60)) {
$pagediff = substr($this->getPageBuffer($this->numpages), $this->emptypagemrk[$this->numpages], $plendiff);
if (substr($pagediff, 0, 5) == 'BT /F') {
// the difference is only a font setting
$plendiff = 0;
}
}
if ($plendiff == 0) {
// remove last blank page
$this->deletePage($this->numpages);
}
But in my case $pagediff is string(75) "BT /F1 9.600000 Tf ET BT /F1 12.000000 Tf ET 0.600000 0.600000 0.600000 rg ". If I change
if (($plendiff > 0) AND ($plendiff < 60)) {
to
if (($plendiff > 0) AND ($plendiff < 76)) {
the blank page is not adding at the end of the pdf file.

So my question is: is it possible to change this value in the condition? If there are any reason to keep the current value, could you please to fix it in any other way?

Best regards,
Olena Tatarintseva

Discussion


Log in to post a comment.

MongoDB Logo MongoDB