Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Why is there an empty/blank page at the end of the PDF when printing product labels?

Subscribe

Get notified when there's activity on this post

This question has been flagged
pdfproductxslreportslabels
3 Replies
14961 Views
Avatar
Santi

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>
0
Avatar
Discard
Avatar
Darius Martinkus
Best Answer

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

1
Avatar
Discard
Avatar
Med Said BARA
Best Answer

hi;

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

1
Avatar
Discard
Santi
Author

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

Med Said BARA

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

Santi
Author

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)

Med Said BARA

Try using those modules from AGAPLAN: label_print and label_print_stock

Santi
Author

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.

Med Said BARA

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

Santi
Author

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!

Med Said BARA

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 ...

Med Said BARA

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

Santi
Author

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

Santi
Author

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.

Med Said BARA

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

Santi
Author

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

Avatar
Riyaz Ahmad
Best Answer

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
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
PDF report name isn't respected when using module from app store
pdf reports
Avatar
0
Sep 21
3570
PDF reports show negative amounts with vertical bar "|" instead of "-". How can I fix this.?
pdf reports
Avatar
Avatar
1
May 18
4521
No css format on PDF reports after upgrade Odoo Server 10.0-20170119 ! (no headers) Solved
pdf reports
Avatar
Avatar
2
Jan 17
7711
Need modified of Label reports
reports labels
Avatar
0
Mar 15
3395
Reports not auto-saved to attachments Solved
pdf reports
Avatar
Avatar
Avatar
3
Mar 15
8413
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now