[Skip to main content](#vessel-content)

#   could not create pdf invoice

##

- **[Rusty](/forum/user/83085-rusty "View Rusty's Profile")**
- [![Rusty's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/83085-rusty "View Rusty's Profile") Topic Author
- [ Offline](/forum/user/83085-rusty)

Less More

- Posts: 105
- Thank you received: 8
-

1 year 7 months ago [\#366813](#366813) by [Rusty](/forum/user/83085-rusty "View Rusty's Profile")  *[could not create pdf invoice](/forum/35-orders-management/909357-could-not-create-pdf-invoice#366813 "-- HikaShop version -- : 5.1.5  Hi!  I use the pdf plugin. But both - the invoice and delivery note - shows an error. I tried PNG and JPG images - same issue. I can show the logo via direct link in the browser so the path should be correct.")* was created by *[Rusty](/forum/user/83085-rusty "View Rusty's Profile")*

-- HikaShop version -- : 5.1.5

Hi!

I use the pdf plugin. But both - the invoice and delivery note - shows an error.
I tried PNG and JPG images - same issue. I can show the logo via direct link in the browser so the path should be correct.
Code:

2 Unable to get the size of the image [https://website_domain.de/images/logo/logo-xyz-260.png] Call Stack # Function Location 1 () JROOT/plugins/hikashop/attachinvoice/vendor/spipu/html2pdf/src/Html2Pdf.php:1526 2 Spipu\Html2Pdf\Html2Pdf-&gt;_drawImage() JROOT/plugins/hikashop/attachinvoice/vendor/spipu/html2pdf/src/Html2Pdf.php:5782 3 Spipu\Html2Pdf\Html2Pdf-&gt;_tag_open_IMG() JROOT/plugins/hikashop/attachinvoice/vendor/spipu/html2pdf/src/Html2Pdf.php:1444 4 Spipu\Html2Pdf\Html2Pdf-&gt;_executeAction() JROOT/plugins/hikashop/attachinvoice/vendor/spipu/html2pdf/src/Html2Pdf.php:1412 5 Spipu\Html2Pdf\Html2Pdf-&gt;_makeHTMLcode() JROOT/plugins/hikashop/attachinvoice/vendor/spipu/html2pdf/src/Html2Pdf.php:3136 6 Spipu\Html2Pdf\Html2Pdf-&gt;_tag_open_DIV() JROOT/plugins/hikashop/attachinvoice/vendor/spipu/html2pdf/src/Html2Pdf.php:1444 7 Spipu\Html2Pdf\Html2Pdf-&gt;_executeAction() JROOT/plugins/hikashop/attachinvoice/vendor/spipu/html2pdf/src/Html2Pdf.php:1412 8 Spipu\Html2Pdf\Html2Pdf-&gt;_makeHTMLcode() JROOT/plugins/hikashop/attachinvoice/vendor/spipu/html2pdf/src/Html2Pdf.php:5602 9 Spipu\Html2Pdf\Html2Pdf-&gt;_tag_open_TD() JROOT/plugins/hikashop/attachinvoice/vendor/spipu/html2pdf/src/Html2Pdf.php:1444 10 Spipu\Html2Pdf\Html2Pdf-&gt;_executeAction() JROOT/plugins/hikashop/attachinvoice/vendor/spipu/html2pdf/src/Html2Pdf.php:1398 11 Spipu\Html2Pdf\Html2Pdf-&gt;_makeHTMLcode() JROOT/plugins/hikashop/attachinvoice/vendor/spipu/html2pdf/src/Html2Pdf.php:600 12 Spipu\Html2Pdf\Html2Pdf-&gt;writeHTML() JROOT/plugins/hikashop/attachinvoice/attachinvoice.php:1104 13 plgHikashopAttachinvoice-&gt;_Html2Pdf() JROOT/plugins/hikashop/attachinvoice/attachinvoice.php:106 14 plgHikashopAttachinvoice-&gt;_getPDFInvoice() JROOT/plugins/hikashop/attachinvoice/attachinvoice.php:237 15 plgHikashopAttachinvoice-&gt;onHikashopBeforeDisplayView() JROOT/libraries/src/Plugin/CMSPlugin.php:311 16 Joomla\CMS\Plugin\CMSPlugin-&gt;{closure:Joomla\CMS\Plugin\CMSPlugin::registerLegacyListener():295}() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:454 17 Joomla\Event\Dispatcher-&gt;dispatch() JROOT/libraries/src/Application/EventAware.php:111 18 Joomla\CMS\Application\WebApplication-&gt;triggerEvent() JROOT/administrator/components/com_hikashop/helpers/helper.php:2849 19 hikashopView-&gt;display() JROOT/administrator/components/com_hikashop/views/order/view.html.php:30 20 OrderViewOrder-&gt;display() JROOT/libraries/src/MVC/Controller/BaseController.php:697 21 Joomla\CMS\MVC\Controller\BaseController-&gt;display() JROOT/administrator/components/com_hikashop/helpers/helper.php:2601 22 hikashopController-&gt;display() JROOT/administrator/components/com_hikashop/controllers/order.php:305 23 OrderController-&gt;invoice() JROOT/libraries/src/MVC/Controller/BaseController.php:730 24 Joomla\CMS\MVC\Controller\BaseController-&gt;execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2579 25 hikashopController-&gt;execute() JROOT/administrator/components/com_hikashop/hikashop.php:73 26 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71 27 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::{closure:Joomla\CMS\Dispatcher\LegacyComponentDispatcher::dispatch():70}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73 28 Joomla\CMS\Dispatcher\LegacyComponentDispatcher-&gt;dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361 29 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:150 30 Joomla\CMS\Application\AdministratorApplication-&gt;dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:205 31 Joomla\CMS\Application\AdministratorApplication-&gt;doExecute() JROOT/libraries/src/Application/CMSApplication.php:304 32 Joomla\CMS\Application\CMSApplication-&gt;execute() JROOT/administrator/includes/app.php:58 33 require_once() JROOT/administrator/index.php:32

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwOTM1Ny1jb3VsZC1ub3QtY3JlYXRlLXBkZi1pbnZvaWNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

1 year 7 months ago [\#366814](#366814) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[could not create pdf invoice](/forum/35-orders-management/909357-could-not-create-pdf-invoice#366814 "-- HikaShop version -- : 5.1.5  Hi!  I use the pdf plugin. But both - the invoice and delivery note - shows an error. I tried PNG and JPG images - same issue. I can show the logo via direct link in the browser so the path should be correct.")*

Hi,

This indicates that the PHP running on your server does not have permission to access the logo image in order to include it in the PDF.

The first thing to do is to temporarily change the logo to one hosted on another server that you know does not have protection measures against this.

For example, try using this image ( [ www.google.fr/images/branding/googlelogo...t\_color\_272x92dp.png](https://www.google.fr/images/branding/googlelogo/2x/googlelogo_light_color_272x92dp.png) ), which is Google's logo.

If it works with the Google logo but not with your own, it's likely that your site’s &#96;.htaccess&#96; file (or another system like ProxyShield: [ forums.phpfreaks.com/topic/162357-solved...-that-a-browser-can/](https://forums.phpfreaks.com/topic/162357-solved-file_get_contents-cant-access-a-url-that-a-browser-can/)) has restrictions on the "user-agent", preventing the plugin’s PHP code from accessing your logo.

However, if you encounter the same issue even with the Google logo, then it's more likely related to your PHP configuration, which is blocking external connections (particularly due to the &#96;allow_url_fopen&#96; flag in &#96;php.ini&#96;):
[ ask.gibbonedu.org/t/allow-url-fopen-1-wont-work/2981/15](https://ask.gibbonedu.org/t/allow-url-fopen-1-wont-work/2981/15)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwOTM1Ny1jb3VsZC1ub3QtY3JlYXRlLXBkZi1pbnZvaWNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Rusty](/forum/user/83085-rusty "View Rusty's Profile")**
- [![Rusty's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/83085-rusty "View Rusty's Profile") Topic Author
- [ Offline](/forum/user/83085-rusty)

Less More

- Posts: 105
- Thank you received: 8
-

1 year 7 months ago [\#366824](#366824) by [Rusty](/forum/user/83085-rusty "View Rusty's Profile")  Replied by *[Rusty](/forum/user/83085-rusty "View Rusty's Profile")* on topic *[could not create pdf invoice](/forum/35-orders-management/909357-could-not-create-pdf-invoice#366824 "-- HikaShop version -- : 5.1.5  Hi!  I use the pdf plugin. But both - the invoice and delivery note - shows an error. I tried PNG and JPG images - same issue. I can show the logo via direct link in the browser so the path should be correct.")*

Hi,

> nicolas wrote: The first thing to do is to temporarily change the logo to one hosted on another server that you know does not have protection measures against this.
>
> For example, try using this image ( [ www.google.fr/images/branding/googlelogo...t\_color\_272x92dp.png](https://www.google.fr/images/branding/googlelogo/2x/googlelogo_light_color_272x92dp.png) ), which is Google's logo.
>
> If it works with the Google logo but not with your own, it's likely that your site’s &#96;.htaccess&#96; file (or another system like ProxyShield: [ forums.phpfreaks.com/topic/162357-solved...-that-a-browser-can/](https://forums.phpfreaks.com/topic/162357-solved-file_get_contents-cant-access-a-url-that-a-browser-can/)) has restrictions on the "user-agent", preventing the plugin’s PHP code from accessing your logo.

the external Google logo is showing correctly.
But the htaccess tip I did not understand. I use no proxy. It is Joomla's default htaccess.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwOTM1Ny1jb3VsZC1ub3QtY3JlYXRlLXBkZi1pbnZvaWNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Rusty](/forum/user/83085-rusty "View Rusty's Profile")**
- [![Rusty's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/83085-rusty "View Rusty's Profile") Topic Author
- [ Offline](/forum/user/83085-rusty)

Less More

- Posts: 105
- Thank you received: 8
-

1 year 7 months ago [\#366825](#366825) by [Rusty](/forum/user/83085-rusty "View Rusty's Profile")  Replied by *[Rusty](/forum/user/83085-rusty "View Rusty's Profile")* on topic *[could not create pdf invoice](/forum/35-orders-management/909357-could-not-create-pdf-invoice#366825 "-- HikaShop version -- : 5.1.5  Hi!  I use the pdf plugin. But both - the invoice and delivery note - shows an error. I tried PNG and JPG images - same issue. I can show the logo via direct link in the browser so the path should be correct.")*

I found the solution: I had a directory protection at server level (access restriction for dev area). When I remove it, the logo is displayed. So, I know what to do. Thanks! ![;)](/media/kunena/emoticons/24.png ";)")

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwOTM1Ny1jb3VsZC1ub3QtY3JlYXRlLXBkZi1pbnZvaWNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.048 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
