IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#56276 - 09/05/18 09:34 AM Barcode positioning in PressTalk
douglasb Offline
OL Toddler

Registered: 08/24/04
Posts: 42
Loc: Cheshire, UK
I need to place several barcodes on a page and am using PressTalk to do this. My code is

% Barcode

moveto(5.6,&mVerticalPosition-0.25)
&BarCode:=(GetMeta('BarCode['+inttostr(&i)+']', 0, 'Job.Group.Document'))
setfillcolor([0,0,0,100])
showbarcodecode39(&BarCode,11,false,false,false)
setstyleext(&Helvetica,8,0,[100],100)
moveto(6.3,&mVerticalPosition+0.5)
show(&BarCode)

This is within a loop that advances &mVerticalPosition and &i on each iteration.

In Designer this looks correct, however when I preview or print this the barcodes are stacked on top of each other at the top left corner of the page.

Any ideas why the Designer view is correct but Preview isn't?

Top
#56292 - 09/11/18 06:07 AM Re: Barcode positioning in PressTalk [Re: douglasb]
stuartg Offline
OL Expert

Registered: 03/06/03
Posts: 713
Loc: Swindon, England
Doug
showbarcodecode39 always puts stuff at the origin (I would insert an emoji here, but which one?)
Instead of using move() to shift the barcode use translate(). Then you have to surround the whole lot with a gsave() and grestore().
Hope that helps
Stuart

Top
#57400 - 01/27/20 10:10 AM Re: Barcode positioning in PressTalk [Re: douglasb]
Stephenlnoe Offline
OL Newbie

Registered: 11/07/19
Posts: 20
Thank you, this helped me too.

Top