michaelrsweet / htmldoc

HTML Conversion Software
https://www.msweet.org/htmldoc
GNU General Public License v2.0
206 stars 46 forks source link

Barcode missing #486

Closed wmdhosting closed 1 year ago

wmdhosting commented 2 years ago

We transfered sites to new server installed version. 1.9.15

But barcodes that shows normally on INvoice Html version. does not shows on PDF output..

Any idea how to solve .. debug that..

thx

michaelrsweet commented 2 years ago

@wmdhosting Can you attach sample files along with the command you are using to generate the PDF with HTMLDOC?

What version of HTMLDOC were you previously using?

wmdhosting commented 2 years ago

1.8.28 files.zip

racun1.php is where barcode is shown..

racun_pdf.php is for generating pdf..

michaelrsweet commented 2 years ago

@wmdhosting OK, so there isn't anything obvious there. Any errors showing up in your Apache logs?

What kind of image does the barcode.php script produce? Can you attach a sample image?

wmdhosting commented 2 years ago

Here is sample image from test invoice.. https://moj.wmd.hr/majstor/barcode.php?total=000000000012250&company=MasterWMD&address=master&city=master&zip=545454&poziv_na_broj=1745&invoice_no=1745&godina=22

this is source code. from page where is visible <tr><td align="left"><img src="[barcode.php?total=000000000012250&company=MasterWMD&address=master&city=master&zip=545454&poziv_na_broj=1745&invoice_no=1745&godina=22](view-source:https://moj.wmd.hr/majstor/barcode.php?total=000000000012250&company=MasterWMD&address=master&city=master&zip=545454&poziv_na_broj=1745&invoice_no=1745&godina=22)" width="350" height="103"></td></tr>

when i save it. directly from invoice..
it saves as.. barcode.php.png

barcode php

Apache logs [Tue May 03 10:55:24.012782 2022] [:error] [pid 1986006] [client 109.227.28.155:0] sh: htmldoc: command not found, referer: https://moj.wmd.hr/ [Tue May 03 10:58:05.548250 2022] [:error] [pid 1994065] [client 109.227.28.155:0] sh: htmldoc: command not found, referer: https://moj.wmd.hr/ [Tue May 03 11:00:16.952008 2022] [:error] [pid 1986006] [client 109.227.28.155:0] sh: htmldoc: command not found, referer: https://moj.wmd.hr/

michaelrsweet commented 2 years ago

@wmdhosting The log indicates that your installation of HTMLDOC is not in the path of the Apache process - have you tried adding the full path to the HTMLDOC executable when you run HTMLDOC from your PHP script?

wmdhosting commented 2 years ago

which htmldoc /usr/local/bin/htmldoc

i use that in files. is that OK. or something else..

michaelrsweet commented 2 years ago

@wmdhosting That should work, but something is preventing it from working. Have you tried running the HTMLDOC command from the terminal to see what you get?

wmdhosting commented 2 years ago

we just installed 1.9.11 and works ok. on 1.9.15 does not work..

michaelrsweet commented 2 years ago

Really the only relevant changes between 1.9.11 and 1.9.15 are security changes and removal of the bundled image libraries - you really want to try running the command outside of PHP to determine why 1.9.15 is not working for you.

wmdhosting commented 2 years ago

Must be then.. some security thing...

we did run. some debuging in terminal but didnt get any idea. why barcode not working..

Im ok with this version too for now. thx for help