| Author |
Message |
|
olexandr
|
Post subject: Non-latin (UTF-8 symbols on pdf reports. Posted: Fri Mar 19, 2010 3:05 am |
|
Joined: Fri Mar 19, 2010 2:53 am Posts: 1
|
|
Hello,
I have a problem with unicode characters in pdf reports. Steps to reproduce: 1) Go to Inventory, choose edit. 2) Add some unicode symbols to name (Laser Gun - Planet destroyer ффф) 3) Go to inventory reports, choose inventory list. 4) If you choose PDF version you will see "?" instead of cyryllic letters, in html version everything is ok.
I can reproduce this issue on my setup (2.0) and on your demo system.
Regards,
|
|
 |
|
 |
|
dave
|
Post subject: Re: Non-latin (UTF-8 symbols on pdf reports. Posted: Tue Mar 23, 2010 12:03 pm |
|
Joined: Fri Oct 26, 2007 3:55 pm Posts: 3499 Location: Colorado, US
|
|
The default font used for the reports is not a UTF-8 font. I edited the Inventory List report with the reportwriter tool on the demo site and changed the font to serif (UTF-8 supported) and the UTF-8 fonts are displayed. Dave
|
|
 |
|
 |
|
star5
|
Post subject: Re: Non-latin (UTF-8 symbols on pdf reports. Posted: Thu Mar 25, 2010 2:58 pm |
|
Joined: Thu Mar 25, 2010 2:46 pm Posts: 19
|
|
Hi, Dave:
Where can change the fonts for invoice and order pdf output to support doublebyte characters such as Chinese. Those characters displayed ok within html and they are garbled when output to pdf. Thank you.
Raymond
|
|
 |
|
 |
|
dave
|
Post subject: Re: Non-latin (UTF-8 symbols on pdf reports. Posted: Thu Mar 25, 2010 3:17 pm |
|
Joined: Fri Oct 26, 2007 3:55 pm Posts: 3499 Location: Colorado, US
|
|
You need to edit each report individually. It's time consuming. I plan on editing all of the standard reports and publishing a package in a week or two if you can wait. Dave
|
|
 |
|
 |
|
star5
|
Post subject: Re: Non-latin (UTF-8 symbols on pdf reports. Posted: Thu Mar 25, 2010 4:19 pm |
|
Joined: Thu Mar 25, 2010 2:46 pm Posts: 19
|
|
Thank you for the speedy reply. Yes, I can wait for the change as I am still evaluating and see if phreebooks can replace my long time accounting suite peachtree. By the way, can I have more than 1 output format for invoice? I would like to see if phreebooks can produce 1 format for letter size and 1 for 40 columns receipt printer. Maybe a shortcut POS that link to 40 columns receipt printer under customer is preferable. Thank you.
Raymond
|
|
 |
|
 |
|
dave
|
Post subject: Re: Non-latin (UTF-8 symbols on pdf reports. Posted: Thu Mar 25, 2010 7:59 pm |
|
Joined: Fri Oct 26, 2007 3:55 pm Posts: 3499 Location: Colorado, US
|
|
There is receipt printing capability in R2.0. I have limited testing and forms need to be developed. I was a Peachtree user for many years and developed PhreeBooks just to get away from their 'support' plan and continual high cost. PhreeBooks can do everything Peachtree can (except payroll) and much more.
Dave
|
|
 |
|
 |
|
star5
|
Post subject: Re: Non-latin (UTF-8 symbols on pdf reports. Posted: Fri Mar 26, 2010 7:44 pm |
|
Joined: Thu Mar 25, 2010 2:46 pm Posts: 19
|
|
Hi, Dave:
i don't see the receipt printing option anywhere. Is it hidden somewhere? I think it may be better if there is pos option under customers. The form for POS must be simpler and cleaner. Here is my suggestion. 1: defaults to a cash account which linked to particular gl account 2: the form requires only quantity, sku and price to be entered by cashiers. gl account , project , freight, discount gl can be hidden to pos cashiers. 3: defaults to a preset printer per user profiles or station id (if there is one) 4: prints receipt with a proper format without cashiers intervention.
Thank you.
Raymond
|
|
 |
|
 |
|
dave
|
Post subject: Re: Non-latin (UTF-8 symbols on pdf reports. Posted: Mon Mar 29, 2010 11:14 am |
|
Joined: Fri Oct 26, 2007 3:55 pm Posts: 3499 Location: Colorado, US
|
|
If you edit a form, there is a check box on the page setup that makes the output a sequential output. This is designed to be used for receipt printers. The output function ignores the element placement and generates the output based on the sequence in the field setup page.
Regarding POS, I have the POS functionality in PB but the main issue relates to the journal. POS is nothing more than a sales with immediate receipt of payment. Yes, the screen can be made easier but the core architecture requires that this be two separate operations. I can combine them into a single screen but behind the scenes requires two journal posts. I have set up defaults to handle POS type entry, quickly. With bar codes, you can simply scan items and the data is filled in automatically and a new line is added. Orders can be entered very quickly. Press the payment button and you are ready to receive payment. Regarding printing, this is a web based program therefore there is no ability to print automatically. This is prohibited to prevent rogue spam from generating paper without your permission. You will always need to download the receipt and send the file to a printer. This can be turned into a cron (or directory scan) operation where any file showing up in a certain download directory is automatically printed and deleted. Same function but may induce minor delays in printing.
There are hooks in PB to allow custom forms. A POS form can be created and used in place of the standard form if you don't like what is there.
Dave
|
|
 |
|
 |
|
star5
|
Post subject: Re: Non-latin (UTF-8 symbols on pdf reports. Posted: Mon Apr 19, 2010 8:25 pm |
|
Joined: Thu Mar 25, 2010 2:46 pm Posts: 19
|
|
Hi, Dave:
The updated reports worked for characters such ффф (reported by olexandr) now. However, i am still unable to get chinese characters output to pdf properly. Are there any tweaks within phreebooks or tcpdf for those doublebyte characters? By the way, the database was created with utf8 character set. Thank you.
Raymond
|
|
 |
|
 |
|
dave
|
Post subject: Re: Non-latin (UTF-8 symbols on pdf reports. Posted: Tue Apr 20, 2010 10:27 am |
|
Joined: Fri Oct 26, 2007 3:55 pm Posts: 3499 Location: Colorado, US
|
|
Please post an invoice on the demo site with some Chinese characters and let me know the invoice number, I'll take a look. Dave
|
|
 |
|
 |
|
star5
|
Post subject: Re: Non-latin (UTF-8 symbols on pdf reports. Posted: Tue Apr 20, 2010 11:48 am |
|
Joined: Thu Mar 25, 2010 2:46 pm Posts: 19
|
|
Ok, the invoice # is 20029.
I tested the report for inventory listing and the output was ok with html, but pdf was not. Thank you.
Raymond
|
|
 |
|
 |
|
dave
|
Post subject: Re: Non-latin (UTF-8 symbols on pdf reports. Posted: Tue Apr 27, 2010 4:51 pm |
|
Joined: Fri Oct 26, 2007 3:55 pm Posts: 3499 Location: Colorado, US
|
|
Chinese characters are not printed because the font doesn't support them. If you want to print in Chinese, you need to load the TCPDF font that supports Chinese and then modify the reports to print in that character set. There are instructions on the TCPDF website on how to compile and load Chinese fonts. When you are ready, I will post the code to add the font to the list of available fonts. Dave
|
|
 |
|
 |
|
star5
|
Post subject: Re: Non-latin (UTF-8 symbols on pdf reports. Posted: Thu Apr 29, 2010 2:36 am |
|
Joined: Thu Mar 25, 2010 2:46 pm Posts: 19
|
|
I've added chinese fonts to my testing server. Please let me know how can i include those chinese fonts and make them available for report tools. Thank you.
Raymond
|
|
 |
|
 |
|
dave
|
Post subject: Re: Non-latin (UTF-8 symbols on pdf reports. Posted: Thu Apr 29, 2010 9:14 am |
|
Joined: Fri Oct 26, 2007 3:55 pm Posts: 3499 Location: Colorado, US
|
In your reportwriter language file (/modules/reportwriter/language/en_us/language.php for english), add the following after line 37 from: Code: $Fonts['freeserif'] = RW_FONT_SERIF;
To: Code: $Fonts['freeserif'] = RW_FONT_SERIF; $Fonts['fontfile'] = 'Chinese';
Where fontfile is the filename of the Chinese font in the directory /includes/addons/tcpdf/fonts. The label Chinese can be anything you want. This will make the font appear on the pull down menus for selection in reports and forms. Dave
|
|
 |
|
 |
|
star5
|
Post subject: Re: Non-latin (UTF-8 symbols on pdf reports. Posted: Fri Apr 30, 2010 1:57 pm |
|
Joined: Thu Mar 25, 2010 2:46 pm Posts: 19
|
|
Dave: OK. It works by adding the chinese fonts and code to the language.php. The pdf file is as big as 7M, however. Please consider put these customization (adding codes) on a separated file so the future upgrade won’t overwrite them.
Raymond
|
|
 |
|
 |
|