Debug log:


Label factory

Generating labels - just another thing that can be a pain. Let's fix that.


Introducing loops

Loops are great for reports. Just look how easy a precision label chart is created. The loop-tag is global,  meaning that it's always available and does not have to be declared by the loaded content-type.


Also note how rows may be broken using the backslash, as well as commenting is supported using #.


<content type="pdf/report" output="$$s|output$$" filename="$$s|labelName$$.pdf" \
font="helvetica:12" margins="17,8" measure="mm" pagesize="a4" orientation="l">
        <loop name="rows" stop="3">
            <loop name="cols" stop="7">
<raw type="php"> 
    //calc xy for cell. should be enough..
    $x = $this->parseFaStr('$$loopCnt|cols$$') * 38 - 38;
    $y = $this->parseFaStr('$$loopCnt|rows$$') * 64 - 64;
    $this->s['xy'] = $x . ',' . $y;
                <panel xy="$$s|xy$$" wh="36,63" color="#FFF">
                    <drawcolor html="#000"/>
                    <textcolor html="#000"/>
                    <image path="labelLogo.png" xy="9,2" w="18" />
                    <font font="helvetica:5" />
                    <textwithdirection xy="34,9" text="$$s|labelName$$" direction="U"/>
                    <font font="helvetica:10:b" />
                    <cell xy="6,7" wh="24,3" align="C"  text="$$s|ItemNo$$"/>
                    <font font="helvetica:8:b" />
                    <cell xy="6,3r" wh="24,5" align="C"  text="$$s|Title$$"/>
                    <cell xy="6,3r" wh="24,5" align="C"  text="$$s|Title2$$"/>
                    <rrect xy="2,18" wh="32,17" radius="2"/>
                    <font font="helvetica:5:b" />
#minor stuff removed for simplicity.
                    <textwithdirection xy="6,50" text="Price" direction="U"/>
                    <font font="helvetica:6" />
                    <cell xy="15,42" wh="20,3" align="C" text="$$s|ItemNo$$"/>
                    <ean13 xy="14,45" wh="20,6" value="$$s|BarCode$$" />
                    <cell xy="15,51" wh="20,3" align="C" text="$$s|BarCode$$"/>
                    <font font="helvetica:7:b" />