Hi, I want to know how to change the font size of the body text in pdf files. I saw that there are options for the header and footer but there is no this option for the body of the document.
I read that the size of the text are taken directly from the html code of the page article but I would like to have two different sizes (one for the article and for the pdf document)
How can I get this? I can change any file or css?
Let me know, thanks for the support
Font Size content Pdf document
-
- Phoca Newbie
- Posts: 7
- Joined: 21 May 2016, 16:59
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Font Size content Pdf document
Hi, PDF documents don't use CSS styles. So this needs to be set directly in html code. It even depends on used font which size the font will be in PDF document.
Or you can try to set it directly in PHP code, in TCPDF library:
administrator/components/com_phocapdf/assets/tcpdf/config/tcpdf_config.php
Jan
Or you can try to set it directly in PHP code, in TCPDF library:
administrator/components/com_phocapdf/assets/tcpdf/config/tcpdf_config.php
Code: Select all
/**
* default main font size
*/
define ('PDF_FONT_SIZE_MAIN', 10);
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 7
- Joined: 21 May 2016, 16:59
Re: Font Size content Pdf document
Hi, thanks for the reply.
I tried to edit the file you have mentioned to me but it seems that does not work.
Instead I changed the file /administrator/components/com_phocapdf/assets/tcpdf/tcpdf.php
and it worked.
Can I use my editing?
Thanks for the support
I tried to edit the file you have mentioned to me but it seems that does not work.
Instead I changed the file /administrator/components/com_phocapdf/assets/tcpdf/tcpdf.php
Code: Select all
// set default font
$this->SetFont($this->FontFamily, $this->FontStyle, $this->FontSizePt = 8);
Can I use my editing?
Thanks for the support
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Font Size content Pdf document
Hi, great to hear it. Yes, this option is OK (directly coded in the library). When making update, don't forget to make a backup of this edited file.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 7
- Joined: 21 May 2016, 16:59
Re: Font Size content Pdf document
Ok, thanks for support.