jimevins / glabels-qt

gLabels Label Designer (Qt/C++)

Home Page:http://glabels.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Labels printing increasingly stacked on roll printer when using merge

sschueller opened this issue · comments

commented

I have a very odd phenomenon on my "cheap" Chinese label printer when using glabels with merge. Individual labels printer perfectly.

Screenshot_2023-07-15_19-43-06

When printing a merge regardless if I select to print 1 or all I get the number of rows in the CSV. So for example I want to print the first 5 out of 14 it will print 14 labels but each label stacked on additionally. So in evanescence first label is ok, second label has the first and second label on it, third label has first, second and third on it and so on.

I have the following setup:

  • gLabels v3.99-master564 (Manjaro Linux)
  • Custom label template 20x10mm on a roll.
  • CSV file with 14 row, 4 columns
  • Printer is XP-D463B (https://www.aliexpress.com/item/1005005580480166.html (D108B USB/BL)), see ppd below, I currently only have one paper size defined

If I reduce the CSV to 2 rows (no header), the printer will print 3 labels, also stacked. Selecting only one row in the merge window will print just that one label correctly.

Template

<!DOCTYPE Glabels-templates>
<Glabels-templates>
 <Template size="roll" part="20x10 (Copy)" width="56.6929pt" description="20x10 mm Micro Labels" roll_width="56.6929pt" height="28.3465pt" brand="Generic">
  <Label-rectangle id="0" width="56.6929pt" height="28.3465pt" x_waste="0pt" y_waste="0pt" round="2.83465pt">
   <Markup-margin size="1.41732pt"/>
   <Layout x0="0pt" ny="1" y0="0pt" dx="56.6929pt" nx="1" dy="28.3465pt"/>
  </Label-rectangle>
 </Template>
</Glabels-templates>

csv

1uF,10% 100V, 1206,C282823
10uF,10% 100V, 1825,C1021605
10uF,20% 3.4Ω 10V,1206,C2156473
10uF,X5R ±10% 25V,1206,C9807
22uF,4.5Ω ±20% 10V,1206,C1952922
Schottky,850mV@2A 100V,1206,C143805
Jack-DC,,,C5184829
USB2.0 Jack,,,C223907
5.1K,1% 250mW,1206,C17968
1M,5% 250mW,1206,C104604
Light Sens,,1206,C131243
Button,50mA,,C115360
ESP32-S3,MINI-1-N8,,C2913206
LM1117,3.3V,,C498315

ppd

*PPD-Adobe: "4.3"
*%
*% Create By XP 2016/07/05 15:56
*%
*FormatVersion: "4.3"
*FileVersion: "1.1"
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*PCFileName: "XP-460B.ppd"
*Manufacturer: "Xprinter"
*Product: "(XP-460B)"
*cupsVersion: 1.1
*cupsManualCopies: False
*cupsFilter: "application/vnd.cups-raster 0 xprinter"
*ModelName: "XP-460B"
*ShortNickName: "XP-460B"
*NickName: "XP-460B"
*PSVersion: "(3010.000) 550"
*PSVersion: "(3010.000) 651"
*PSVersion: "(3010.000) 652"
*PSVersion: "(3010.000) 653"
*PSVersion: "(3010.000) 704"
*PSVersion: "(3010.000) 705"
*PSVersion: "(3010.000) 800"
*LanguageLevel:	"3"
*ColorDevice:	False
*DefaultColorSpace: Gray
*FileSystem: False
*Throughput: "1"
*LandscapeOrientation: Plus90
*TTRasterizer: Type42
*1284DeviceID:"MFG:Xprinter;CMD:TSPL2;MDL:XP-460B;CLS:PRINTER;"

*TscAttr tscLanguage: TSPL2
*TscAttr tscUtility: tscUtility
*TscAttr MaxPaperWidth: 334.49

*HWMargins: 0 0 0 0
*VariablePaperSize: True
*MaxMediaWidth: 306
*MaxMediaHeight: 6480
*NonUIOrderDependency: 100 AnySetup *CustomPageSize
*CustomPageSize True: "pop pop pop 
<</PageSize [ 5 -2 roll ] /ImagingBBox null>>setpagedevice"
*End
*ParamCustomPageSize Width: 1 points 14 306
*ParamCustomPageSize Height: 2 points 14 6480
*ParamCustomPageSize Orientation: 5 int 0 0
*ParamCustomPageSize WidthOffset: 3 points 0 0
*ParamCustomPageSize HeightOffset: 4 points 0 0
*RequiresPageRegion All: True



*OpenGroup: General/General



*OpenUI *PageSize/Page Size: PickOne
*OrderDependency: 100 AnySetup *PageSize
*DefaultPageSize: w2h1
*PageSize w2h1/20x10mm (20 x 10mm): "<</PageSize[56.70 28.35]/ImagingBBox null>>setpagedevice"


*CloseUI: *PageSize

*OpenUI *PageRegion: PickOne
*OrderDependency: 100 AnySetup *PageRegion
*DefaultPageRegion: w2h1
*PageRegion w2h1/20x10mm (20 x 10mm): "<</PageSize[56.70 28.35]/ImagingBBox null>>setpagedevice"


*CloseUI: *PageRegion

*DefaultImageableArea: w2h1
*ImageableArea w2h1/20x10mm (20 x 10mm): "0 0 56.70 28.35"

*DefaultPaperDimension: w2h1
*PaperDimension w2h1/20x10mm (20 x 10mm): "56.70 28.35"


*OpenUI *Resolution/Resolution: PickOne
*OrderDependency: 90 AnySetup *Resolution
*DefaultResolution: 203dpi
*Resolution 203dpi/203 dpi x 203 dpi: "<</HWResolution[203 203]/cupsBitsPerColor 1/cupsRowCount 8/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3>>setpagedevice"
*Resolution 300dpi/300 dpi x 300 dpi: "<</HWResolution[300 300]/cupsBitsPerColor 1/cupsRowCount 12/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3>>setpagedevice"
*CloseUI: *Resolution

*OpenUI *Collate/Collate: Boolean
*OrderDependency: 200 AnySetup *Collate
*DefaultCollate: True
*Collate True/Yes: "%%"
*Collate False/No: "%%"
*CloseUI: *Collate



*CloseGroup: General


*OpenGroup: Media/Media Setting

*OpenUI *MediaMethod/Method: PickOne
*OrderDependency: 110 AnySetup *MediaMethod
*DefaultMediaMethod: Transfer
*MediaMethod Normal/Use Currently Printer Setting: "%%"
*MediaMethod Direct/Direct Thermal: "%%"
*MediaMethod Transfer/Thermal Transfer: "%%"
*CloseUI: *MediaMethod

*OpenUI *PaperType/Type: PickOne
*OrderDependency: 120 AnySetup *PaperType
*DefaultPaperType: LabelGaps
*PaperType Normal/Use Currently Printer Setting: "%%"
*PaperType LabelGaps/Label with Gaps: "%%"
*PaperType LabelMark/Label with Mark: "%%"
*PaperType Continue/Continue: "%%"
*CloseUI: *PaperType

*OpenUI *GapsHeight/GapsHeight: PickOne
*OrderDependency: 130 AnySetup *GapsHeight
*DefaultGapsHeight: 2
*GapsHeight 0/0 in: "%%"
*GapsHeight 1/0.039 in: "%%"
*GapsHeight 2/0.079 in: "%%"
*GapsHeight 3/0.118 in: "%%"
*GapsHeight 4/0.157 in: "%%"
*GapsHeight 5/0.197 in: "%%"
*GapsHeight 6/0.236 in: "%%"
*GapsHeight 7/0.276 in: "%%"
*GapsHeight 8/0.315 in: "%%"
*GapsHeight 9/0.354 in: "%%"
*GapsHeight 10/0.394 in: "%%"
*CloseUI: *GapsHeight

*OpenUI *PostAction/Post-Print Action: PickOne
*OrderDependency: 140 AnySetup *PostAction
*DefaultPostAction: TearOff
*PostAction Normal/Use Currently Printer Setting: "%%"
*PostAction None/None: "%%"
*PostAction TearOff/Tear Off: "%%"
*PostAction PeelOff/Peel Off: "%%"
*PostAction Cut/Cut: "%%"
*PostAction PartialCut/Partial Cut: "%%"
*CloseUI: *PostAction

*OpenUI *Occurrence/Occurrence: PickOne
*OrderDependency: 150 AnySetup *Occurrence
*DefaultOccurrence: Every
*Occurrence Every/After Every Page: "%%"
*Occurrence Copies/After Identical Copies: "%%"
*Occurrence Job/After Job: "%%"
*Occurrence Specified/After Specified interval: "%%"
*CloseUI: *Occurrence

*CloseGroup: Media

*OpenGroup: Effects/Effects

*OpenUI *Origin/Origin position Image: PickOne
*OrderDependency: 200 AnySetup *Origin
*DefaultOrigin: Default
*Origin Default/System Default Up: "%%"
*Origin Rotation180/Rotation 180 degree: "%%"
*CloseUI: *Origin

*OpenUI *MirrorImage/Mirror Image: Boolean
*OrderDependency: 210 AnySetup *MirrorImage
*DefaultMirrorImage: False
*MirrorImage True/Yes: "%%"
*MirrorImage False/No: "%%"
*CloseUI: *MirrorImage

*OpenUI *NegativeImage/Negative Image: Boolean
*OrderDependency: 220 AnySetup *NegativeImage
*DefaultNegativeImage: False
*NegativeImage True/Yes: "%%"
*NegativeImage False/No: "%%"
*CloseUI: *NegativeImage

*CloseGroup: Effects

*OpenGroup: PrinterOptions/Printer Options

*OpenUI *PrintSpeed/Print Speed: PickOne
*OrderDependency: 110 AnySetup *PrintSpeed
*DefaultPrintSpeed: Normal
*PrintSpeed Normal/Use Currently Printer Setting: "%%"
*PrintSpeed 2/2.00 in/sec: "%%"
*PrintSpeed 3/3.00 in/sec: "%%"
*PrintSpeed 4/4.00 in/sec: "%%"
*PrintSpeed 5/5.00 in/sec: "%%"
*CloseUI: *PrintSpeed

*OpenUI *Darkness/Darkness: PickOne
*OrderDependency: 120 AnySetup *Darkness
*DefaultDarkness: 15
*Darkness 0: "%%"
*Darkness 1: "%%"
*Darkness 2: "%%"
*Darkness 3: "%%"
*Darkness 4: "%%"
*Darkness 5: "%%"
*Darkness 6: "%%"
*Darkness 7: "%%"
*Darkness 8: "%%"
*Darkness 9: "%%"
*Darkness 10: "%%"
*Darkness 11: "%%"
*Darkness 12: "%%"
*Darkness 13: "%%"
*Darkness 14: "%%"
*Darkness 15: "%%"
*CloseUI: *Darkness

*CloseGroup: PrinterOptions

*OpenGroup: GraphicsFormat/Graphics Format

*OpenUI *DirectBuffer/Direct to Buffer: PickOne
*OrderDependency: 210 AnySetup *DirectBuffer
*DefaultDirectBuffer: AUTO
*DirectBuffer AUTO/Automatic: "%%"
*CloseUI: *DirectBuffer

*OpenUI *StoredGraphics/Stored Graphics: PickOne
*OrderDependency: 220 AnySetup *StoredGraphics
*DefaultStoredGraphics: AUTO
*StoredGraphics AUTO/Automatic: "%%"
*CloseUI: *StoredGraphics

*CloseGroup: GraphicsFormat

*OpenGroup: InstallableOptions

*OpenUI *OptionDisplayUnit/Measurement Units: PickOne
*DefaultOptionDisplayUnit: AUTO
*OptionDisplayUnit AUTO/Automatic: "%%"
*OptionDisplayUnit MM/mm: "%%"
*OptionDisplayUnit Inch/Inch: "%%"
*CloseUI: *OptionDisplayUnit

*CloseGroup: InstallableOptions


*% Generic boilerplate PPD stuff as standard PostScript fonts and so on

*DefaultFont: Courier
*Font AvantGarde-Book: Standard "(001.006S)" Standard ROM
*Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM
*Font AvantGarde-Demi: Standard "(001.007S)" Standard ROM
*Font AvantGarde-DemiOblique: Standard "(001.007S)" Standard ROM
*Font Bookman-Demi: Standard "(001.004S)" Standard ROM
*Font Bookman-DemiItalic: Standard "(001.004S)" Standard ROM
*Font Bookman-Light: Standard "(001.004S)" Standard ROM
*Font Bookman-LightItalic: Standard "(001.004S)" Standard ROM
*Font Courier: Standard "(002.004S)" Standard ROM
*Font Courier-Bold: Standard "(002.004S)" Standard ROM
*Font Courier-BoldOblique: Standard "(002.004S)" Standard ROM
*Font Courier-Oblique: Standard "(002.004S)" Standard ROM
*Font Helvetica: Standard "(001.006S)" Standard ROM
*Font Helvetica-Bold: Standard "(001.007S)" Standard ROM
*Font Helvetica-BoldOblique: Standard "(001.007S)" Standard ROM
*Font Helvetica-Narrow: Standard "(001.006S)" Standard ROM
*Font Helvetica-Narrow-Bold: Standard "(001.007S)" Standard ROM
*Font Helvetica-Narrow-BoldOblique: Standard "(001.007S)" Standard ROM
*Font Helvetica-Narrow-Oblique: Standard "(001.006S)" Standard ROM
*Font Helvetica-Oblique: Standard "(001.006S)" Standard ROM
*Font NewCenturySchlbk-Bold: Standard "(001.009S)" Standard ROM
*Font NewCenturySchlbk-BoldItalic: Standard "(001.007S)" Standard ROM
*Font NewCenturySchlbk-Italic: Standard "(001.006S)" Standard ROM
*Font NewCenturySchlbk-Roman: Standard "(001.007S)" Standard ROM
*Font Palatino-Bold: Standard "(001.005S)" Standard ROM
*Font Palatino-BoldItalic: Standard "(001.005S)" Standard ROM
*Font Palatino-Italic: Standard "(001.005S)" Standard ROM
*Font Palatino-Roman: Standard "(001.005S)" Standard ROM
*Font Symbol: Special "(001.007S)" Special ROM
*Font Times-Bold: Standard "(001.007S)" Standard ROM
*Font Times-BoldItalic: Standard "(001.009S)" Standard ROM
*Font Times-Italic: Standard "(001.007S)" Standard ROM
*Font Times-Roman: Standard "(001.007S)" Standard ROM
*Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
*Font ZapfDingbats: Special "(001.004S)" Standard ROM

Any ideas what could be wrong?

I can confirm similar behaviour with a clone "XP-490" roll printer, on glabels v3.99 on Ubuntu from 20.04 to 23.04

I'm suspecting there's an issue with a loop, or a nested loop, that's walking through the selected merge list improperly.

Here's the behaviour I saw on my setup, so that it can be reproduced, and perhaps, the bug can be found and squashed.

  • 1 selection in the merge list: 1 label

  • properly printed

  • 2 selections in the merge list: 3 labels

  • first is properly printed

  • second is an overprint or over-render of selections 1 + 2

  • third that shouldn't print, is also a selection of 1+2

  • 3 selections in the merge list: 6 labels.

  • first is properly printed

  • labels 2 and 3: over-render of selections 1 + 2

  • labels 4, 5, 6: over-render of selections 1+2+3

The bug is such that many labels are both over-rendered (ergo, not useful), and over-printed... geometrically.

  • 1 merge selections - 1 print -- (N prints)
  • 2 merge selections - 3 prints -- (N*(N-1) prints)
  • 3 merge selections - 6 prints -- (N*(N-1) prints)

In the Print Preview, it only shows the "N" selections, not the higher count of actually printed / over-rendered labels.

Hope this helps clarify the issue, so the offending code can be sleuthed out and a fix applied.

I have the same issue when I print a PDF now without using glabels so I think it may actually be something in the xprinter filter. I am currently trying to find another way around that filter since it's closed source.