Title: Personalize PDF
Last modified: August 22, 2016

---

# Personalize PDF

 *  Resolved [babr](https://wordpress.org/support/users/ederer/)
 * (@ederer)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/personalize-pdf/)
 * Hi,
 * I’d like to personalize the invoice for example:
    Dear Mr./Mrs. XXX How can I
   request only the last name of the buyer? Which php-text do I need for this?
 * Thank you in advance!
 * King regards,
    Ederer
 * [https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)

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

 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/personalize-pdf/#post-5365200)
 * Hi Ederer,
    Here’s what you need:
 *     ```
       <?php echo get_post_meta($wpo_wcpdf->export->order->id,'_billing_last_name',true); ?>
       ```
   
 * also see this thread:
    [https://wordpress.org/support/topic/get-billing-address-info-separately?replies=6](https://wordpress.org/support/topic/get-billing-address-info-separately?replies=6)
 *  Thread Starter [babr](https://wordpress.org/support/users/ederer/)
 * (@ederer)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/personalize-pdf/#post-5365254)
 * Oh that’s perfekt! Works very well!
    Is it also possible to add a custom field
   from the billing form? For example the salutation? I must just change the ‘_billing_last_name’
   with the id from my custom field, isn’t it?
 * Thank you for your quick answer!
 * King regards,
    Ederer
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/personalize-pdf/#post-5365255)
 * See the FAQ! for custom fields, you can use:
 *     ```
       <?php $wpo_wcpdf->custom_field('custom_fieldname', 'Custom field:'); ?>
       ```
   
 * that also works for the last name by the way (just leave the caption/title empty):
 *     ```
       <?php $wpo_wcpdf->custom_field('_billing_last_name', ''); ?>
       ```
   
 *  Thread Starter [babr](https://wordpress.org/support/users/ederer/)
 * (@ederer)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/personalize-pdf/#post-5365411)
 * That’s nice!
 * but I’ve still two problems…
    1. I’d like to show the order_comments on another
   place as in the shipping_address. I used the following: `<?php echo get_post_meta(
   $wpo_wcpdf->export->order->id,'_order_comments',true); ?>` but it doesn’t appear.
 * 2. I wanted to show the country full displayed and only if it isn’t the home-
   country. I tried to go on with your advice on this post:
    [https://wordpress.org/support/topic/get-billing-address-info-separately?replies=6](https://wordpress.org/support/topic/get-billing-address-info-separately?replies=6)
   but it destroys my PDF.
 * Could you help me again please?
    Thank you so much for your support!
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/personalize-pdf/#post-5365412)
 * Hello Ederer,
    1. Order comments are not meta data but actual comments. Try this:
   [https://wordpress.org/support/topic/how-to-add-customerorder-notes?replies=7](https://wordpress.org/support/topic/how-to-add-customerorder-notes?replies=7)
   2. There was an error in the code (missing square bracket in `countries->countries[
   $billing_country ]`) sorry about that! I corrected it in that same thread.
 * Ewout
 *  [Nitrat](https://wordpress.org/support/users/nitrat/)
 * (@nitrat)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/personalize-pdf/#post-5365464)

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

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

 * ![](https://ps.w.org/woocommerce-pdf-invoices-packing-slips/assets/icon-256x256.
   png?rev=2189942)
 * [PDF Invoices & Packing Slips for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/)

## Tags

 * [last name](https://wordpress.org/support/topic-tag/last-name/)

 * 6 replies
 * 3 participants
 * Last reply from: [Nitrat](https://wordpress.org/support/users/nitrat/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/personalize-pdf/#post-5365464)
 * Status: resolved