[Skip to main content](#vessel-content)

#   PDF Invoice Plugin Cutting Off

##

- **[dklotz1286](/forum/user/27696-dklotz1286 "View dklotz1286's Profile")**
- [![dklotz1286's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/27696-dklotz1286 "View dklotz1286's Profile") Topic Author
- [ Offline](/forum/user/27696-dklotz1286)

Less More

- Posts: 13
- Thank you received: 0
-
-

12 years 6 months ago [\#152749](#152749) by [dklotz1286](/forum/user/27696-dklotz1286 "View dklotz1286's Profile")  *[PDF Invoice Plugin Cutting Off](/forum/25-install-update/867537-pdf-invoice-plugin-cutting-off#152749 "I have the latest version of PDF Plugin as I just installed it. When I open all of my invoices most of them are getting cut off. How can I fix this? I have attached a screen shot.")* was created by *[dklotz1286](/forum/user/27696-dklotz1286 "View dklotz1286's Profile")*

I have the latest version of PDF Plugin as I just installed it. When I open all of my invoices most of them are getting cut off. How can I fix this? I have attached a screen shot.

- [ ![h599326c.png](/forum/attachment/16781) ](/forum/attachment/16781 "h599326c.png") [ ](/forum/attachment/16781?download=1 "h599326c.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg2NzUzNy1wZGYtaW52b2ljZS1wbHVnaW4tY3V0dGluZy1vZmY/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

12 years 6 months ago [\#152759](#152759) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[PDF Invoice Plugin Cutting Off](/forum/25-install-update/867537-pdf-invoice-plugin-cutting-off#152759 "I have the latest version of PDF Plugin as I just installed it. When I open all of my invoices most of them are getting cut off. How can I fix this? I have attached a screen shot.")*

Hi,

That's because your product names are too long. You'll have to change the line: Code:

&lt;?php echo $product-&gt;order_product_name;

by: Code:

&lt;?php echo implode('&lt;br/&gt;',$this-&gt;str_split_unicode($product-&gt;order_product_name,50));

in the file plugins/hikashop/attachinvoice/attachinvoice/invoice.php
and add the code: Code:

function str_split_unicode($str, $l = 0) { if ($l &gt; 0) { $ret = array(); $len = mb_strlen($str, "UTF-8"); for ($i = 0; $i &lt; $len; $i += $l) { $ret[] = mb_substr($str, $i, $l, "UTF-8"); } return $ret; } return preg_split("//u", $str, -1, PREG_SPLIT_NO_EMPTY); }

before the line: Code:

}//endclass

in the file plugins/hikashop/attachinvoice/attachinvoice.php
That way, it will split the product names into several lines when they are too big to fit on a line.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg2NzUzNy1wZGYtaW52b2ljZS1wbHVnaW4tY3V0dGluZy1vZmY/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.141 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
