The SimpleInvoices forum has moved to Google Plus - this forum is now read-only
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



    -- update --

    This has been resolved, for the solution refer:

  • 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?


    justin :: Simple Invoices hosting | :: Simple Invoices custom development |
  • 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



  • 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


    justin :: Simple Invoices hosting | :: Simple Invoices custom development |
  • chrisgribbschrisgribbs October 2009

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



  • 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


    justin :: Simple Invoices hosting | :: Simple Invoices custom development |
  • 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


    Justin :: Simple Invoices hosting | :: Simple Invoices custom development |
  • 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:, request: "GET /index.php?module=export&view=invoice&id=1&format=pdf HTTP/1.1", upstream: "fastcgi://", host: "", referrer: "

  • justinjustin November 2009


    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


    justin :: Simple Invoices hosting | :: Simple Invoices custom development |
  • benstbenst December 2009

    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:

  • ssrinissrini December 2009

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

  • justinjustin December 2009


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


    justin :: Simple Invoices hosting | :: Simple Invoices custom development |
  • 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.


  • justinjustin January 2010

    hey jbhewiit and Frank

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

    let us know if this helps


    justin :: Simple Invoices hosting | :: Simple Invoices custom development |
  • 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.


  • 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,


  • jbhewittjbhewitt April 2010

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

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

    I do have simpleinvoices pointing to a virtual domain, like . So I tried adding an alias instead and working directly on the server with 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 ( ) 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

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

    thanks again!!


    justin :: Simple Invoices hosting | :: Simple Invoices custom development |
  • 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?

    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

    === 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

    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


    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 because I want to use the simpleinvoices in my own domain.

    Any tips will be welcome.


  • 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.


  • justinjustin August 2010

    thanks Julio!!!

    will add this info to the FAQs


    justin :: Simple Invoices hosting | :: Simple Invoices custom development |
  • 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

    {ip address of server} localhost 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:

    Try changing some of the 'color' values.


  • 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


    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.


  • mjnshostingmjnshosting December 2011

    The addition of the outside name ( 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!)
  • JohnMCJohnMC March 2012

    i found this thread when troubleshooting a pdf/logo issue i had and i found the loopback idea might of been my answer

    but eventually i discovered that (and sorry if this has been brought up before) images wont show up in pdfs if i have the simpleinvoices directory password protected using .htaccess.

    i'm searching for a workaround, ideas?

  • JohnMCJohnMC March 2012

    Found it! after a little thought i realized this was very simple, just allow your server ip access without password protection. I'm not sure if this has security concerns so buyer beware.

    in my htaccess:

    AuthType Basic
    AuthName "Restricted Access"
    AuthUserFile "/home/****/.htpasswds/public_html/****/passwd"
    require valid-user
    Order Deny,Allow
    Deny from all
    Allow from
    Satisfy Any

    **EDIT** go to add this to common problems wiki... too late... awkward... well it was nice having this chat, we should.. ketchup soon..

  • zarexzarex March 2012

    I fixed this by adding a .htaccess file to the root of the site with these 2 lines:
    php_value allow_url_fopen on
    php_value allow_url_include 1
    and also I install php gd as didnt have it, now I have a logo on my pdf, it seemed to struggle with png so I used a jpg. Awesome product will contribuit in futture, thanks Z

  • JbaugherJbaugher May 2012

    I have tried everything that is in this post with no luck on getting the PDF invoices to look right when I email or just export. When I print they look great. Any Ideas I have tried the .htaccess file but that does not work I have made sure PHP-GD is installed and enabled. Any Ideas???????

  • JbaugherJbaugher May 2012

    Does anyone monitor this post anymore?????

  • mattmatt May 2012

    Yes people read these posts, but other than the ideas expressed in this thread I have no other ideas

    Outback Australia
  • logo not displaying in pdf in the simple invoice for window

  • Hi justin
    you did a great job and I all to credit the contributors who have one way or the other contributed to this software development

    I have fiddled round the software(SI) get more understanding on what and how the program works

    if you check the post up you will see that in the SI for window the logo does not display, but all-said and done i have to make my on contribution to this on going project.

    Anyway all you need to do is to replace the entire contents of PHP folder (C:\Simple Invoices For Windows/php/.....) an newer version of php. Replace( PHP 5.2.17 with 5.3.0) or if you can enable the GD Extension in the older version. Then you Logo will display successfully in PDF.

    Thank you all

  • viktorcheungviktorcheung January 2013


    I am new to Simple Invoice and have no experience in the php.

    I have the same problem of not able to print the logo in the pdf output.

    I understand that to work around is the enable the GD PHP. I would like to know how to install the GD PHP and how to enable it?

    I am using Window version running on Window XP SP3 (running on Window Virtual PC over Window 7 professional 64-bit)

    Thanks for your help.


  • mattmatt January 2013

    Using that pre-assembled version is tricky to change

    You would need to source and then add php_gd2.dll to the
    ...\\Simple Invoices For Windows\php\ext\ directory, and then you need to manually change the PJP.ini in
    ...\\Simple Invoices For Windows\php\
    directory by removing the leading ; (semi-colon) from this line

    Then restart the VM

    Outback Australia
  • viktorcheungviktorcheung January 2013


    I have download the php_gd2.dll from the web and save it in the C:\Program Files\Simple Invoices For Windows\php\ext

    I have modified the php.ini and remove the semi-colon like this one.


    After I restart the VM, the symphon is the same.

    Should I uninstall and install the SI again?


  • viktorcheungviktorcheung January 2013

    I found a strange thing.

    I have removed the ";" in the php.ini.

    When I run SI again, the ";" appear again.

    That means SI will disable the extension again when I run it.

  • mattmatt January 2013

    Are you sure that you saved the php.ini after you made this change?
    What you describe seems unusual and unlikely.

    Outback Australia
  • viktorcheungviktorcheung January 2013

    Hi Matt,

    I have enable the php_gd2.dll.

    But I still cannot get the logo showing in the invoice. A empty square box was result.

    How can I know the php_gd2.dll is actually running?

  • mattmatt January 2013

    check the phpinfo file will detail whether this is running

    Outback Australia
  • ielogicielogic February 2013

    I've had the same problem
    - Uncomment the "extension=php_gd2.dll" line in php.ini (remove ";")
    - Start SI in Windows
    - ";" is put back automatically in php.ini

    I fixed the problem by editing 'php.ini.template' instead. This file seems to be writing php.ini when starting SI. Now php.ini is correct and my logo is appearing correctly in the pdf output.

    Note: I'm using Simple Invoices for Windows