- Posts: 48
- Thank you received: 0
Ticket PDF left and right margins
- Web Manager
- Topic Author
- Offline
- Senior Member
-
Less
More
7 years 7 months ago #107098
by Web Manager
Ticket PDF left and right margins was created by Web Manager
I want to reduce the left and right margins on the PDF ticket but I'm not having any luck.
Could you point me in the right direction?
Thanks
Andrew
Could you point me in the right direction?
Thanks
Andrew
Please Log in or Create an account to join the conversation.
- Web Manager
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 48
- Thank you received: 0
7 years 7 months ago #107101
by Web Manager
Replied by Web Manager on topic Ticket PDF left and right margins
I changed the values in the file:
components > com_eventbooking > tcpdf > tcpdf_autoconfig.php
to
if (!defined('PDF_MARGIN_LEFT')) {
define ('PDF_MARGIN_LEFT', 5);
}
if (!defined('PDF_MARGIN_RIGHT')) {
define ('PDF_MARGIN_RIGHT', 5);
}
but it hasn't had any effect. Then again, I'm just guessing at the moment.
It would be great to be able to set the margins of the tickets, invoices etc in the Joomla back-end.
The background image will position correctly in the top left corner, so I'm guessing that starting the actual content there as well shouldn't be difficult even if it's done in different ways.
Thanks
Andrew
components > com_eventbooking > tcpdf > tcpdf_autoconfig.php
to
if (!defined('PDF_MARGIN_LEFT')) {
define ('PDF_MARGIN_LEFT', 5);
}
if (!defined('PDF_MARGIN_RIGHT')) {
define ('PDF_MARGIN_RIGHT', 5);
}
but it hasn't had any effect. Then again, I'm just guessing at the moment.
It would be great to be able to set the margins of the tickets, invoices etc in the Joomla back-end.
The background image will position correctly in the top left corner, so I'm guessing that starting the actual content there as well shouldn't be difficult even if it's done in different ways.
Thanks
Andrew
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
7 years 7 months ago #107120
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Ticket PDF left and right margins
Hi Andrew
Working with PDF is quite difficult, so for this kind of requirement, I would need our support staff to try to make the change until it works
So please submit a support ticket sending us super admin account of the site and tell us exactly what you want to change so that my dev can try to implement the change for you
Regards,
Tuan
Working with PDF is quite difficult, so for this kind of requirement, I would need our support staff to try to make the change until it works
So please submit a support ticket sending us super admin account of the site and tell us exactly what you want to change so that my dev can try to implement the change for you
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Web Manager
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 48
- Thank you received: 0
6 years 10 months ago #116619
by Web Manager
Replied by Web Manager on topic Ticket PDF left and right margins
This is an issue which I've had since using the component and I think I must be missing something really obvious.
In the following file:
components > com_eventbooking > helper > ticket.php
there is the following line of code:
$pdf->SetMargins(PDF_MARGIN_LEFT, 5, PDF_MARGIN_RIGHT);
I want to have the default left and right margins to be 2, so I edit this file and upload it and all is fine.
However because you are constantly offering us great updates, this file is constantly overwritten by the new version, so I download the updated file, overwrite the values and upload the file again.
Whilst this isn't a huge task, I use the component on a few different sites and I can't help but feel there must be a more efficient way of doing this.
Is there a way I can get these values set so that are not overwritten by updates in the future?
Thanks
Andrew
In the following file:
components > com_eventbooking > helper > ticket.php
there is the following line of code:
$pdf->SetMargins(PDF_MARGIN_LEFT, 5, PDF_MARGIN_RIGHT);
I want to have the default left and right margins to be 2, so I edit this file and upload it and all is fine.
However because you are constantly offering us great updates, this file is constantly overwritten by the new version, so I download the updated file, overwrite the values and upload the file again.
Whilst this isn't a huge task, I use the component on a few different sites and I can't help but feel there must be a more efficient way of doing this.
Is there a way I can get these values set so that are not overwritten by updates in the future?
Thanks
Andrew
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
6 years 10 months ago #116621
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Ticket PDF left and right margins
Hi
We don't have it configurable at the moment. However, you can try to implement it using override. See eventbookingdoc.joomservices.com/develop...thods-helper-methods for instructions
If you implement it using override, it won't be lost when you update to future releases of the extension
Regards,
Tuan
We don't have it configurable at the moment. However, you can try to implement it using override. See eventbookingdoc.joomservices.com/develop...thods-helper-methods for instructions
If you implement it using override, it won't be lost when you update to future releases of the extension
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2025 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.