Title: PDF templates
Last modified: August 30, 2016

---

# PDF templates

 *  Resolved [Klokwerk-design](https://wordpress.org/support/users/klokwerk-design/)
 * (@klokwerk-design)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/pdf-templates/)
 * Hi,
 * Great plugin, thanks, I use it with CRM and the PDF-plugin. However a few questions/
   suggestions.
 * Is there a proper way to insert in the PDF below the address lines of the customer
   an extra line for a custom field? You know in most European countries it’s very
   common to add the TAX number (VAT) of the customer to the invoice, so you can
   bypass the tax by resell. Maybe you could add that line in a future release.
 * Also, I’d like to know if I can change the call %address% in the PDF templates
   to calls concerning the elements of the address, so to say the name, country,
   zip-code etc, as the European notation of addresses is fairly different from 
   that of the US. Maybe it’s useful to add some documentation about the calls and
   possibilities concerning the templates (or maybe I looked over it)?
 * _[ [Signature moderated](http://codex.wordpress.org/Forum_Welcome#Signatures)]_
   
   [https://wordpress.org/plugins/wp-invoice/](https://wordpress.org/plugins/wp-invoice/)

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Thread Starter [Klokwerk-design](https://wordpress.org/support/users/klokwerk-design/)
 * (@klokwerk-design)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/pdf-templates/#post-6286387)
 * Hi,
 * Added to my former mail there seems to be a problem with firefox: in this browser
   the update-button in the CRM does not seem to save the data. We have a workaround(
   use Chrome), but I’d like to know if this is a known error and if not, report
   it to you ;).
 * _[ [Signature moderated](http://codex.wordpress.org/Forum_Welcome#Signatures)]_
 *  Plugin Contributor [MariaKravchenko](https://wordpress.org/support/users/mariakravchenko/)
 * (@mariakravchenko)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/pdf-templates/#post-6286403)
 * Hello.
 * You can add custom fields in CRM/Data tab. There is an option – custom invoice
   attribute.
 * Regarding address there isn’t there titles in PDF. You can fill them as you need.
 * In Mozilla browser it trying to fill your password, so if you will [clean password filed](http://screencast.com/t/e8AHg2Po)
   it will update user.
 * Regards.
 *  Thread Starter [Klokwerk-design](https://wordpress.org/support/users/klokwerk-design/)
 * (@klokwerk-design)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/pdf-templates/#post-6286408)
 * Hi Maria,
 * Thanks for your answer. It’s somewhat cryptic though. I found the ‘custom fields’
   in the CRM for the invoice, but I can only use them in the html file. Is there
   a document that enlists the codes for address or explains how a call in the PDF
   is made?
 * _[ [Signature moderated](http://codex.wordpress.org/Forum_Welcome#Signatures)]_
 *  Plugin Contributor [MariaKravchenko](https://wordpress.org/support/users/mariakravchenko/)
 * (@mariakravchenko)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/pdf-templates/#post-6286410)
 * Custom attribute will be shown on view invoice page in customer information area.
   In PDF it won’t show and we do not have docs how to add them there.
 *  Thread Starter [Klokwerk-design](https://wordpress.org/support/users/klokwerk-design/)
 * (@klokwerk-design)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/pdf-templates/#post-6286411)
 * Well I guess you could see that as a tip or request.
 *  Plugin Contributor [MariaKravchenko](https://wordpress.org/support/users/mariakravchenko/)
 * (@mariakravchenko)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/pdf-templates/#post-6286412)
 * Ok. Thank you for pointing. You can also add your idea here – [http://feedback.usabilitydynamics.com/forums/9692-wp-invoice](http://feedback.usabilitydynamics.com/forums/9692-wp-invoice)
 *  Thread Starter [Klokwerk-design](https://wordpress.org/support/users/klokwerk-design/)
 * (@klokwerk-design)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/pdf-templates/#post-6286465)
 * Hi there –
 * Good, I will re-open this issue, because we recently had problems with the workaround
   we implemented three months ago. Eventually we decided to use the field “Phone
   Number” in the invoice, which we didn’t use, for the VAT-number, changing te 
   call “Phone” to “VAT” in the PDF-template. Worked fine, however, with the last
   update it appears that all non-numeric fields are cleaned. So we lost our VAT
   number. Obviously a new validation? Anyway, this goes for a LOT of clients, and
   a VAT number on the Invoice is something really important for us (mandatory by
   law in Belgium where my client resides). So, in order to keep us as clients for
   your plugin, could you please help me with…
 * either an option to add a proper field from invoice to the PDF, and help implementing
   this…
 * or a rollback for the plugin so our workaround is.
 * Furthermore the tip: if you want more clients in Europe, i’d suggest you make
   a VAT field soon in your plugin, for here on this continent in most countries
   it’s very common to print it alongsite the addresslines – and in some countries
   it’s even mandatory.
 *  Thread Starter [Klokwerk-design](https://wordpress.org/support/users/klokwerk-design/)
 * (@klokwerk-design)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/pdf-templates/#post-6286466)
 * By
    “or a rollback for the plugin so our workaround is.”
 * I meant
    “or a rollback for the plugin so our workaround is working again” 😉
 *  Plugin Contributor [Anton Korotkoff](https://wordpress.org/support/users/anton-korotkoff/)
 * (@anton-korotkoff)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/pdf-templates/#post-6286468)
 * Hello,
 * so VAT should be one of user meta field right?
 * Also, we just released WP-Invoice PDF version 2.1.0 which is completely re-written.
   Templates changed but design kept. There is new way to create custom templates.
   It’s more easy than before.
 * So I think there is an easy way to add VAT into templates right now because they
   support WP functions that can be used to get user meta and so on.
 * We kept legacy support for customized templates but cannot guarantee they will
   look well after update so plan fixing them as well.
 * Let me know you have other questions.
 * Thank you.
 *  Thread Starter [Klokwerk-design](https://wordpress.org/support/users/klokwerk-design/)
 * (@klokwerk-design)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/pdf-templates/#post-6286469)
 * OK, thanks for your answer. That seemed like good news and bad news altogether.
   Indeed, I had to re-setup my template and that cost me some hours extra work.
   The bonus however, I did not reach. Could you please help me with the following
   example, that would be really great.
 * I have in the CRM now a field called “VAT”. I try to echo the value in this field
   on the PDF. In the user-meta table, the key is “vat”.
 * So, I supposed
 * <?php echo get_user_meta(“150”, “vat”, true); ?>
 * … would make my day, hardcoding a user-id just for testing purpose. That seemed
   to work fine.
 * But now for the real bonus: which is the variable I use for getting the user-
   id?
 * Furthermore, is there a sheet available with all the variables that I can use
   in a PDF-template? That would be really useful to avoid further questions like
   this. However, getting the user-id from the customer would of course help a lot.
 * Hope to hear from you soon. Thanks in advance.
 *  Plugin Contributor [Anton Korotkoff](https://wordpress.org/support/users/anton-korotkoff/)
 * (@anton-korotkoff)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/pdf-templates/#post-6286470)
 * Hello,
 * you are allowed to do the following inside the template:
 * `<?php global $invoice; print_r($invoice); ?>`
 * There you’ll find all the invoice information and it’s user data that you can
   use the way you need.
 * Thanks.
 *  Thread Starter [Klokwerk-design](https://wordpress.org/support/users/klokwerk-design/)
 * (@klokwerk-design)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/pdf-templates/#post-6286471)
 * Thanks for your answer, but I copied the code and pasted it in my document, and
   it returns nothing. I hope you made a mistake?
 * Don’t you really have an overview of the variables you pass on? I think it should
   be available online…
 *  Plugin Contributor [Anton Korotkoff](https://wordpress.org/support/users/anton-korotkoff/)
 * (@anton-korotkoff)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/pdf-templates/#post-6286472)
 * Sorry, I did a small mistake.
 * Basically, here is how to get user ID:
 * `$user_id = $invoice->data['user_data']['ID'];`
 * Then you do like:
 * `echo get_user_meta($user_id, "vat", true);`
 * Also, we are planing to add some overview of PDF template functions soon.
 * Thank you.
 *  Thread Starter [Klokwerk-design](https://wordpress.org/support/users/klokwerk-design/)
 * (@klokwerk-design)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/pdf-templates/#post-6286473)
 * Hi Anton,
 * This works great, thank you. Now I have the full control I wanted and call anything,
   that’s great. Also I noted that the templates are indeed far more comprehensible,
   great work.
 * In general: I had some doubts beginning with this plugin, due to comments of 
   poor support and documentation and the fact that it seemed a bit bunky, but took
   the gamble for it was just what I needed for functionality. I see you’re getting
   by on support, the plugins are the more the better programmed, and if you update
   the documentation I think you have a winner here. I will say that in my rating
   of the plugin.
 * Thanks again, I’ll mark the topic as resolved.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘PDF templates’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-invoice_c36510.svg)
 * [WP-Invoice - Web Invoice and Billing](https://wordpress.org/plugins/wp-invoice/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-invoice/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-invoice/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-invoice/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-invoice/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-invoice/reviews/)

## Tags

 * [address](https://wordpress.org/support/topic-tag/address/)
 * [pdf](https://wordpress.org/support/topic-tag/pdf/)
 * [vat](https://wordpress.org/support/topic-tag/vat/)

 * 14 replies
 * 3 participants
 * Last reply from: [Klokwerk-design](https://wordpress.org/support/users/klokwerk-design/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/pdf-templates/#post-6286473)
 * Status: resolved