Simple Invoices logo
    • CommentAuthorantton
    • CommentTimeSep 19th 2007 edited
     permalink
    Hi to everybody,

    I'm having encoding problems when i try to create the PDF, this is the result.
    Notice: iconv() [function.iconv]: Detected an illegal character in input string in /var/www/web8/web/pdf/converter.class.php on line 16

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/web8/web/pdf/converter.class.php:16) in /var/www/web8/web/pdf/destination._http.class.php on line 12

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/web8/web/pdf/converter.class.php:16) in /var/www/web8/web/pdf/destination._http.class.php on line 16

    As i could check around it, and this is what i'm using for:

    BBDD MySQL 5.0.24a with the database in UTF8
    Simpleinvoces Version: 20070829 stable

    I detect that when i put españa in the customers details, it brokes... so i change it to españa and it works properly... but then when i enter again to check for examples the details of my customers and save the changes, the second time the details is changed to UTF8 so then, when i try to create the pdf it brokes in the same way.... it happens with ó, í, á...... ñ and so on....

    Maybe someone have resolved already this problem, but in my cafe i'm unable to do it.

    Thanks for your good and fantastic application.

    Antton
    • CommentAuthorjustin
    • CommentTimeSep 19th 2007 edited
     permalink
    Thanks Antton

    I havent tried using PDF and ó style characters in ages

    I'll try later tonight - when im back on my home pc and let you know

    Anyone else have similar issues?

    Cheers

    Justin
    • CommentAuthorantton
    • CommentTimeSep 20th 2007 edited
     permalink
    Thanks Justin,

    I'll be here... waiting for some answer

    ;)

    Antton
    • CommentAuthoreric
    • CommentTimeFeb 26th 2008 edited
     permalink
    Hi, I have exactly the same problem that above + a problem with sending invoices by mail, answer is

    Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: Input is not proper UTF-8, indicate encoding ! Bytes: 0xA4 0x34 0x32 0x2E in Entity, line: 17 in /home/H2172/esquipulas.fr/gestion/include/pdf/treebuilder.class.php on line 16

    Fatal error: Call to a member function node_type() on a non-object in /home/H2172/esquipulas.fr/gestion/include/pdf/box.php on line 92

    Any solution ? Any answer ?

    Thanks for great script, and hope reading you.
    • CommentAuthorjustin
    • CommentTimeFeb 27th 2008 edited
     permalink
    Thanks Eric & Antton,

    Eric,
    - are you using ISO-8859-1 as your browser character encoding?

    I'm using iso-8859-1 and put all these äãå Ô åæ ó style characters into the notes of an invoice and its printing fine
    - note: using the gnome character map tool to get those characters as there not on my keyboard
    - note: i don't have a great understanding of how all these different character sets play together so that doesn't help this situation to much :)

    can someone try and let me know if you get the same errors as eric and antton

    Cheers

    Justin
    • CommentAuthorjustin
    • CommentTimeFeb 27th 2008 edited
     permalink
    Note:

    for pdf were using tufat's html2pdf, you may want to have a read up on their docs/forum for a solution
    • CommentAuthoreric
    • CommentTimeFeb 27th 2008 edited
     permalink
    Hi Justin thanks for answering.
    My browser is generally automatic detection, and sometimes UTF8, and, as far I know, I don't have any "strange" caracter on my invoices.

    If that can help, I asked to my server admin, who told me that he found on the oficial php website :
    "|If you get this error message: "Notice: iconv(): Detected an illegal character in input string in file.php on line x", and your text or database is likely to contain text copied from Microsoft Word documents, it's very likely that the error is because of the evil 0x96 "long dash" character. MS Word as default converts all double hyphens into this illegal character. The solution is either to convert 0x96 (dash) into the regular 0x2d (hyphen/minus), or to append the //TRANSLIT or //IGNORE parameters (se above)."

    He tried //TRANSLIT or //IGNORE but nothing changed.

    Other point : where can I changed the decimal point (0.00) by a decimal coma (0,00) as we used here ?
    Thanks again,

    Eric
    • CommentAuthorjustin
    • CommentTimeFeb 28th 2008 edited
     permalink
    Hey Eric,

    what language are you using Simple Invoices in ie. english, french, etc..

    i know there was a issue with the norwegian and another lang that had MS style hidden characters in that messed up the login system

    cheers

    justin
    • CommentAuthorjustin
    • CommentTimeFeb 28th 2008 edited
     permalink
    re decimal point stuff

    as yet there is no easy way re change number formatting

    - if you open up the default invoices template (./temnplates/invoices/default/template.tpl) in a text editor and have a look for the number values

    ie.
    {$invoiceItem.tax_amount|number_format:2}

    you will see it uses phps number_format

    if you go to http://au2.php.net/number_format you can find out how to replace . with , etc..

    just has to be done manually for now till i look at using a proper internationalisation system to do it all automatically

    cheers

    justin
    • CommentAuthoreric
    • CommentTimeFeb 28th 2008 edited
     permalink
    Hi Justin, french. It do not seems to be linked to the lang file, I tried with english option and have the same problem.
    Decimal format ok, I noticed. Thanks.
    • CommentAuthoreric
    • CommentTimeMar 2nd 2008 edited
     permalink
    Hi again, about exporting pdf problem above, I just understood it came from use of € symbol in invoice template. With the $ it's fine. Looking for a way to fix that.
    • CommentAuthorjustin
    • CommentTimeMar 2nd 2008 edited
     permalink
    Thanks Eric

    I'll test with Euro symbol to

    let me know if you find a solution

    note: you may want to download the latest release there has been some mods to the PDF system

    Cheers

    Justin
    • CommentAuthorjustin
    • CommentTimeMar 19th 2008 edited
     permalink
    Hey Eric,

    can you try changing the font of the invoice template to Arial

    edit ./templates/invoices/default/style.css

    from
    body { background: white; color: black; font-style: normal; font-size: 12pt; font-family: Veranda, San-Serif, Arial; }
    to
    body { background: white; color: black; font-style: normal; font-size: 12pt; font-family: Arial; }

    and see if that works with Euro symbol

    let us kow how you go

    Cheers

    Justin
  1.  permalink
    I have also same error and i noticed that:

    1. it is completely about special characters in our alphabet. (non-latin characters such as öç?ü?)
    2. PDF export function doesnt work if there is any non-latin characters in Billers' details or Costumers' details or description in invoce or item name in invoice or any other title which comes from language file.
    3. I edited font as arial but doesnt work.
    4. I edited UTF-8//IGNORE but it doesnt work.

    PS. all the other formats (quickview, xls, doc) working fine so i no need the PDF version but i need to email the invoice to the costumer. But The email function only uses PDF format as attachment so i am not able to send email to my costumers. So is there any way to send any other format as attachment.
    • CommentAuthorjustin
    • CommentTimeSep 4th 2008
     permalink
    Thanks Don,

    re email as another format
    - there has been some discussions of late here in the forums about getting this working
    - im not a fan of inline html in the email to display invoice detail as each email client renders html differently
    - this is still a work-in-progress

    re PDF
    - we use tufats.com html2pdf as our PDF maker
    -- http://www.tufat.com/s_html2ps_html2pdf.htm

    if you could have a quick search through their forum http://forum.tufat.com/forumdisplay.php?f=58
    - ive had a search but can't anything to useful

    let us know if you find out any info

    Cheers

    Justin
    • CommentAuthorjustin
    • CommentTime2 days ago
     permalink
    Hi Guys,

    i've made some adjustments to our utf8/pdf system

    can you guys log into the demo site http://www.simpleinvoices.org/demo and create a few invoices using non-latin characters and let me know how you go with PDF

    Cheers

    Justin