Jump to content
Sign in to follow this  
GS VISION

PDF with different encoding

Recommended Posts

I changed the font of the generated PDF files to verdana with encoding cp-1251 and it works perfectly but when I try go generate PDF Invoices or delivery slips via admin panel I get

FPDF error: Undefined font: verdana B 

Share this post


Link to post
Share on other sites

You say it works perfectly but if it doesn't generate invoices or delivery slips what does it actually do perfectly?

Did you add the font to the PDF class?

Share this post


Link to post
Share on other sites

it generates front end PDF files but doesn`t generate admin panel pdf`s

where should it be added?

Share this post


Link to post
Share on other sites

Surprised it works on the front-end! I would try adding it to classes/PDF.php around line 86.

    private static $_fpdf_core_fonts = array('courier', 'helvetica', 'helveticab', 'helveticabi', 'helveticai', 'symbol', 'times', 'timesb', 'timesbi', 'timesi', 'zapfdingbats');

Share this post


Link to post
Share on other sites

man I don`t seem to find it i added it here:

/** @var array Special PDF params such encoding and font */

   private static $_pdfparams = array();
   private static $_fpdf_core_fonts = array('courier', 'helvetica', 'helveticab', 'helveticabi', 

'helveticai', 'symbol', 'times', 'timesb', 'timesbi', 'timesi', 'zapfdingbats', 'verdana', 'verdanab');
   /**
   * Constructor
   */

Share this post


Link to post
Share on other sites

Actually I am using an old version - 1.2.2
Maybe they have changed the file in the new version

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More