- Posts: 30
- Thank you received: 0
OS Property support center
Export PDF file
- Alejandro Usma Vasquez
- Topic Author
- Offline
- Junior Member
-
Less
More
11 years 11 months ago #29980
by Alejandro Usma Vasquez
Export PDF file was created by Alejandro Usma Vasquez
how to insert the logo of the company in export PDF files. And how to change the distribution of information in it.
Thanks
Thanks
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13024
- Thank you received: 1692
11 years 11 months ago #30013
by Mr. Dam
Replied by Mr. Dam on topic Re: Export PDF file
Hi Alejandro,
To add logo into the pdf file, you should use FPDF library (from Configuration > Tab property > Field Select pdf export library)
And then open source code file
root > components > com_osproperty > classes > listing.php
Find
require_once(JPATH_COMPONENT.DS."helpers".DS."pdf".DS."html2fpdf.php");
$pdf=new HTML2FPDF();
$pdf->AddPage();
$pdf->WriteHTML($body);
$pdf->Output($pdf_root.DS.$filename);
//update completed, download it
HelperOspropertyCommon::downloadfile($filename);
and replace by
require_once(JPATH_COMPONENT.DS."helpers".DS."pdf".DS."html2fpdf.php");
$pdf=new HTML2FPDF();
$pdf->AddPage();
$pdf->Image('url',100,10,12,12,'PNG');
$pdf->WriteHTML($body);
$pdf->Output($pdf_root.DS.$filename);
//update completed, download it
HelperOspropertyCommon::downloadfile($filename);
in above code, url is the link of the logo, it's should be png photo, and mod of photo is "indexed color", depend on the width and height size of photo, you can adjust 4 next parameters to the center top of the pdf page.
Good luck
Dam
To add logo into the pdf file, you should use FPDF library (from Configuration > Tab property > Field Select pdf export library)
And then open source code file
root > components > com_osproperty > classes > listing.php
Find
require_once(JPATH_COMPONENT.DS."helpers".DS."pdf".DS."html2fpdf.php");
$pdf=new HTML2FPDF();
$pdf->AddPage();
$pdf->WriteHTML($body);
$pdf->Output($pdf_root.DS.$filename);
//update completed, download it
HelperOspropertyCommon::downloadfile($filename);
and replace by
require_once(JPATH_COMPONENT.DS."helpers".DS."pdf".DS."html2fpdf.php");
$pdf=new HTML2FPDF();
$pdf->AddPage();
$pdf->Image('url',100,10,12,12,'PNG');
$pdf->WriteHTML($body);
$pdf->Output($pdf_root.DS.$filename);
//update completed, download it
HelperOspropertyCommon::downloadfile($filename);
in above code, url is the link of the logo, it's should be png photo, and mod of photo is "indexed color", depend on the width and height size of photo, you can adjust 4 next parameters to the center top of the pdf page.
Good luck
Dam
The following user(s) said Thank You: Alejandro Usma Vasquez
Please Log in or Create an account to join the conversation.
- Ábaco Creación
- Offline
- New Member
-
Less
More
- Posts: 1
- Thank you received: 0
11 years 7 months ago #35233
by Ábaco Creación
Replied by Ábaco Creación on topic Re: Export PDF file
Hi Dam,
Our site is in spanish language, and we need work with specials characters, so we have selected the tcpdf mode in export options.
Is it possible add a logo in this mode?.
We try add the line:
$html2pdf->_drawImage('url');
in th file listing.php, but without success.
Thanks in advance.
Alvaro
Our site is in spanish language, and we need work with specials characters, so we have selected the tcpdf mode in export options.
Is it possible add a logo in this mode?.
We try add the line:
$html2pdf->_drawImage('url');
in th file listing.php, but without success.
Thanks in advance.
Alvaro
Please Log in or Create an account to join the conversation.
Moderators: Mr. Dam, Nguyen Phu Quan
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.