Hot to generate font package for Phoca PDF component

Category: Phoca PDF fonts

Phoca PDF font installation file should include TCPDF fonts, so before you will create Phoca PDF font installation file, you need to create TCPDF font(s). Downlload TCPDF library from www.tcpdf.org and create TCPDF font(s). The guide you will find in TCPDF ZIP package file:

tcpdf/fonts/utils/README.TXT file.

After creating TCPDF font(s) you need to create installation XML file, so the font package can be installed in Phoca PDF component. The font installation ZIP file should include all TCPDF font files and installation XML file, e.g. Free Mono font package will include:

  • freemono.php (regular)
  • freemono.xml (installation XML file)
  • freemono.z
  • freemono.ctg.z
  • freemonob.php (bold)
  • freemonob.z
  • freemonob.ctg.z
  • freemonobi.php (bold italic)
  • freemonobi.z
  • freemonobi.ctg.z
  • freemonoi.php (italic)
  • freemonoi.z
  • freemonoi.ctg.z
  • index.html (empty html file)
  • freemono_authors.txt (information about authors of the font)
  • freemono_copying.txt (information about license of the font)
  • freemono_credits.txt (iformation about creadits of the font)

All these files will be zipped in one ZIP installation file - com_phocapdf_freemono.zip.

The installation XML file (freemono.xml) will look like the following code:

<install type="phocapdffonts" version="1.5" client="both" method="upgrade">
    <name>Free Mono</name>
	<tag>freemono</tag>
    <creationDate>01/01/2009</creationDate>
    <author>Jan Pavelka</author>
    <authorEmail></authorEmail>
    <authorUrl>https://www.phoca.cz</authorUrl>
    <copyright>(C) 2008 Jan Pavelka</copyright>
    <license>https://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
	
	<authorFont>see free_AUTHORS.txt and free_CREDITS.txt file in this package</authorFont>
    <copyrightFont>see free_AUTHORS.txt and free_CREDITS.txt file in this package</copyrightFont>
    <licenseFont>see free_COPYING.txt file in this package</licenseFont>
	
    <description>Free Mono Font for Phoca PDF component</description>

    <files>
          <filename>free_AUTHORS.txt</filename>
          <filename>free_COPYING.txt</filename>        
          <filename>free_CREDITS.txt</filename>
		  <filename>freemono.php</filename>
		  <filename>freemono.z</filename>
		  <filename>freemono.ctg.z</filename>
		  <filename>freemonob.php</filename>
		  <filename>freemonob.z</filename>
		  <filename>freemonob.ctg.z</filename>
		  <filename>freemonobi.php</filename>
		  <filename>freemonobi.z</filename>
		  <filename>freemonobi.ctg.z</filename>
		  <filename>freemonoi.php</filename>
		  <filename>freemonoi.z</filename>
		  <filename>freemonoi.ctg.z</filename>
		  <filename>index.html</filename>
    </files>
</install>

 Quick steps:

1) Create TCPDF font files from your font file
2) Create XML installation file
2) Include all TCPDF files, XML installation file and other TXT files into one ZIP installation package.

 

Powered by Phoca