[FOray-commit] SF.net SVN: foray:[10761] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2009-04-24 21:21:49
|
Revision: 10761
http://foray.svn.sourceforge.net/foray/?rev=10761&view=rev
Author: victormote
Date: 2009-04-24 21:21:41 +0000 (Fri, 24 Apr 2009)
Log Message:
-----------
Push more of the PostScript API to aXSL.
Modified Paths:
--------------
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormEps.java
trunk/foray/foray-ps/src/java/org/foray/ps/PsServer4a.java
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormEps.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormEps.java 2009-04-24 21:10:05 UTC (rev 10760)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormEps.java 2009-04-24 21:21:41 UTC (rev 10761)
@@ -29,13 +29,13 @@
package org.foray.pdf.object;
import org.foray.ps.PsException;
-import org.foray.ps.PsInputFile;
import org.foray.ps.PsInterpreter;
import org.foray.ps.pdf.PDFSystemDict;
import org.axsl.graphic.EpsGraphic;
import org.axsl.graphic.GraphicException;
import org.axsl.ps.BoundingBox;
+import org.axsl.ps.PsInput;
import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
@@ -67,9 +67,9 @@
*/
protected byte[] getPdfContent() throws GraphicException {
final File file = new File(getGraphic().getUrl().getFile());
- PsInputFile psInput = null;
+ PsInput psInput = null;
try {
- psInput = new PsInputFile(file);
+ psInput = this.getPDFDocument().getPsServer().makePsInput(file);
} catch (final IOException e) {
throw new GraphicException("Cannot open EPS file.");
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PsServer4a.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PsServer4a.java 2009-04-24 21:10:05 UTC (rev 10760)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PsServer4a.java 2009-04-24 21:21:41 UTC (rev 10761)
@@ -43,8 +43,11 @@
import org.foray.ps.filter.RunLengthEncodeFilter;
import org.axsl.ps.PsFilterType;
+import org.axsl.ps.PsInput;
import org.axsl.ps.PsServer;
+import java.io.File;
+import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -125,4 +128,11 @@
}
}
+ /**
+ * {@inheritDoc}
+ */
+ public PsInput makePsInput(final File inputFile) throws IOException {
+ return new PsInputFile(inputFile);
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|