Title: customization
Last modified: August 30, 2016

---

# customization

 *  Resolved [jnz31](https://wordpress.org/support/users/jnz31/)
 * (@jnz31)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/customization-54/)
 * hi
 * thanks for this tool, really looks promising.
    but i would need a little help.
   i have a certain template that is quite complex and includes 2 different layouts.
   the first page is for address fields and up to 12 products. the second (and all
   following) pages only has product-columns. the question is: is this possible 
   and especially: how? i guess i could do the css, but i’m stuck with the php and
   would be glad, if you could help me out a bit. please get in touch with me, i’m
   sure we can work something out..
 * [https://wordpress.org/plugins/woocommerce-pdf-invoices/](https://wordpress.org/plugins/woocommerce-pdf-invoices/)

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

 *  Plugin Author [Bas Elbers](https://wordpress.org/support/users/baaaaas/)
 * (@baaaaas)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/customization-54/#post-6839483)
 * Hello,
    I would like to help you out, but I need more information. Please send
   me more info first.
 *  Thread Starter [jnz31](https://wordpress.org/support/users/jnz31/)
 * (@jnz31)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/customization-54/#post-6839497)
 * hi bas, thanks for the reply.
    i am quite far by now, but i do have a major problem.
   i would need the current page as a variable, but i don’t know how to get there.
   i know, there is the shortcode {PAGENO} & {nbpg}, BUT the way i see it, these
   will get replaced AFTER the php of my template is parsed, so i can’t use these..
   do you have any idea how to solve this..?
 *  Plugin Author [Bas Elbers](https://wordpress.org/support/users/baaaaas/)
 * (@baaaaas)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/customization-54/#post-6839501)
 * You can just place them within php tags. MPDF will replace it with page number.
   
   Take a look at [this](http://mpdf1.com/manual/index.php?tid=109). Let me know
   if it works. 🙂
 * BTW. Would you be so kind to [rate](https://wordpress.org/support/view/plugin-reviews/woocommerce-pdf-invoices?rate=5#postform)
   the plugin? It will support future development a lot! Many thanks.
 *  Plugin Author [Bas Elbers](https://wordpress.org/support/users/baaaaas/)
 * (@baaaaas)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/customization-54/#post-6839528)
 * Did you got it to work? Please let me know.
 *  Thread Starter [jnz31](https://wordpress.org/support/users/jnz31/)
 * (@jnz31)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/customization-54/#post-6839537)
 * hi bas
 * nope, i was on vactation and ill and didn’t proceed with this, yet.
    and i even
   tried your hint with `{PAGENO}` before, but that didn’t work out. the problem
   is, when i try to get the variable in my template, its not transformed to the
   value, yet. when i write `$page = {PAGENO}; echo gettype($page);` it returns “
   STRING”, means $page is “{PAGENO}” and not the variable, that i require. the 
   transformation of {PAGENO} happens AFTER my php gets executed.. this is at least
   what i’m guessing here.. so i am looking for another way.. or did you mean something
   else..?
 *  [Rakoonie](https://wordpress.org/support/users/rakoonie/)
 * (@rakoonie)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/customization-54/#post-6839542)
 * Hi Bas, I’m also having a customisation problem, I would like to change the word“
   INVOICE” on the template and make it “TAX INVOICE”. I’m using a child theme and
   presume I need to put a copy of the template in there somewhere (Apologies, I’m
   new to this) can you please explain what I need to do in order to add the word“
   TAX” before the the word “INVOICE” in the PDF template please? But I need a solution
   that will not be overwritten by any updates please.
 * I look forward to your reply.
 *  [Rakoonie](https://wordpress.org/support/users/rakoonie/)
 * (@rakoonie)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/customization-54/#post-6839543)
 * HI again Bas, Please don’t worry, I found the solution in the FAQ section, but
   if you would clarify that this will not be overwriiten by any updates?
 *  Thread Starter [jnz31](https://wordpress.org/support/users/jnz31/)
 * (@jnz31)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/customization-54/#post-6839551)
 * hi. i want to reup this topic. i still can’t figure out, how to set a variable
   on a page, to check, on what page i am. as far as i can see, the build in mPDF
   functionality can’t provide this..
 *  Plugin Author [Bas Elbers](https://wordpress.org/support/users/baaaaas/)
 * (@baaaaas)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/customization-54/#post-6839552)
 * **[@rakoonie](https://wordpress.org/support/users/rakoonie/)** I can clarify 
   that you won’t lose changes after updating plugin. Just place your custom template
   into bewpi-invoices folder and it should come up in the list on the settings 
   page.
 * **[@jnz31](https://wordpress.org/support/users/jnz31/)** Will try to find the
   time to send you the code for it.
 *  Thread Starter [jnz31](https://wordpress.org/support/users/jnz31/)
 * (@jnz31)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/customization-54/#post-6839564)
 * high.
    so i finally got this working. sheesh. but i had to hack ur plugin.. here
   is how i did it:
 * in my custom `body.php` template, at the top:
 *     ```
       <style>
       	@page {
       		size: auto;
       		odd-header-name: html_odd_header;
       		odd-footer-name: html_odd_footer;
       		even-header-name: html_even_header;
       		even-footer-name: html_even_footer;
       	}
       </style>
       <htmlpageheader name="odd_header">
       	odd header
       </htmlpageheader>
   
       <htmlpageheader name="even_header">
       	even header
       </htmlpageheader>
   
       <htmlpagefooter name="odd_footer">
       	odd footer
       </htmlpagefooter>
   
       <htmlpagefooter name="even_footer">
       	even footer
       </htmlpagefooter>
       ```
   
 * and in the file `absctract-bwepi-document.php` i added a line bellow `$mpdf->
   autoMarginPadding = 10;`
 *     ```
       $mpdf->mirrorMargins = 1;
       ```
   
 * i tried to apply this via the `bewpi_mpdf` filter by putting this into my themes`
   functions.php`:
 *     ```
       function bewpi_mpdf( $mpdf ) {
       	$mpdf->mirrorMargins = 1;
       	return $mpdf;
       }
       add_filter( 'bewpi_mpdf', 'bewpi_mpdf' );
       ```
   
 * but that didn’t do the trick.. any hint, what would be wrong with this? don’t
   like my hacking, eather..
 *  Thread Starter [jnz31](https://wordpress.org/support/users/jnz31/)
 * (@jnz31)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/customization-54/#post-6839565)
 * and while i’m at it..
    i also want to implement a custom font. i saw the `bewpi_ttffonts`
   filter, but where shall i store the font files etc..? to make it update-save,
   once the problem above is settled..
 *  Plugin Author [Bas Elbers](https://wordpress.org/support/users/baaaaas/)
 * (@baaaaas)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/customization-54/#post-6839576)
 * [@jnz31](https://wordpress.org/support/users/jnz31/) had some busy weeks. Would
   like to know if you got it to work happy to help you out. 🙂
    [@rakoonie](https://wordpress.org/support/users/rakoonie/)
   would you be so kind to rate the plugin? It would support future development 
   a lot. Thanks!
 *  Plugin Author [Bas Elbers](https://wordpress.org/support/users/baaaaas/)
 * (@baaaaas)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/customization-54/#post-9030329)
 * Added custom font support to [WooCommerce PDF Invoices Premium](http://wcpdfinvoices.com/changelog/).

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

The topic ‘customization’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-pdf-invoices/assets/icon-128x128.png?rev=1128583)
 * [Invoices for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices/reviews/)

 * 13 replies
 * 3 participants
 * Last reply from: [Bas Elbers](https://wordpress.org/support/users/baaaaas/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/customization-54/#post-9030329)
 * Status: resolved