Clive, here's an other XSLT for PDFspy. This one generates a simple HTML report for image information.
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" version="1.0">
<!--
File : imageinfo.xsl
Author : Lawrence E. Freil
Date Created : May 7, 2004
Description : This file is an XSL stylesheet used as a demonstration
for pdfspy. It will output a short HTML report of all the images used in the file.
Copyright (C) - 2004 by Apago Inc.
-->
<!-- Text gobbler! -->
<xsl:template match='text()'>
</xsl:template>
<xsl:template match='/'>
<!-- If the user specified default styles in the view file, then
we will use those styles and hope he set them up nicely.
Otherwise we will default to our own style here.
-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</META>
<TITLE><xsl:value-of select="pdfattrs/@path"/></TITLE>
</SCRIPT>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#ffffcc">
<CENTER>
<H1>Image Report</H1>
<H3>for</H3>
<H2><xsl:value-of select="pdfattrs/@path"/></H2>
</CENTER>
<STYLE TYPE="text/css">
DIV.title { background-color:teal; color:white;
font-family:Verdana,arial; font-size:14pt;
padding:2px;
}
DIV.asset { background-color:black; color:white;
font-family:Verdana,arial; font-size:14pt;
padding:2px;
}
A.titlelink { color:aqua; }
DIV.body { background-color:#ffffcc; color:Black;
padding:2px;
font-size:11pt;
}
<!-- The following turns off underlines over links -->
A { text-decoration: none; }
A:hover { color:red }
</STYLE>
<xsl:apply-templates />
</BODY>
</HTML>
</xsl:template>
<xsl:template match="pdfattrs">
<table border="0" cols="1" units="PIXELS" width="600" >
<tr><h3>Document Info</h3></tr>
<tr>PDF Version: <xsl:value-of select="./@version"/></tr>
<tr>Page Count: <xsl:value-of select="count(./page)"/></tr>
<tr>Fast Web View Enabled: <xsl:value-of select="./@linearized"/></tr>
<tr>Encrypted: <xsl:value-of select="./@encrypted"/></tr>
<tr>Tagged: <xsl:value-of select="./@tagged"/></tr>
<tr>Filesize: <xsl:value-of select="./@filesize"/> bytes</tr>
<tr/>
</table>
<xsl:apply-templates select="page" />
</xsl:template>
<xsl:template match="page">
<h3>Page #<xsl:value-of select="@id"/></h3>
<xsl:apply-templates select="images"/>
</xsl:template>
<xsl:template match="images">
<TABLE BORDER="0" UNITS="PIXELS" width="700" COLS="11">
<TR>
<TD><B>ID</B></TD>
<TD><B>BPC</B></TD>
<TD><B>Colorspace</B></TD>
<TD><B>Filter</B></TD>
<TD><B>Height</B></TD>
<TD><B>Width</B></TD>
<TD><B>x Res</B></TD>
<TD><B>y Res</B></TD>
<TD><B>x Scale</B></TD>
<TD><B>y Scale</B></TD>
<TD><B>Rotation</B></TD>
<xsl:apply-templates />
</TR>
</TABLE>
</xsl:template>
<!-- Display the info for each image. In addition to just printing
the basics also check to make sure each image is referenced in
at least one page and issue a notice if it is unreferenced
-->
<xsl:template match="image">
<TR>
<TD><xsl:value-of select="./@id"/></TD>
<TD><xsl:value-of select="./@bpc"/></TD>
<TD><xsl:value-of select="./@colorspace"/></TD>
<TD><xsl:value-of select="./@filter"/></TD>
<TD><xsl:value-of select="./@height"/></TD>
<TD><xsl:value-of select="./@width"/></TD>
<TD><xsl:value-of select="./@xres"/></TD>
<TD><xsl:value-of select="./@yres"/></TD>
<TD><xsl:value-of select="./@xscale"/></TD>
<TD><xsl:value-of select="./@yscale"/></TD>
<TD><xsl:value-of select="./@rotation"/></TD>
</TR>
</xsl:template>
</xsl:stylesheet>