Skip to content
Advertisement

Possible to start printing on 3rd label on 2nd row with FPDF or TCPDF?

Is it possible to start printing on a particular label (set by a $_POST) value? If I have 10 labels to a page, and I want them to start on the 3rd label (2nd label on the 2nd row), is there a way to tell either FPDF or TCPDF to do that?

Update:

This is where the class for fPDF labels comes from: fPDF Label Class

The line of code that controls this in fPDF is:

function __construct($format, $unit='mm', $posX=1, $posY=1)

When I change the $posx=__ and the $posY=__, the labels DO start printing in different positions!

However, when I set:

function __construct($format, $unit='mm', $posX=$setthex, $posY=$setthey)

I get an error: PHP Fatal error: Constant expression contains invalid operations

I’ve read about this on SO, but I’m at a loss regarding ‘Static’ issues…

Advertisement

Answer

I figured it out, kind of .. Not with these variables, but by inserting X amount of blank labels before I started printing the correct ones.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement