Logo not showing in pdf invoice [Answered]
  • chrisgribbschrisgribbs October 2009

    Hi I have just started using simpleinvoices. I cannot get an image to display in the pdf invoice.

    It is showing up fine in the print preview?

    Any help is greatly appreciated

    Thanks

    Chris

    -- update --

    This has been resolved, for the solution refer:
    * http://simpleinvoices.org/wiki/logo_not_displaying_in_the_pdf
    * http://simpleinvoices.org/forum/discussion/comment/7952/#Comment_7952
    * http://simpleinvoices.org/forum/discussion/883/logo-not-showing-in-pdf-invoice-issueopen/#Item_21

  • justinjustin October 2009

    hi chris

    just tested on the demo site and the logo appeared on the PDF fine

    are you using one of the logos that come with Simple Invoices or your own?

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • chrisgribbschrisgribbs October 2009

    Its one of my own. This is using the latest version on my own server. m

    As I said its working fine in the print version but not the pdf output?

    It is a jpg file

    Thanks

    Chris

  • justinjustin October 2009

    thanks chris

    can you test using one of the logos that comes with Simple Invoices - just want to see if PDF doesnt like your logo and any logos

    let us know how you go

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • chrisgribbschrisgribbs October 2009

    Hi Justin its not working in using any of the logos that come preinstalled?

    Thanks

    Chris

  • justinjustin October 2009

    thanks chris

    - haven't seen this before
    - i'll try a fresh install on my webserver and see what happens
    -- one thing you can try is to use firebug in firefox and view the html for the img section for the logo in the print preview and see if there is anything weird going ok -ie. spaces/funny characters etc.. that our pdf converter mightn't like

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • justinjustin October 2009

    Hi Chris,

    i've tested this and can confirm that on some servers the logo does not display in the PDF

    there must be a php setting that is stopping this from happening

    i'm still looking into this

    If you find a solution please let us know

    Cheers

    Justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • yhageryhager November 2009

    I am getting the same issue - logos show up fine, but not on the PDF.

    I have complete control on the server - let me know if you want me to test some settings.

  • yhageryhager November 2009

    I see the following error in my log file, not sure if this is related:

    2009/11/19 10:51:36 [error] 21192#0: *203006 FastCGI sent in stderr: "Cannot open
    Notice: Missing AFM file '/var/www/simpleinvoices/library/pdf/fonts/arialuni.afm'; attempting to parse font file '/var/www/simpleinvoices/library/pdf/fonts/arialuni.ttf' directly" while reading response header from upstream, client: nn.nn.nn.nn, server: example.com, request: "GET /index.php?module=export&view=invoice&id=1&format=pdf HTTP/1.1", upstream: "fastcgi://127.0.0.1:7472", host: "example.com", referrer: "http://example.com/index.php?module=invoices&view=manage

  • justinjustin November 2009

    @yhager

    re log error
    - hmm.. this is refering the arial font file and shouldn't mess with the logo in the pdf
    - chmod 777 the fonts folder and retry - normally the pdf system creates is own font files
    - test and let us know how you go

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • benstbenst December 2009

    Hi,
    I'm having the same problem. When i click on the pdf generate icon, it generates an error in the apache log. The PDF looks fine except it doesn't show a logo. I Have the same problem with the example logo's.

    This is the error: Cannot open , referer: http:///invoice/index.php?module=invoices&view=manage

    The png file is readable for everyone. It is clear that apache is unable to open something, but what?

    OS: CentOS 5.4
    PHP 5.2.9
    Apache: 2.2.3

  • benstbenst December 2009

    There seems someone with the same problem who has fixed it, but it didn't work for me:

    http://forum.tufat.com/showthread.php?t=58245

  • ssrinissrini December 2009

    I had the same problem on my Windows 7 machine .. the fix is simple .. localhost does not resolve to 127.0.0.1 due to I guess IPV6 (also in Vista). Just accessed the invoice as http://127.0.0.1/simple instead of http://localhost/simple and it worked. The logo appears in the PDF also now.

  • justinjustin December 2009

    @ssrini

    awesome! - thanks for the update - very handy to know

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • jbhewittjbhewitt January 2010

    just letting you know I'm having the same problem. The apache log shows that the server is accessing the Logo just fine and not reporting any errors though.

    Preview works fine though.

    Running 2010.1 simpleinvoices.

  • kahn39kahn39 January 2010

    Same problem with logo. I just installed 2010.1 after using 2008 for quite awhile. The logo and form look great in 'Preview' and prints great. However when processing to a PDF, no logo AND the format of text is different from the Preview. PDF has all 'Invoice Summary' over the 'Biller' text. In 'Print Preview' 'Invoice Summary' is on the right below the word Invoice.
    In the old version the Preview looked exactly like the PDF. BTW - I'm using the same logo as in the old version.
    I think its in a change in html2pdf.... just a guess.

    Frank

  • justinjustin January 2010

    hey jbhewiit and Frank

    can you try ssrini's suggestion and use http://127.0.0.1 instead of http://localhost

    let us know if this helps

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • kahn39kahn39 January 2010

    Tried that - using the web not local ! Same problem. Also I should add the the 'Export as .doc' creates a .bin file !!! Export as .xls works but no logo and the text is as in the .PDF, Invoice Summary is over Biller.
    I run linux RH, same as I did in 2008 ver. I did NOT perform an upgrade, did a backup of both and edited the the 2010 with my (small amount) data.

    Looks great, logo is only problem.

    Frank

  • kahn39kahn39 January 2010

    New install of ver 2010 /simpleinvoices/mysql/Full_simple_invoices.sql - found some quirks : From 'Money' then 'Invoice' select the PDF icon and a selection of .pdf .xls or .doc appears. Selecting the .doc WILL make a word doc. FROM the 'Quick View' icon then selecting the 'Export as .doc' will try to make a .BIN file !
    Both .xls and both .pdf print the same, no logo and not like the 'Print Preview'.

    Minor bugs expected,

    Frank

  • jbhewittjbhewitt April 2010

    Yer I've upgraded to 2010.2.beta3 and still the same problem.

    Trying it on the server with 127.0.0.1 makes no difference.
    The preview works fine, but the PDF conversion does not.

    I do have simpleinvoices pointing to a virtual domain, like invoices.mydomain.com . So I tried adding an alias instead and working directly on the server with http://127.0.0.1/simpleinvoices with the same result.

    I've scoured the log files of Apache and see no problems with missing files or logo attachments not being found. I'm not that familiar with the html2pdf library and have had a bit of a poke around the past half hour and come up with nothing.

  • jbhewittjbhewitt April 2010

    UPDATE - ok so I was poking around the the PDF library in simpleinvoices and noticed a demo directory.

    Ran the systemcheck ( http://127.0.0.1/simpleinvoices/library/pdf/demo/systemcheck.php ) and found out that PHP-GD was missing.

    So I installed php5 GD library ...
    apt-get install php5-gd

    and viola it worked.

    Just took a little while to figure out. Perhaps a PHP GD checker could be added in the installer/upgrader in future versions of SimpleInvoices to make this dummy proof.

  • justinjustin April 2010

    thanks jbhewitt!!!

    alot of people have been having this problem so great to see a solution

    i've added sys requirements checker to our ideas list
    - http://code.google.com/p/simpleinvoices/wiki/ideas

    i've added this to our faq on the wiki and forum

    thanks again!!

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • consistencyconsistency August 2010

    i still have the problem with the pdf logo.
    i have read the faq and this thead.

    os: debian lenny (vserver)

    all the needed extensions are installed.
    print invoice works
    but no logo in pdf

    i think my special problem is that i use a vserver
    lan in 192.168.x.x network
    debian has a vlan: 172.x.x.x

    i tried to add the domain name in the host file, but no effort.

    i think accessing the pdf over the domain/ip/url is a rather bad approach. i would prefere a simple fileopen from the local path, i think this would work.

    anbody know a solution for this problem?


    ===phpinfo.php
    ---snip----
    gd
    GD Support enabled
    GD Version 2.0 or higher
    FreeType Support enabled
    FreeType Linkage with freetype
    FreeType Version 2.3.7
    T1Lib Support enabled
    GIF Read Support enabled
    GIF Create Support enabled
    JPG Support enabled
    PNG Support enabled
    WBMP Support enabled
    ---snip----

    === systemcheck.php
    XML DOM extension
    Native XML DOM extension found
    Curl PHP Extension
    Found Curl extension version 7.
    allow_url_fopen ini setting
    allow_url_fopen is enabled
    pcre.backtrack_limit ini setting
    pcre.backtrack_limit is greater than 1,000,000
    GD PHP Extension
    GD version 2.0.1+ required for 'imagecreatetruecolor' function to work
    GD JPEG Support
    JPEG support enabled
    GD GIF Support
    GIF support enabled
    GD PNG Support
    PNG support enabled
    Permissions on 'temp' subdirectory
    'temp' subdirectory is fully accessible to the script
    Permissions on 'fonts' subdirectory
    'fonts' subdirectory is readable and executable by the script
    Permissions on Type1 fonts directory
    Type1 fonts directory (c:\gs\fonts\) is missing. You will not be able to generate postscript files.
    Presense of registered TTF files

    a strange thing is, that the check tells me (red color) -> GD PHP Extension. but it is installed.
    i checked the source,

    if (preg_match("/bundled \(([\d\.]+) compatible\)/", $gd_version_string, $matches)) {
    $gd_version = $matches[1];
    } else {
    $gd_version = $gd_version_string;
    };

    returns "2.0 or higher"
    where the warning message is triggered


    edit:
    an option to turn off logo embedding would be cool, so people who have real problems with the pdf logo, could still generate and send out invoices without logo

  • julio.araujojulio.araujo August 2010

    Hi,

    I installed the simpleinvoices in my home PC that is an Ubuntu 9.10 with LAMP and everything works fine, but when I installed in my host server that is Red Hat Enterprise 5.5 the pdf exporting got some issues, when I try to export an invoice to pdf, xls or doc file the invoice lost the logo and also formatting.

    I'm not able to use localhost or 127.0.0.1 because I want to use the simpleinvoices in my own domain.

    Any tips will be welcome.

    Thanks,
    Julio

  • julio.araujojulio.araujo August 2010

    I solved the issue no logo in pdf creating the file .htaccess with following info:
    php_value allow_url_fopen on
    php_value allow_url_include 1
    The file was created inside the path where the htdoc is set, in some case it is in the /var/www, but in my host server it is in my home path at public_html directory.

    I observed that in my local PC the parameter allow_url_fopen is enabled, but in my host server it was disabled, this file .htaccess is used to override this info and put the param allow_url_fopen to enabled.

    I'm very glad because now I can start to use the simpleinvoice in my small business.

    /Julio

  • justinjustin August 2010

    thanks Julio!!!

    will add this info to the FAQs

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • consistencyconsistency September 2010

    changed php.ini to
    Directive Local Value Master Value
    allow_url_fopen On On
    allow_url_include On On

    still no logo :(

    btw: i think it's a suboptimal practice to include the logo file via url, better would be to include it via the regular filesystem. urlopen and urlinclude should be/are disabled an a lot of servers due security issues.

  • marcgoldmarcgold February 2011

    Just wanted to add a little more guidance to this and a little explanation.

    Assuming that GD is installed and is showing up on your phpinfo file ,
    and you have checked that the following is enabled

    allow_url_fopen On On
    allow_url_include On On

    And the logo's and PayPal Link if you use it still dont appear then.....

    The problem is that what ever URL you use to access the Simple Invoice system cannot be resolved by the server itself. This is why using the ip address works.

    We are using the server in a Lan environment with multiple users all that were accessing the server using http://server.domain.local

    the problem was that the Server itself couldnt resolve that address.
    Very quick fix is to add to the hosts file of the server the ip address of the domain name you are using. If your using http://localhost this will also work.

    Therefore add to your hosts file both locally and the server:

    {ip address of server} server.domain.local

    If your working on the server itself add the following
    (DONT ADD IT IF YOUR ACCESSING FROM ANOTHER PC)

    {ip address of server} localhost
    127.0.0.1 localhost

    Remember the URL address you use to access the site MUST be the same as the domain you put in the hosts file.

    This works for both windows servers and linux servers running LAMP.

  • Hi i am having a problem with my pdf, i went a head and entered some info on my application and when i hit print preview the text is only visible very light when print it it doesnt show up. can some one help?

  • @tonybalagio

    Try checking the stylesheet used to generate the invoice.
    It can be found here:
    /sys/templates/invoices/default/style.css

    Try changing some of the 'color' values.

    Matt

  • websituwebsitu October 2011

    Any further on this issue? I am working off my hosting server and have tried everything to get the logo to show on the PDF and still nothing.

  • modirmodir October 2011

    @websitu

    There are now several issues discussed in this thread. It gets too complicated. Please open up another discussion in this forum. Then we can focus on your problem.

    Raffael

  • mjnshostingmjnshosting December 2011

    The addition of the outside name (invoice.domain.com) to the /etc/hosts file for the local IP and/or loop back IP makes PDF generation faster as well as show the pic. Thanks for the fix! In my case the router in our hosted environment is the cause for this it may be different for others.
    Next is to get the darn tick mark (%27) out of the paypal link. I so determined to make this thing work.
    As far as using another product....just do it I would rather make this work cause I love open source community based projects. Im no coder but some of these problems are causing me to learn more about web programming. I still rather a Cisco switch or Open Solaris/Ubuntu server though. :)

    A+,CCENT,CCNA and business owner tired of exporting XLS to PDF to a SMB share and calling it accounting! :)
    Ubuntu 10.04 LTS in VM on Proxmox (sweet!)
  • mjnshostingmjnshosting December 2011

    Another thing I noticed is that this makes the invoice considerably smaller. From 993k to 559K...awesome.

    A+,CCENT,CCNA and business owner tired of exporting XLS to PDF to a SMB share and calling it accounting! :)
    Ubuntu 10.04 LTS in VM on Proxmox (sweet!)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

Categories

Tagged