Title: Syntax error
Last modified: December 6, 2017

---

# Syntax error

 *  Resolved [guena](https://wordpress.org/support/users/guena/)
 * (@guena)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/syntax-error-175/)
 * Hello,
    First of all, congratulations for this great plugin. However, I have 
   a problem, when I want to preview the template, the following error message appears.
 * Parse error: syntax error, unexpected ‘[‘ in C:\Users\GRANIT-DAO\Desktop\InstantWP_4.5\
   iwpserver\htdocs\wordpress\wp-content\plugins\woo-pdf-invoice-builder\vendor\
   dompdf\dompdf\src\FrameDecorator\AbstractFrameDecorator.php on line 891
 * Do you have any idea how to solve the problem?
    Thank you in advance.

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

 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/syntax-error-175/#post-9756367)
 * Hello!
 * That seems to be a compatibility error with older versions of php. I am going
   to fix this in the next release but if you want to fix it right away please open
   the file C:\Users\GRANIT-DAO\Desktop\InstantWP_4.5\iwpserver\htdocs\wordpress\
   wp-content\plugins\woo-pdf-invoice-builder\vendor\dompdf\dompdf\src\FrameDecorator\
   AbstractFrameDecorator.php and change this:
 *     ```
        foreach($this->get_children() as $child)
               {
                   if($child->is_text_node()&&$child->get_text()=='')
                       continue;
                   $height+=$child->get_padding_box()['h'];
   
               }
       ```
   
 * for this:
 *     ```
        foreach($this->get_children() as $child)
               {
                   if($child->is_text_node()&&$child->get_text()=='')
                       continue;
                   $paddingBox=$child->get_padding_box();
                   $height=$paddingBox['h'];
   
               }
       ```
   
 * that should do the trick =).
 * Regards!
 *  [Pigo3934blog](https://wordpress.org/support/users/pigo3934blog/)
 * (@pigo3934blog)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/syntax-error-175/#post-9770677)
 * I get the following error..
 * Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate
   8192 bytes) in /home/myusername/public_html/wp-content/plugins/woo-pdf-invoice-
   builder/vendor/phenx/php-font-lib/src/FontLib/Table/Type/loca.php on line 43
    -  This reply was modified 8 years, 6 months ago by [Pigo3934blog](https://wordpress.org/support/users/pigo3934blog/).
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/syntax-error-175/#post-9771616)
 * Got it, this is very technical but the first time the plugin tries to generate
   a pdf the font files are compiled, this is done in your server to increase the
   accuracy of the file generated. It seems that your server is struggling to finish
   this compilation. So please download the file at [http://rednao.com/fonts.zip](http://rednao.com/fonts.zip)
   unzip it and place the content at vendor\dompdf\dompdf\lib\fonts, the zip file
   contains the precompiled font files (which were generated in my machine) so hopefully
   that will fix it and the pdf will be accurate enough.
 * Regards!

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

The topic ‘Syntax error’ is closed to new replies.

 * ![](https://ps.w.org/woo-pdf-invoice-builder/assets/icon-256x256.gif?rev=3517675)
 * [PDF Builder for WooCommerce. Create invoices,packing slips and more](https://wordpress.org/plugins/woo-pdf-invoice-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-pdf-invoice-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-pdf-invoice-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-pdf-invoice-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-pdf-invoice-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-pdf-invoice-builder/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/syntax-error-175/#post-9771616)
 * Status: resolved