コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3 返信
13296 ビュー

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>
アバター
破棄
最善の回答

Guys have you tried to print product labels with multiple product variant attribute types? like size, color? For me it only prints one for example size attribute and ignores the other

アバター
破棄
最善の回答

hi;

Try also to remove the closing tag <nextframe/>, and see if it works.

アバター
破棄
著作者

Nop, it doesn't work, I receive this error when trying to print "SyntaxError: JSON.parse: unexpected end of data"

Are you using Oerp V7, Are you printing on a label printer (which one ZEBRA SATO ....) ?

著作者

Yes, I'm using OpenERP v7 on an Ubuntu 13.04 server, and I'm using a Toshiba B-SV4T Thermal label printer, but the printer doesn't matter right now, because for the moment I'm not printing directly to the printer (because there's no drivers available for that printer in Ubuntu), when I click the Print Label button, openerp saves a PDF document, and there's where I get the extra blank page, at the end of that PDF. Once this PDF is created, I send it to the label printer (which is installed in one of the Windows client dektops we have in our company)

Try using those modules from AGAPLAN: label_print and label_print_stock

著作者

I've already tried both those modules, they seem interesting, but they're not what I'm looking for exactly. I'm happy with my current setup...as long as I figure out how to delete that extra blank page in the PDF labels. But really, am I the only one having that issue with product labels?? Since I first saw that issue, I've reinstalled Ubuntu, reinstalled OpenERP, updated it, created a new database and company....but I always get that extra blank page at the end of the product label PDF documents...So I've discarded this issue being a problem related to my current installation.

You must install the Driver for B-SV4T, use this one from GITHUB : CUPS Raster Drvier for the Toshiba TEC TPCL based label printers, configure you label size, revert all changes you made in the .xsl file except the template page size and margins, after that you can print directly to the printer and if needed (if you are using FireFox) you can use extension for fireFox like AttendPrint or qz-print-free_1.8.0_src.7z from qzindustries to print directly to the printer

著作者

WOW, that's a helpful answer!..I wasn't aware of those drivers..I actually started searching for them last Friday, with no luck. I'll try it on Monday when I'm back at the office and let you know, hopefully you've helped me kill 2 birds with one stone. thanks!

At first Don't forget to calibrate your printer with the roll of label you are using to avoid the overlapping, this calibration permit to the printer to recognise the begining and the ending of the laben (Height). After that the driver will handle all the printing operation correctly and will free you from dealing with pdf paper size and so on ...

One Bird for you and the second for me. GOOD LUCK

著作者

Yes, I've done that already when testing the printer on the Windows desktop.

著作者

I tried installing the drivers you suggested at " github.com/samlown/rastertotpcl " , but no luck, I get the same error as this guy while installing: " github.com/samlown/rastertotpcl/issues/1 " , I suppose the drivers are outdated and not compatible with the latest Ubuntu version.

What about CUPS: install CUPS before installing the driver (sudo apt-get install libcupsimage2-dev) or from source (make and after sudo make install)

著作者

Yes, I've done both...and I get the same errors as this guy: link " github.com/samlown/rastertotpcl/issues/1 "

最善の回答

Simply if your Trasnfer Quantities for Product Label is Generating Blank PDF then the issue is with your UoM (Unit of Measure), Try Chaning it to default from Configuration and It will start to print the labels as of now its unable to understand what your UoM means thats why its generating blank PDFs

アバター
破棄
関連投稿 返信 ビュー 活動
0
9月 21
1612
1
5月 18
2887
2
1月 17
5916
0
3月 15
2376
3
3月 15
6629