Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
When I print a product label (or several at the same time) there's always a blank page at the end of the resulting PDF document. I've searched a long time for a solution, but nobody else seems to complain about this behavior, I'm surprised as this seems to be the default behavior with a clean OpenERP installation, so it's not the result of any of my modifications. This is a pain in the a$$, as each time I print a label I waist an empty label in the printer...or I have to manually tell Acrobat to ignore the last page.
After investigating on my own, I've figured out that the
<nextFrame /> tag is what causes this issue. So as a temporary fix, I've removed it from the "product_label.xsl" code, this solution works fine when printing one label, but when I try to print several at once, the label frames overlap each other...
So, is there anyone else having this problem? and if so, have you come up with a solution?
Here is the actual code I'm using for the label layout in the "product_label.xsl":
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl=w w w . o r g/1999/XSL/Transform" xmlns:fo="http : / / w w w .w 3. org/1999/XSL/Format"> <xsl:template match="label"> <document filename="Product Label.pdf"> <template pageSize="(80mm, 50mm)" leftMargin="1.4mm" rightMargin="1.4mm" topMargin="0mm" bottomMargin="0mm" title="Product Label" author="Turbo Internacional"> <pageTemplate id="all"> <frame id="first" x1="0" y1="0" width="80mm" height="50mm"/> </pageTemplate> </template> <stylesheet> <paraStyle name="st_product" fontName="Helvetica" leading="10" fontSize="7" spaceBefore="0" spaceAfter="0"/> <paraStyle name="st_description" fontName="Helvetica" leading="10" fontSize="7" spaceBefore="0" spaceAfter="0" alignment="left"/> <blockTableStyle id="st_table"> <blockAlignment value="CENTER"/> <blockValign value="TOP"/> </blockTableStyle> </stylesheet> <story> <xsl:apply-templates select="product_label" mode="story"/> </story> </document> </xsl:template> <xsl:template match="product_label" mode="story"> <blockTable style="st_table"> <tr> <td> <para style="st_product"><xsl:text>Ref: </xsl:text><xsl:value-of select="product"/></para> <para style="st_description"><xsl:value-of select="description"/><xsl:text> </xsl:text></para> </td> </tr> <tr> <td> <barCode code="ean13" height="17mm" width="40mm" alignment="CENTER"><xsl:value-of select="ean13" /></barCode> </td> </tr> </blockTable> <nextFrame/> </xsl:template> </xsl:stylesheet>
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 2/7/14, 8:30 AM|
|Seen: 4325 times|
|Last updated: 3/16/15, 8:10 AM|