Page layout n specifications for Thermal printer

View: New views
1 Messages — Rating Filter:   Alert me  

Page layout n specifications for Thermal printer

by xsltuser :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 Hi,

I'm using XSLT to transform XML data to PDF receipts for my application.  The generated PDF look good when I do a print preview and fire printouts on a printer with A4 size sheets but if I fire printout on a thermal printer after changing page-specifications in my XSLT, printed PDF content comes out to be very tiny all concentrated on one end of the page. Below is the snippet of the XSLT I'm using. Can anyone guide me how to change its specifications for thermal printing.

<xsl:template match="/">

        <fo:root font-size="8pt" color="black" font-family="MyriadMed">
            <fo:layout-master-set>
                <fo:simple-page-master master-name="POSReceipt" page-height="20cm" page-width="8cm"
                    margin-top="1.25cm" margin-bottom="0.25cm" margin-left="0.25cm"
                    margin-right="0.25cm">
                    <fo:region-body margin-top="5cm" margin-bottom="7cm"/>
                    <fo:region-before extent="4cm"/>
                    <fo:region-after extent="6cm"/>
                </fo:simple-page-master>
            </fo:layout-master-set>

            <fo:page-sequence master-reference="POSReceipt">
                <fo:static-content flow-name="xsl-region-before">
                    <fo:block>
                        <xsl:call-template name="adminReceiptHeader"/>
                    </fo:block>
                </fo:static-content>
                <fo:static-content flow-name="xsl-region-after">
                    <fo:block>
                        <xsl:call-template name="adminReceiptFooter"/>
                    </fo:block>
                </fo:static-content>
                <fo:flow flow-name="xsl-region-body">
                    <fo:block>
                        <xsl:call-template name="adminReceiptBody"/>
                    </fo:block>
                </fo:flow>
            </fo:page-sequence>

        </fo:root>
    </xsl:template>