AffineTransform basicPageTransform = new AffineTransform(1, 0, 0, -1, 0,
(scaleY * size.height) / 1000f);
basicPageTransform.scale(scaleX, scaleY);
+ generator.saveGraphicsState();
generator.concatenate(basicPageTransform);
}
/** {@inheritDoc} */
public void endPageContent() throws IFException {
- //nop
+ generator.restoreGraphicsState();
+ //for top-level transform to change the default coordinate system
}
/** {@inheritDoc} */
this.borderPainter = new PDFBorderPainter(this.generator);
// Transform the PDF's default coordinate system (0,0 at lower left) to the PDFRenderer's
+ saveGraphicsState();
AffineTransform basicPageTransform = new AffineTransform(1, 0, 0, -1, 0,
pageHeight / 1000f);
generator.concatenate(basicPageTransform);
- /*
- currentState.concatenate(basicPageTransform);
- currentStream.add(CTMHelper.toPDFString(basicPageTransform, false) + " cm\n");
- */
super.renderPage(page);
+ restoreGraphicsState();
if (accessEnabled) {
logicalStructureHandler.endPage();
}
data.fontSize = this.fontSize;
data.lineWidth = this.lineWidth;
data.dashArray = this.dashArray;
+ if (this.transform == null) {
+ this.transform = new AffineTransform();
+ }
data.transform = new AffineTransform(this.transform);
return data;
}
documents. Example: the fix of marks layering will be such a case when it's done.
-->
<release version="FOP Trunk" date="TBD">
+ <action context="Renderers" dev="JM" type="fix">
+ Added a save/restoreGraphicsState pair for the initial coordinate system in PDF output
+ for easier post-processing.
+ </action>
<action context="Images" dev="JM" type="add">
Added customization ability for the image loading framework from FOP's configuration file.
</action>