Page 1 of 1

Wrong page margin on first page of PDF

Posted: 22 Jul 2021, 19:10
by pixelhexe
Strange enough - the top margin on the first page is always a little larger (~1 cm) than on further pages. Option in Phoca PDF Content Plugin -> Header > "display header" yes or no does not have any impact.

Header top margin is set to 5 and site margin top is set to 28 - neither these values have any relevance on this phenomenon nor page format or orientation.

Anybody else with this behavior and how to solve it?
Thanks!

Re: Wrong page margin on first page of PDF

Posted: 23 Jul 2021, 12:59
by christine
Hi,

Can be due to various causes, such as: template, browser setting etc. To say ev. more about, we have to see it.

Kind regards
Christine

Re: Wrong page margin on first page of PDF

Posted: 23 Jul 2021, 14:59
by Jan
Hi, as Christine wrote, can you paste here a link to example of such PDF? Does this happen for different PDFs or only for one?

Jan

Re: Wrong page margin on first page of PDF

Posted: 23 Jul 2021, 19:16
by pixelhexe
Thank you, Christine and Jan!

I need it only for one PDF which should be created on this page:

https://www.bagage.de/fort-und-weiterbi ... onologisch

-> "Kursprogramm drucken"

I am afraid then that I caused the bug with my customizations... Actually this is not that important. I thought that it could be a common issue.
Have a nice weekend!

Re: Wrong page margin on first page of PDF

Posted: 24 Jul 2021, 15:44
by Jan
Hi, really hard to give some clue advice. The only one idea I have, is, that maybe before start, some hidden character like space, or empty div is rendered. Did you try to see the HTML source code, if there is no some hidden part on start?

Jan

Re: Wrong page margin on first page of PDF

Posted: 26 Jul 2021, 17:14
by pixelhexe
Hi Jan,

thanks for helping! I am a little step further. It has probably something to to with the content being generated as a TABLE or more concrete, with THEAD tag. The table head is correctly printed on each page. Only the top margin of first page differs from the top margin of further pages.

There is a function setTableHeader() which seems to takes control in the
administrator\components\com_phocapdf\assets\tcpdf\tcpdf.php

But as it's not THAT important ... and my customer is happy as it is ... ;-)
I wan't go any deeper to this.

And I found this old post from 2013 which could be a similar issue:
http://forum.codecall.net/topic/76424-t ... r-the-1st/

Thanx again
Anja

Re: Wrong page margin on first page of PDF

Posted: 26 Jul 2021, 21:51
by christine
Hi Anja,

just an idea, as I tried temporary to change the width and height from 300px:

Code: Select all

.....menubar=no,resizable=yes,width=300,height=300, ....etc.
to: 640/480px:

Image

or maybe: width=auto,height=auto

Kind regards
Christine

Re: Wrong page margin on first page of PDF

Posted: 26 Jul 2021, 22:21
by christine
Hi Anja,

sorry, got it wrong, please ignore previous post. By seeing pdf larger, I saw what you mean.
Kind regards
Christine

Re: Wrong page margin on first page of PDF

Posted: 27 Jul 2021, 15:09
by Jan
Hi, thank you for the link, I will take a look at it.

Jan