PDF Invoices attaches a fully customizable PDF invoice to a paid or completed order and other WooCommerce emails.
Invoices can accessed via a Download Invoice link on the Thank You page or in the My Orders area and be resent by selecting Completed Order from the order actions meta box.
The layout of templates is fully customizable, and fields can be added or removed as needed.
For a new installation, review our extension installation guide
If you need to update the extension, you can do this from your WordPress Admin if you have connected the site to WooCommerce.com. More at: you can read more about that Managing WooCommerce.com Subscriptions.
You can also update manually by downloading the latest version from your WooCommerce account
Once you have the zip file downloaded you should deactivate and delete the existing version from your WordPress plugins page and then install the new version using the upload option. You will not lose any settings or data by updating this way.
PDF Invoice settings can be found in the PDF Invoice menu which is located in the WooCommerce menu tab. Complete the settings form, there are tool tips (?) if you need more information on a setting.
It’s important to remember that an invoice is a legal document, and the format should be setup in line with the legal requirements of your local tax office.
You can set the format of the invoice date, using standard PHP date functions: (http://php.net/manual/en/function.date.php)
An example of the chosen date format is shown in the PDF Invoice settings once saved.
Examples
To test your layout and settings, create a test order and set it to completed.
All orders, completed or otherwise, will have a “Download Invoice” icon in the actions area:
Click and check the invoice layout.
The PDF filename should be unique and easy to spot for customers. Use up to 3 variables and any other text. For example:
would give a file name of INVOICE-WooThemes-AAA1234BBB-12052013.pdf
You can arrange the variables in any order.
There is also a filter that can be used to modify the file name further :
apply_filters( ‘pdf_output_filename’, $filename, $order_id );
If required, the invoice number suffix can include the current year. Add:
to the suffix setting.
From version 4.12.0 the option to choose which email has an invoice attached has moved to WooCommerce -> Settings -> Emails.
Each email now has an option to attach an invoice if an invoice is available.
If you need to create an invoice for a previously completed order, just resend the Completed Order email from the Order Actions meta box.
The PDF invoice extension adds new features to the WooCommerce Orders screen.
By default the actions column is hidden by WooCommerce, you can enable it in Screen Options
↑ Back to top
If you need to modify the existing PDF Invoice information, for example if the wrong date is on the invoice or the format needs to be changed you can make changes with the “Update PDF Meta” option. It will only show if the debugging option has been set in PDF Invoice settings – Please ensure you are aware of any potential legal issues before using this option.. Ideally, make the necessary changes in your settings if required and then update one invoice to confirm that everything has worked correctly.
If you want to create invoices for some orders that do not already have an invoice number you can use the “Create and Email Invoice”. There is a filter available to prevent the email from being sent.
Once you have copied the template file to your theme folder you will be shown a link to go straight to the theme editor where you can begin making changes to your PDF Invoice template :
see Hooks and Filters in WooCommerce PDF Invoice for more information — and change the layout and move sections around.
Template files use HTML tables. This is a limitation of the DOMPDF library, in that some CSS classes can be used, but you’ll need to experiment to see which work and which don’t.
wp-content/plugins/woocommerce-pdf-invoice/lib/dompdf/lib/fonts/
wp-content/plugins/woocommerce-pdf-invoice/lib/dompdf/lib/fonts/dompdf_font_family_cache.dist.php
You can then change the font in the template.php file. If the font is not included with DOMPDF, you can use Google Fonts. Add a link to template.php and then add the style as you would in a normal HTML file.
Get the font url from Google (https://fonts.google.com) and then modify the template as follows. It is important that your font contains all of the necessary characters for your language and it should also contain enough styles for normal, bold, H1, H2.
@import url('https://fonts.googleapis.com/css?family=Orbitron'); bodyMake sure you know the location of the font and then modify the template as follows. It is important that your font contains all of the necessary characters for your language and it should also contain enough styles for normal, bold, H1, H2.
@font-face < font-family: 'Firefly'; font-style: normal; font-weight: normal; src: url(http://example.com/fonts/firefly.ttf) format('truetype'); >bodyRequires PDF Invoices 4.4.5
Add the following CSS to your PDF template, the template contains all of the possible class names
For more information on hooks and filters in WooCommerce PDF Invoice, see: Hooks and Filters in WooCommerce PDF Invoice.
You can use the free Loco Translate plugin to translate any or all of of the strings in PDF Invoice. If you only want to change two or three strings, then the Say What? free plugin may be better suited. (Use the domain: woocommerce-pdf-invoice)
If you use Loco Translate and keep custom translations in woocommerce-pdf-invoice/languages, they can be lost when upgrading. To keep them upgrade safe, place them in wp-content/languages/woocommerce-pdf-invoice/
PDFs are created as needed and stored in your hosting tmp folder, which isn’t typically accessible from a browser. A CRON task deletes PDFs every half hour to avoid filling up your server.
As part of the update to version 4.12, the DOMPDF PDF generator was updated for PHP 8. Included in this update a bug was fixed that allowed files not included in the PDF Invoices plugin folder to be included in the PDF, logos for example.
As of version 4.12.2 there is a new option, “Set Resources Folder”, to set the “allowed directory” to the site wp-content directory. This change will allow the PDF to include files that are anywhere within the site wp-content directory.
If your logo is missing from the invoice then you can set the “Set Resources Folder” option to “Yes” in the PDF Invoices settings.
If you have set the “Remote Logo” option to yes because your logo was missing from the invoice then you can revert this back to “No” once you have set the “Set Resources Folder” option to “Yes”.
From version 4.0.0 of WooCommerce PDF Invoice there is an ability for store owners to create a zip file of several invoices. This is version 1 of bulk exporting. Future releases of WooCommerce PDF Invoice will improve on this, based on feedback from store owners. Please email any ideas or feedback to plugins@chromeorange.co.uk
To export several PDFs, view your order list, select the orders you want the PDFs for, choose “Bulk Export PDFs” from the “Bulk Actions” drop down and click “Apply”. Once the zip file is available there will be a link to download it.
From version 4.2.0 of PDF Invoices it is possible to modify previously uneditable invoice data.
To access this the PDF debugging option should be set to yes. Once that is done edit the order that needs to be modified and look for the Invoice meta box, usually at the bottom of the page.
Before making any changes here you should be aware of any legal issues that may occur if you modify an invoice that has already been issued to a customer, if you are not sure please consult your accountant.
For feedback on the PDF Invoice extension, this documentation or for feature requests please email plugins@chromeorange.co.uk
Already purchased and need some assistance? Get in touch the developer via the Help Desk.