Font Size content Pdf document

Phoca PDF - creating PDF documents in Joomla! CMS
AchLive
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 21 May 2016, 16:59

Font Size content Pdf document

Post by AchLive »

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

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Font Size content Pdf document

Post by Jan »

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

Code: Select all

/**
	 * default main font size
	 */
	define ('PDF_FONT_SIZE_MAIN', 10);
Jan
If you find Phoca extensions useful, please support the project
AchLive
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 21 May 2016, 16:59

Re: Font Size content Pdf document

Post by AchLive »

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

Code: Select all

// set default font
$this->SetFont($this->FontFamily, $this->FontStyle, $this->FontSizePt = 8);
and it worked.
Can I use my editing?
Thanks for the support
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Font Size content Pdf document

Post by Jan »

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
If you find Phoca extensions useful, please support the project
AchLive
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 21 May 2016, 16:59

Re: Font Size content Pdf document

Post by AchLive »

Ok, thanks for support.
Post Reply