Jump to content
  • 0

Invoice Logo Is Uploaded, But Not Showing


yngens
 Share

Question

Invoice Logo is uploaded, but is not showing. I tried to upload files in different formats and can see the files in 

 

ls -l /home/username/public_html/uploads/1/invoices

 

total 64

-rw-r--r-- 1 username username  8299 May 11 21:26 inv_logo.jp2

-rw-r--r-- 1 username username 11736 May 11 21:15 inv_logo.jpg

-rw-r--r-- 1 username username  1874 May 11 21:06 inv_logo.png

-rw-r--r-- 1 username username 36400 May 11 21:23 inv_logo.tiff

 

but none of them showing in PDF.

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

Does a thumbnail of the image appear on the /settings/company/billing/customization/ page? Is the uploads directory (/settings/system/general/basic/) writable? Is the GD extension available in php?

 

No, there is no any thumbnail of the image on /settings/company/billing/customization/ page 

Yes, the upload directory is writable and in fact, as I mentioned earlier, I can see the file has been uploaded to /home/username/public_html/uploads/1/invoices:

 

ls -l /home/username/public_html/uploads/1/invoices

 

total 64

-rw-r--r-- 1 username username  8299 May 11 21:26 inv_logo.jp2

-rw-r--r-- 1 username username 11736 May 11 21:15 inv_logo.jpg

-rw-r--r-- 1 username username  1874 May 11 21:06 inv_logo.png

-rw-r--r-- 1 username username 36400 May 11 21:23 inv_logo.tiff

 

And yeas php GD in installed:

 

yum install php-gd

Loaded plugins: fastestmirror, priorities

Loading mirror speeds from cached hostfile

 * base: mirrors.usc.edu

 * updates: mirror.san.fastserv.com

36 packages excluded due to repository priority protections

Setting up Install Process

Package php-gd-5.3.3-27.el6_5.i686 already installed and latest version

Nothing to do

Link to comment
Share on other sites

  • 0

Have you tried to see if *any* image will appear in the background besides your new invoice logo? Even something small, like a logo image, should appear at the top left of the PDF.

 

Unfortunately, nothing seems to appear. Can this issue about the method PDF is generated? Maybe I nee to try another method?

Link to comment
Share on other sites

  • 0

Any more advices on this? I tried all possible ways including reformatting the logo in different formats: png, tiff, jpg. Still no joy. So I start thinking that the script on my server which is responsible  for generating PDF is missing something and would like to re-install it. But only if I knew which script or program, Blesta doesn't tell. 

Link to comment
Share on other sites

  • 0

Are there any functions excluded via your php.ini file? TCPDF is pretty stand-alone, except for utilizing GD when necessary. Haven't heard of anyone else having this issue who had GD working.

 

Nop, no any exclusions, it is pretty much standard stack CentOS 6.5 distro. To be exact:

cat /etc/*release*
CentOS release 6.5 (Final)
LSB_VERSION=base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarch
cat: /etc/lsb-release.d: Is a directory
CentOS release 6.5 (Final)
CentOS release 6.5 (Final)
cpe:/o:centos:linux:6:GA

Running  'php -i | grep GD' gives:

GD Support => enabled
GD Version => bundled (2.0.34 compatible)

After reading your comment I was not sure if TCPDF was part of php-gd or was I supposed to have TCPDF installed additionally (no instructions on this in the Blesta tutorials, btw), but I went ahead and installed it anyway per http://www.tcpdf.org/installation.php and now running 'php -i | grep tcpdf' gives:

PWD => /var/www/tcpdf
_SERVER["PWD"] => /var/www/tcpdf

Anyway, no luck in getting the logo in the pdf files. Should I try to install Imagick?

Link to comment
Share on other sites

  • 0

Nop, no any exclusions, it is pretty much standard stack CentOS 6.5 distro. To be exact:

cat /etc/*release*CentOS release 6.5 (Final)LSB_VERSION=base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarchcat: /etc/lsb-release.d: Is a directoryCentOS release 6.5 (Final)CentOS release 6.5 (Final)cpe:/o:centos:linux:6:GA
Running 'php -i | grep GD' gives:

GD Support => enabledGD Version => bundled (2.0.34 compatible)
After reading your comment I was not sure if TCPDF was part of php-gd or was I supposed to have TCPDF installed additionally (no instructions on this in the Blesta tutorials, btw), but I went ahead and installed it anyway per http://www.tcpdf.org/installation.php and now running 'php -i | grep tcpdf' gives:

PWD => /var/www/tcpdf_SERVER["PWD"] => /var/www/tcpdf
Anyway, no luck in getting the logo in the pdf files. Should I try to install Imagick?

can you PM your logo to test it in our Blesta Dev?

Or open your logo image with an image editor and save it in .jpg format (do it even if you have already a .jpg image just save with anouther name) then upload the image and it will be resolved :)

Sometimes images that have an extension defined are not in that format and can cause erros.

For exemple if you have a .bmp or .gif image and you only change the extension to .jpg it dosent format the image but you can still open without problems :)

Im 80% sure that is the problem ;)

Link to comment
Share on other sites

  • 0

can you PM your logo to test it in our Blesta Dev?

Or open your logo image with an image editor and save it in .jpg format (do it even if you have already a .jpg image just save with anouther name) then upload the image and it will be resolved :)

Sometimes images that have an extension defined are not in that format and can cause erros.

For exemple if you have a .bmp or .gif image and you only change the extension to .jpg it dosent format the image but you can still open without problems :)

Im 80% sure that is the problem ;)

 

Unfortunately, saving the logo with .jpg extension and uploading didn't resolve the issue. I've also tried to upload Blesta logo - it just doesn't take it. But the files are uploaded fine, I can see them through SSH. It's just pdf is failing to be generated together with the logo.

 

I've PMed the logo to you.

Link to comment
Share on other sites

  • 0

This is a confirmed bug (by me, an i also tested on yngens blesta instalation) in the latest Blesta 3.2

 

Here is how to reproduce it:

 

If you have alredy installed like me, and alredy had setup a logo in settings->company->billing->customization, just click on the X to remove the logo and save

 

1º - You will see the first bug, that the "no image" error is shown

2º- In database the "Table: company_settings, Key: inv_logo, company_id: 1 Value: " that the value still exists and is not cleaned

 

Now trie to upload an image in a diferent extension, for exemple, if you had befor a .JPG file, trie to upload a .PNG file, it will upload the file, but it will not update the database value key entrie and so it will not show the logo, and also no error message :)

 

 

Here is how to quick fix it until Blesta fixes it ;)

 

Here is how to you make it work for now until Blesta fix it:

 

Open your blesta database in phpMyAdmin, click on the top click on the top right click on "SQL" and put this code

 
Change below "[your root path]" with your root path to uploads directory, and also change the image extension to outher than .png if you have anouther type of image:
 
UPDATE `company_settings` SET `value` = '/[your root path]/uploads/1/invoices/inv_logo.png' WHERE `company_settings`.`key` = 'inv_logo';

now execute.

 

Finally go in FTP and see if there is a logo named "inv_logo.png" in the folder /[your root path]/uploads/1/invoices/uploads/1/invoices/, if not, save your logo as png, rename it to "inv_logo.png" and upload.

 

For now its fixed :)

 

 

Paul/Tyson/Cody do you need  a new Bug tread opened or this is fine? :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...