Results 1 to 4 of 4

Thread: £ Problem in PDF

  1. #1
    jmaskell is offline Member
    Join Date
    Oct 2008
    Posts
    12

    Default £ Problem in PDF

    Hi

    Whenever i go to Print as PDF on a quote i get the odd symbol  before the GBP Symbol ( £ ) in the PDF document.

    Does anyone know the solution to this?

    Attached is a screenshot.


    Any help will be greatly appreciated.

    Thanks A lot


    Jake Maskell
    Attached Images Attached Images  

  2. #2
    ddturbo is offline Sugar Community Member
    Join Date
    Nov 2006
    Posts
    28

    Default Re: £ Problem in PDF

    Hi,

    i solved a similar issue by some changes in quote template

    you may find the templates modules/Quotes/layouts where Standard.php is for quotes

    if you wanna customize your quotes and bills you should have a look at: http://www.sugarcrm.com/wiki/index.p...quote_template


    to fix the problem you have to add

    163=>'sterling'

    to $euro_diff array

    PHP Code:
    $euro_diff = array(
    2=>'Euro',
    163=>'sterling'
    ); 

    Then you have to enclose every string you want the special symbols to be printed with

    PHP Code:
    mb_convert_encoding($here_is_your_string"ISO-8859-1""UTF-8"); 
    ie. pound symbol is in latin1 / iso-8859-1 charset

    so for example:

    PHP Code:
    mb_convert_encoding(format_number($focus->total$locale->getPrecision(), $locale->getPrecision(), $format_number_array)"ISO-8859-1""UTF-8"); 

    This should work. If anyone has some better ideas please tell me.
    I am wondering how to put characters from different charsets into same document (and same string)

    For example something like Ł (polish) and £.

    Deniz

  3. #3
    jmaskell is offline Member
    Join Date
    Oct 2008
    Posts
    12

    Default Re: £ Problem in PDF

    Hi

    Thanks for the quick reply glad someone is willing to help.

    i have added.

    $euro_diff = array(
    2=>'Euro',
    163=>'sterling'
    );

    to " Standard.php "


    But I don't quite understand what you mean by " Then you have to enclose every string you want the special symbols to be printed with "

    Could you please expline in more detail

    sorry im new to Sugar


    Thanks for the help i realy apretiate it.


    Jake Maskell

  4. #4
    ddturbo is offline Sugar Community Member
    Join Date
    Nov 2006
    Posts
    28

    Default Re: £ Problem in PDF

    Hi Jake,

    thats no problem ....

    the template system is using ezPDF for creation of documnets. This has several input methods like addText(), ezTable(), etc...

    you can try this documentation http://www.ros.co.nz/pdf/readme.pdf


    so, for example the grand total is written as a table
    if you go to line 285 in Standard.php there should be declared an array $total

    entries are like $total[<#>]['<rowname>']='<value>'

    now changing line 303 from

    PHP Code:
    $total[3]['VALUE'] =  format_number($focus->total$locale->getPrecision(), $locale->getPrecision(), $format_number_array); 
    to

    PHP Code:
    $total[3]['VALUE'] =  mb_convert_encoding(format_number($focus->total$locale->getPrecision(), $locale->getPrecision(), $format_number_array), "ISO-8859-1""UTF-8"); 
    should do what you are looking for

    Deniz

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 2008-05-28, 07:59 PM
  2. Problem with custom fields in contact module
    By moschap in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2008-05-27, 03:48 PM
  3. Problem with MySQL while installing
    By Yuber in forum General Discussion
    Replies: 3
    Last Post: 2006-02-27, 10:15 AM
  4. Problem with the Upgrade from 351 to 40
    By jalonsoad in forum Help
    Replies: 1
    Last Post: 2005-12-19, 07:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •