0

I would like to add page numbers to the bottom right corner of every page in this XSL code for PDF file. I even ask to chatGPT but I couldn't get it right. I would appreciate your help!

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" encoding="UTF-8" method="xml" />
  <xsl:param name="CAPTURE_FORMAT">bmp</xsl:param>
  <xsl:param name="REPORT">joblist</xsl:param>
  <xsl:param name="LOCALE">nl</xsl:param>
  <xsl:param name="FORMAT">pdf</xsl:param>
  <xsl:param name="CAPTURE">job,tool{w=350}{h=500}{style=2D}{dims=true}{blackAndWhite=true}{backgroundColor=00FFFFFF}{toolColor=00FFFF}{holderColor=C0C0C0}{headColor=#000000}{extensionColor=808080}{toolHolderColor=808080}{insertColor=#000000}{dimensionColor=#000000}{centerLineColor=#000000}{exactGeometryColor=#F0F0F0}{freeTip=true}</xsl:param>
  <xsl:template match="/">
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
        <title>Joblist Report</title>
        <style type="text/css">@page {size:portrait;margin-top:0mm;margin-left:0mm;margin-right:0mm;margin-bottom:0mm;
          body {
            font-family: Arial;
          }
</style>
      </head>
      <body>
        <xsl:apply-templates />
      </body>
    </html>
  </xsl:template>
  <xsl:template match="JobList">
    <div style="">
      <table width="100%" border="0" style="border-bottom:2px solid Black;border-right:2px solid Black;border-left:2px solid Black;">
        <tbody style="border-bottom:2px solid Black;border-right:2px solid Black;border-left:2px solid Black;">
          <xsl:for-each select="Tool">
            <tr style="height:1;">
              <td style="height:1;">
                <xsl:value-of select="@identifier" />
              </td>
            </tr>
          </xsl:for-each>
        </tbody>
      </table>
    </div>
  </xsl:template>
</xsl:stylesheet>
  • Your xsl produces HTML. What you are asking should contain what product you use to convert HTML to PDF and whether it supports the CSS you are using. – Kevin Brown Apr 05 '23 at 16:28

0 Answers0