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

#   TCPDF ERROR: Some data has already been output, can't send PDF file

##

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

Less More

- Posts: 159
- Thank you received: 2
-
-

7 years 9 months ago [\#304041](#304041) by [Rokell](/forum/user/32710-rokell "View Rokell's Profile")  *[TCPDF ERROR: Some data has already been output, can't send PDF file](/forum/25-install-update/896958-tcpdf-error-some-data-has-already-been-output-cant-send-pdf-file#304041 "-- HikaShop version -- : 4.0.2 -- Joomla version -- : 3.9.3 -- PHP version -- : 7.2  Hi, if I want to generate an invoice from the order list or within an order, I receive the following error code:  TCPDF ERROR: Some data has already been output, can't send PDF file  Could it be an PHP issue? The server works on 7.2 now. With PHP 7.0 it worked fine.  Thanks for your help Roger")* was created by *[Rokell](/forum/user/32710-rokell "View Rokell's Profile")*

-- HikaShop version -- : 4.0.2
-- Joomla version -- : 3.9.3
-- PHP version -- : 7.2

Hi,
if I want to generate an invoice from the order list or within an order, I receive the following error code:

TCPDF ERROR: Some data has already been output, can't send PDF file

Could it be an PHP issue? The server works on 7.2 now. With PHP 7.0 it worked fine.

Thanks for your help
Roger

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg5Njk1OC10Y3BkZi1lcnJvci1zb21lLWRhdGEtaGFzLWFscmVhZHktYmVlbi1vdXRwdXQtY2FudC1zZW5kLXBkZi1maWxlP3RtcGw9bWFya2Rvd24=) 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: 86584
- Thank you received: 14325
-
-

7 years 9 months ago [\#304044](#304044) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[TCPDF ERROR: Some data has already been output, can't send PDF file](/forum/25-install-update/896958-tcpdf-error-some-data-has-already-been-output-cant-send-pdf-file#304044 "-- HikaShop version -- : 4.0.2 -- Joomla version -- : 3.9.3 -- PHP version -- : 7.2  Hi, if I want to generate an invoice from the order list or within an order, I receive the following error code:  TCPDF ERROR: Some data has already been output, can't send PDF file  Could it be an PHP issue? The server works on 7.2 now. With PHP 7.0 it worked fine.  Thanks for your help Roger")*

Hi,

This means that something displays an error message on the page before the plugin can display the PDF.
Turn off the "error reporting" setting of the Joomla configuration and that should make it work as the PHP errors won't appear on the website pages anymore, only in the logs (which is what you want to do anyways on a live website to avoid security issues with information leakage due to unexepected error messages).

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

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

Less More

- Posts: 159
- Thank you received: 2
-
-

7 years 9 months ago [\#304056](#304056) by [Rokell](/forum/user/32710-rokell "View Rokell's Profile")  Replied by *[Rokell](/forum/user/32710-rokell "View Rokell's Profile")* on topic *[TCPDF ERROR: Some data has already been output, can't send PDF file](/forum/25-install-update/896958-tcpdf-error-some-data-has-already-been-output-cant-send-pdf-file#304056 "-- HikaShop version -- : 4.0.2 -- Joomla version -- : 3.9.3 -- PHP version -- : 7.2  Hi, if I want to generate an invoice from the order list or within an order, I receive the following error code:  TCPDF ERROR: Some data has already been output, can't send PDF file  Could it be an PHP issue? The server works on 7.2 now. With PHP 7.0 it worked fine.  Thanks for your help Roger")*

Thanks Nicolas, that helped.

Is there a way to export all invoices of a specific month as single PDF files? I can filter all orders and click on invoice, but it will give me one PDF with all selected orders in one PDF file. My bookkeeping wants to have them as single PDF files, without saving every single order.

Thanks
Roger

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg5Njk1OC10Y3BkZi1lcnJvci1zb21lLWRhdGEtaGFzLWFscmVhZHktYmVlbi1vdXRwdXQtY2FudC1zZW5kLXBkZi1maWxlP3RtcGw9bWFya2Rvd24=) 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: 86584
- Thank you received: 14325
-
-

7 years 9 months ago [\#304058](#304058) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[TCPDF ERROR: Some data has already been output, can't send PDF file](/forum/25-install-update/896958-tcpdf-error-some-data-has-already-been-output-cant-send-pdf-file#304058 "-- HikaShop version -- : 4.0.2 -- Joomla version -- : 3.9.3 -- PHP version -- : 7.2  Hi, if I want to generate an invoice from the order list or within an order, I receive the following error code:  TCPDF ERROR: Some data has already been output, can't send PDF file  Could it be an PHP issue? The server works on 7.2 now. With PHP 7.0 it worked fine.  Thanks for your help Roger")*

Hi,

You could potentially give them a copy of the order status notifications ( the email that the customer receives with the PDF invoice as attachment ) by adding your bookkeeper email address in the BCC field of the email via the menu System&gt;Emails.
Otherwise, once you get the PDF with all the invoices, you could use a tool to cut the PDF in separate PDFs. PDF Sam is a free and open source tool you can use to do just that: [ pdfsam.org/](https://pdfsam.org/)

The following user(s) said Thank You: [Rokell](/forum/user/32710-rokell "View Rokell's Profile")

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

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

Less More

- Posts: 159
- Thank you received: 2
-
-

7 years 9 months ago [\#304069](#304069) by [Rokell](/forum/user/32710-rokell "View Rokell's Profile")  Replied by *[Rokell](/forum/user/32710-rokell "View Rokell's Profile")* on topic *[TCPDF ERROR: Some data has already been output, can't send PDF file](/forum/25-install-update/896958-tcpdf-error-some-data-has-already-been-output-cant-send-pdf-file#304069 "-- HikaShop version -- : 4.0.2 -- Joomla version -- : 3.9.3 -- PHP version -- : 7.2  Hi, if I want to generate an invoice from the order list or within an order, I receive the following error code:  TCPDF ERROR: Some data has already been output, can't send PDF file  Could it be an PHP issue? The server works on 7.2 now. With PHP 7.0 it worked fine.  Thanks for your help Roger")*

Thanks for the link to the PDF program. I already send the invoice to the bookkeeping with every order. Sometimes we do special deals and receive hundreds of orders a day. For this amount it would be helpful to have the invoice PDFs stored somewhere on our server to download them once a month. Maybe that could be a feature for a future release.
Thanks
Roger

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg5Njk1OC10Y3BkZi1lcnJvci1zb21lLWRhdGEtaGFzLWFscmVhZHktYmVlbi1vdXRwdXQtY2FudC1zZW5kLXBkZi1maWxlP3RtcGw9bWFya2Rvd24=) 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: 86584
- Thank you received: 14325
-
-

7 years 9 months ago [\#304104](#304104) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[TCPDF ERROR: Some data has already been output, can't send PDF file](/forum/25-install-update/896958-tcpdf-error-some-data-has-already-been-output-cant-send-pdf-file#304104 "-- HikaShop version -- : 4.0.2 -- Joomla version -- : 3.9.3 -- PHP version -- : 7.2  Hi, if I want to generate an invoice from the order list or within an order, I receive the following error code:  TCPDF ERROR: Some data has already been output, can't send PDF file  Could it be an PHP issue? The server works on 7.2 now. With PHP 7.0 it worked fine.  Thanks for your help Roger")*

Hi,

We sure could add an option to store the invoice PDFs.
In fact, they are already stored in the folder plugins/hikashop/attachinvoice/invoices/ but they are deleted automatically to avoid having the folder grow for no reason.
So adding an option to not delete them shouldn't be a problem.
In fact, if you want to do that right now, just remove the line:
JFile::delete($invoiceFolder.DS.$oneInvoice);
in plugins/hikashop/attachinvoice/attachinvoice.php and you'll get the invoices stored in that folder.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg5Njk1OC10Y3BkZi1lcnJvci1zb21lLWRhdGEtaGFzLWFscmVhZHktYmVlbi1vdXRwdXQtY2FudC1zZW5kLXBkZi1maWxlP3RtcGw9bWFya2Rvd24=) 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.052 seconds

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