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!
Wrong page margin on first page of PDF
-
- Phoca Newbie
- Posts: 4
- Joined: 07 Mar 2012, 13:49
-
- Phoca Hero
- Posts: 2818
- Joined: 28 Nov 2010, 17:20
Re: Wrong page margin on first page of PDF
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
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
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Wrong page margin on first page of PDF
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
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 4
- Joined: 07 Mar 2012, 13:49
Re: Wrong page margin on first page of PDF
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!
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!
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Wrong page margin on first page of PDF
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
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 4
- Joined: 07 Mar 2012, 13:49
Re: Wrong page margin on first page of PDF
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
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
-
- Phoca Hero
- Posts: 2818
- Joined: 28 Nov 2010, 17:20
Re: Wrong page margin on first page of PDF
Hi Anja,
just an idea, as I tried temporary to change the width and height from 300px:
to: 640/480px:
or maybe: width=auto,height=auto
Kind regards
Christine
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.
or maybe: width=auto,height=auto
Kind regards
Christine
-
- Phoca Hero
- Posts: 2818
- Joined: 28 Nov 2010, 17:20
Re: Wrong page margin on first page of PDF
Hi Anja,
sorry, got it wrong, please ignore previous post. By seeing pdf larger, I saw what you mean.
Kind regards
Christine
sorry, got it wrong, please ignore previous post. By seeing pdf larger, I saw what you mean.
Kind regards
Christine
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Wrong page margin on first page of PDF
Hi, thank you for the link, I will take a look at it.
Jan
Jan
If you find Phoca extensions useful, please support the project