- Posts: 157
- Thank you received: 4
[Solved] PDF Margin
- Baptiste
- Topic Author
- Offline
- Premium Member
-
Less
More
9 years 3 months ago - 9 years 3 months ago #91051
by Baptiste
[Solved] PDF Margin was created by Baptiste
Hi!
I'm using the invoice pdf for sending contract to registrants.
I try to had margin to the text inside the pdf. For the first page, i can had an empty paragraph in order to make "fake" margin, but that tricks doesn't work for next pages (as the contrat can have different lenght, i don't know where to add empty paragraph).
I try to search in the tcpdf_config.php file:
but after changing values, it has no effect... can you advice me what to do?
Thank you very much!
You can see my problem here :
I'm using the invoice pdf for sending contract to registrants.
I try to had margin to the text inside the pdf. For the first page, i can had an empty paragraph in order to make "fake" margin, but that tricks doesn't work for next pages (as the contrat can have different lenght, i don't know where to add empty paragraph).
I try to search in the tcpdf_config.php file:
Code:
define ('PDF_MARGIN_HEADER', 5);
and
define ('PDF_MARGIN_TOP', 27);
but after changing values, it has no effect... can you advice me what to do?
Thank you very much!
You can see my problem here :
Last edit: 9 years 3 months ago by Baptiste. Reason: Solved
Please Log in or Create an account to join the conversation.
- Baptiste
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 157
- Thank you received: 4
9 years 3 months ago #91430
by Baptiste
Replied by Baptiste on topic PDF Margin
Hi!
As this is a real need for me (user documents are cutted, because of printer margin) can you please reply to my question?
Thank you verymuch!
As this is a real need for me (user documents are cutted, because of printer margin) can you please reply to my question?
Thank you verymuch!
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
9 years 3 months ago #91488
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic PDF Margin
Hi
Could you please attach a sample invoice here so that we can take a look and find a solution?
Tuan
Could you please attach a sample invoice here so that we can take a look and find a solution?
Tuan
Please Log in or Create an account to join the conversation.
- Baptiste
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 157
- Thank you received: 4
9 years 3 months ago - 9 years 3 months ago #91495
by Baptiste
Replied by Baptiste on topic PDF Margin
Hi Tuan,
Yes of course, here you are.
I use the invoice for contract, that's why i need more than one page.
Thank you!
Yes of course, here you are.
I use the invoice for contract, that's why i need more than one page.
Thank you!
Last edit: 9 years 3 months ago by Baptiste. Reason: pdf not allowed --> zip file
Please Log in or Create an account to join the conversation.
- Baptiste
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 157
- Thank you received: 4
9 years 3 months ago #91615
by Baptiste
Replied by Baptiste on topic PDF Margin
Hi Tuan,
Sorry to come back, but did you saw my attached file?
Thank you for your help! Have a good week-end!
Baptiste
Sorry to come back, but did you saw my attached file?
Thank you for your help! Have a good week-end!
Baptiste
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
9 years 3 months ago #92093
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic PDF Margin
Hello
Below are the changes we made:
1. Open the file components/com_eventbooking/helper/helper.php
2. Find the method generateInvoicePDF
3. Inside that method, find this line of code:
4. Change it to:
Regards,
Tuan
Below are the changes we made:
1. Open the file components/com_eventbooking/helper/helper.php
2. Find the method generateInvoicePDF
3. Inside that method, find this line of code:
Code:
$pdf->SetMargins(PDF_MARGIN_LEFT, 0, PDF_MARGIN_RIGHT);
4. Change it to:
Code:
$pdf->SetMargins(PDF_MARGIN_LEFT, 20, PDF_MARGIN_RIGHT);
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Baptiste
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 157
- Thank you received: 4
9 years 3 months ago #92141
by Baptiste
Replied by Baptiste on topic [Solved] PDF Margin
And that works perfeclty, thank you very much!
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
9 years 3 months ago #92153
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic [Solved] PDF Margin
Great. Thanks for confirming
Tuan
Tuan
Please Log in or Create an account to join the conversation.
- Stephan Hodges
- Offline
- Premium Member
-
Less
More
- Posts: 146
- Thank you received: 11
9 years 3 months ago #92175
by Stephan Hodges
Replied by Stephan Hodges on topic [Solved] PDF Margin
Tuan,
Will you be putting in a permanent change to the next release, along with a settings to allow customization from the admin UI?
Will you be putting in a permanent change to the next release, along with a settings to allow customization from the admin UI?
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
9 years 3 months ago #92183
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic [Solved] PDF Margin
Hello Stephan
Honestly, this solution is given by a support staff in my team. I haven't looked at the detail yet, but it is very likely I will add it configurable in future releases if it is needed
Will look at it when we come back to work on Tuesday. Having a short holiday here right now
Regards,
Tuan
Honestly, this solution is given by a support staff in my team. I haven't looked at the detail yet, but it is very likely I will add it configurable in future releases if it is needed
Will look at it when we come back to work on Tuesday. Having a short holiday here right now
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2026 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.