need help xalan-J images
I'm using XALAN Java 2 to translate "xsl" stylesheets to "fo" and the result to "pdf" I have to insert a graphic using URL from xml file This works fine, but all images are scaled to the specified height and width. If I remove this attributes, all images greater than page size () produce an infinite loop on translation. I tried to use "max-height" and "max-width", but xalan ignores this and tells me: Warning: property - "max-height" is not implemented yet. Warning: property - "max-width" is not implemented yet. Can anyone tell me another solution to find out whether the image must be scaled to fit the page size or not? ThanX Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Printing Page Setup
Hi all I've a problem with setup the printed page sizes. In the Application the user (must have) has the possibility to change the papar format of the printed documents. I'm using AWTRenderer to preview some files on screen before printing. My xsl templates have an Page Master like this:
Manipulating page-width / page-height
Hi all Is there any way to invoke the width and height property of the PageMaster instance, to set this page properties from within the java code??? In my xsl template no width and height is set, but the rendered page comes with 576000x792000 mpixels. Can I manipulate the properties with my data (and if yes where!). ThanX Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Manipulating page-width / page-height
ThanX that is exactly what I need. I will check it out. I've tried to overwrite AWTRenderer etc. [ for a lot of hours :( ], but no usable result arose, because I had only the chance to scale the rendered image into my format (thats not the right way for different page geometries), for printing and print preview. ThanX also to Jeremias Maerki, but I'm not so familiar with XSLT so that I wasn't able to understand your suggestion correct. cu all Torsten Erler -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 24. April 2002 22:58 To: [EMAIL PROTECTED] Subject: Re: Manipulating page-width / page-height Torsten Erler wrote: > Is there any way to invoke the width and height property of the PageMaster > instance, to set this page properties from within the java code??? In my xsl > template no width and height is set, but the rendered page comes with > 576000x792000 mpixels. Can I manipulate the properties with my data (and if > yes where!). There are a lot of properties. The easiest way is probably to use XSLT parameters. Declare global parameters in the XSL file: and use them in the page-master ... ... Look up details in the XSLT spec: http://www.w3.org/TR/xslt You can set values for the parameters from your Java code by using the setParameter() method of your transformer: transformer=factory.newTransformer(xsl); transformer.setParameter("page-height","29.1cm"); transformer.setParameter("page-width","21.9cm"); Lookup details in the JAXP documentation. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
external-graphic size
Hi all I've a problem with external graphics, which can be greater than the page size of the xsl-template. The properties max-height and max-width doesn't work (not implemented). The result is an infinite loop on rendering the (correctly) generated "fo"-file with the AWTRenderer to display the result. Is there a workaround for that or have I omit an important setting (possible in xsl) for a parent object. cu Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: external-graphic size
Yes I'm using this as temporarily solution to avoid program crashes, but even the image is scaled into the specified size, also if it has original size of e.g. 10x15 pixel. This produces a unusable chequered print-preview. Is there another way to force the scaling only if the image overflows the dimension of the page body area??? P.S.: I've tried to overwrite AWTRenderers "renderImageArea(ImageArea area)"to scale the image before painting, but it seems to be the loop occures before on formatting the area tree (I'll debug this step by step, to find the precise position). ThanX Torsten -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED]] Sent: Montag, 29. April 2002 01:21 To: [EMAIL PROTECTED] Subject: Re: external-graphic size Torsten Erler wrote: > I've a problem with external graphics, which can be greater than the page > size of the xsl-template. The properties max-height and max-width doesn't > work (not implemented). The result is an infinite loop on rendering the > (correctly) generated "fo"-file with the AWTRenderer to display the result. > Is there a workaround for that or have I omit an important setting (possible > in xsl) for a parent object. Try setting height and/or width on the fo:external-graphic element. If you specify both, the graphic may be stretched, of you specify only one, the aspect ratio is conserved. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: external-graphic size
ThanX fred After many hours of work for scaling the picture right (with attention for margins and static areas etc.), now I've accidental changed the layout master set "extend" attributes of the regions: before and after as well as the top/bottom margin unit of measures from "mm" to "px" for space saving and the problem ends up in smoke. The image is scaled correct and no infinite loop occures. I think there is a rounding failure anywhere deep in the program on translation different unit of measures into pixels, which produces this failure. By Torsten -Original Message- From: fred redf [mailto:[EMAIL PROTECTED]] Sent: Montag, 29. April 2002 10:23 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: external-graphic size Hi all, I had the same prob in my project. I made a little java class (based on some code i found on the internet) that calculate the actual width of my image. I call that class inside my xsl (thru xalan java extension). Then, according to some rules, i configure width="Xcm" inside external graphic tag. Here is some example of my code : -< snip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Font Metrics AWT
Hi all! Now I've downloaded the sdk version 1.3.1_03 from sun but the result is the same like before. I've attached a screenshot to this mail. My workflow: I go to the Driver, set the Logger and my Renderer(extended from AWTRenderer), and call render(XMLReader,InputSource) on the Driver, After that I go to my Renderer and render each page in a loop and add the result within a JLabel to a JPanel, which is showing for the User. code piece: driver.render( parser, inputHandler.getInputSource() ); for (int i = 0; i < renderer.getNumberOfPages(); i++) { renderer.render(i); JLabel label = new JLabel( new ImageIcon( renderer.getLastRenderedPage() ) ); panel.add( label, new GridBagConstraints(0, i, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(6, 6, 6, 6), 0, 0)); } the result is below Can anyone help me or tell me my mistake? ThanX Torsten rendered_contract.gif Description: GIF image - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Font Metrics AWT
I'm using fop v0.20.3, on WINNT 4.0 SP6, java v1.3.1 (required for the project -> 1.4 not possible at this time) Here are the results from command line awt rendering for java 1.3.1 and java 1.4 (looks better) cu Torsten (ThanX for replies) -Original Message- From: Ralph LaChance [mailto:[EMAIL PROTECTED]] Sent: Samstag, 11. Mai 2002 04:22 To: [EMAIL PROTECTED] Subject: RE: Font Metrics AWT Trying to place your results on a JLabel rings a bell but I can't recall why Could you try running the vanilla command-line fop -awt and see if you get better results ? something like java -cp org.apache.fop.apps.Fop -xsl -xml -awt Also, please give you fop version , os ? , the usual stuff (hmmm, perhaps I'm showing my age in more ways than one; I cannot recall if the current maintenance branch still has a command-line invocation. Our production usage is based on fop 0.20.1) ' Best, -Ralph LaChance awt_java1.4.gif Description: GIF image awt_java1.3.1.gif Description: GIF image - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
garbage collection on reset
Hi all! Can I (and if yes, how can I) configure the MEM_PROFILE_WITH_GC variable on StreamRenderer to run garbage collector every start and finish to save memory on batch printing? Additional, please take a look on FopImageFactory. This class holds strong references to every loaded image. No reload and recalculate the dimension of the image (which has modified since the last loading) is possible at any time. This is the cause why modified images are scaled to the size of the first loaded image on awt/print rendering. I've overriden the class to disable the caching complete (Batch printing uses 500++ MB!!! memory usage after loading 20 to 30 images and it crashes due to OutOfMemoryError). I don't know whether this is fixed in your current project status, if yes ignore this. ThanX Torsten P.S.: ThanX to all, who spend a lot of time to make this powerful program more stable and more extensive. I think this and of course the other apache projects, are a great contribution to bring java ( my favorite ) to the most popular and most useful programming language. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: dynamic table-column-width
I think you have to calculate the column-width in your java code and then pass it to the xml or direct to the xslt transformer as parameter. possibility 1: create xml structure like this in your data source 10 15 30 in your xsl read out this values possibility 2: pass the values to the stylesheet at transforming process Transformer transformer = = TransformerFactory.newInstance().newTransformer( xslSource ); transformer.setParameter( "table1-column1", yourValue1 ); transformer.setParameter( "table1-column2", yourValue2 ); ... in your xsl catch the parameters and use it to set the columns Note that all of this is untestet stuff and may not work. cu Torsten -Original Message- From: Juergen Lippold [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 15. Mai 2002 11:17 To: > Subject: dynamic table-column-width Hello, does anybody know if there is a possibilty to let FOP-Managing the column-width? The problem is that I've got some tables with String-attributes for each column with a different width. There is one possibiltity to calculate the width in the java application, but I don't think that there will be very good performance doing this because you have to check the length of all the Strings. Thanks for help. Juergen Lippold - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: dynamic table-column-width
Mistake discovered: xml datasource should look like this 10 15 30 >snip... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: garbage collection on reset
Hi The workflow is following: - I create many images like file://c:/a/1/temp.gif, file://c:/a/2/temp.gif and file://c:/a/3/temp.gif - I add the path's to my xml structured document - I transform this document and an accordingly xsl to and tmp.fo file - this fo-file will be rendered for print-preview via an AWTRenderer Subclass - I call reset on Driver, my renderer and set new inputsource etc. On batch printing this workflow repeats x-times and for every rendering process the image-files will be created in the same way. That means, independant on how many gifs I've to produce for the current preview, all files are located in folder "a" and all files are named temp.gif. Only the directory which holds the file is (incremetal) different, but starts for each preview with "1". After the preview is done the directory file://c:/a and all child files will be removed from the computer. The first Preview works correct, but if I try to go the same way more than one times, all following AWT-rendered Images are scaled to the size calculated to the first loading of file://c:/a/1/temp.gif , but the size and contents of the file has changed completely. The FopImageFactory maps the String representation of the image URL to the calculated FOPImage. On request it returns the wrong FOPImage, because of no check for last modified date ore something is done. That means the ImageArea which is constructed on rendering process has the wrong dimensions. AWTRenderer's renderImageArea(ImageArea) method loads the correct (actual) image from the URL and the direct drawing from Graphics2D will scale the image into the shape-dimensions of the obsolete FOPImage. The results are funny if the first picture has a dimesion of 100x800 points and the second one (with exactly the same url) has 600x200 points. Hope that helps cu Torsten > -Original Message- > From: Arved Sandstrom [mailto:[EMAIL PROTECTED]] > Sent: Mittwoch, 15. Mai 2002 12:29 > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: garbage collection on reset > > > Hi, Torsten > > All points are noted. > > I am not sure I understand what you want to see in the case > of modified > images. In the general case, as soon as you change the dimension of an > image, you might potentially have to recalculate _all_ > layout. The rendering > cannot independently start using a new image size. > > I think I am missing something. Can you describe this scenario in more > detail? It sounds like a good use case. > > Regards, > Arved Sandstrom > > > -Original Message- > > From: Torsten Erler [mailto:[EMAIL PROTECTED]] > > Sent: May 15, 2002 6:23 AM > > To: Fop-Dev (E-mail) > > Subject: garbage collection on reset > > > > Can I (and if yes, how can I) configure the MEM_PROFILE_WITH_GC > > variable on > > StreamRenderer to run garbage collector every start and > finish to save > > memory on batch printing? > > > > Additional, please take a look on FopImageFactory. This > class holds strong > > references to every loaded image. > > No reload and recalculate the dimension of the image (which > has modified > > since the last loading) is possible at any time. This is > the cause why > > modified images are scaled to the size of the first loaded image on > > awt/print rendering. > > I've overriden the class to disable the caching complete > (Batch printing > > uses 500++ MB!!! memory usage after loading 20 to 30 images > and it crashes > > due to OutOfMemoryError). > > I don't know whether this is fixed in your current project > status, if yes > > ignore this. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
FW: Environment problem
Sorry for crossposting, but the problem occures, if I try to get the Parser from FOInputHandler in the junit test case. inputHandler.getParser() throws a FOPException: org.apache.fop.apps.FOPException: org.apache.xerces.parsers.SAXParser is not a SAX driver at org.apache.fop.apps.InputHandler.createParser(InputHandler.java:75) at org.apache.fop.apps.FOInputHandler.getParser(FOInputHandler.java:40) based on a ClassCastException: java.lang.ClassCastException: org.apache.xerces.parsers.StandardParserConfiguration at org.apache.xerces.parsers.SAXParser.(SAXParser.java:95) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:232) at org.apache.fop.apps.InputHandler.createParser(InputHandler.java:66) at org.apache.fop.apps.FOInputHandler.getParser(FOInputHandler.java:40) ... The SAX2 final version isn't correct set only in the test case (in the application every thing works fine)!? > -Original Message- > From: Torsten Erler [mailto:[EMAIL PROTECTED]] > Sent: Donnerstag, 16. Mai 2002 09:37 > To: Xalan-Dev (E-mail) > Subject: Environment problem > > > Hi all > > I've a incomprehensibly problem with the SAX environment. > > If I start my project and run EnvironmentCheck all is ok: > > # BEGIN writeEnvironmentReport($Revision: 1.10 $): Useful stuff > found: > version.DOM.draftlevel=2.0fd > java.class.path=>snip (too long) > version.JAXP=1.1 > java.ext.dirs=D:\javasoft\jdk1.3.1\jre\lib\ext > version.xerces2=Xerces-J 2.0.1 > version.xerces1=not-present > version.xalan2_2=Xalan Java 2.3.1 > version.xalan1=not-present > version.ant=not-present > java.version=1.3.1_03 > version.DOM=2.0 > version.crimson=not-present > sun.boot.class.path=D:\javasoft\jdk1.3.1\jre\lib\rt.jar;D:\jav > asoft\jdk1.3.1 > \jre\lib\i18n.jar;D:\javasoft\jdk1.3.1\jre\lib\sunrsasign.jar; > D:\javasoft\jd > k1.3.1\jre\classes > # BEGIN Listing XML-related jars in: > foundclasses.java.class.path > xml-apis.jar-apparent.version=xml-apis.jar from xalan-j_2_3_0 from > xml-commons-1.0.b2 > xml-apis.jar-path=f:\java\projects\star\beta\java\ext\tools\li > b\xalan-2.3.1_ > xml-apis.jar > #- END Listing XML-related jars in: > foundclasses.java.class.path - > version.SAX=2.0 > version.xalan2x=Xalan Java 2.3.1 > #- END writeEnvironmentReport: Useful properties found: - > # YAHOO! Your environment seems to be OK. > > Then, I have a test class and if I start this unit test with 100% > identically classpath the result is: > > # BEGIN writeEnvironmentReport($Revision: 1.10 $): Useful stuff > found: > version.DOM.draftlevel=2.0fd > java.class.path=>snip (too long) > version.JAXP=1.1 > java.ext.dirs=D:\javasoft\jdk1.3.1\jre\lib\ext > version.xerces2=Xerces-J 2.0.1 > version.xerces1=not-present > version.xalan2_2=Xalan Java 2.3.1 > ERROR.version.SAX=ERROR attempting to load SAX version 2 class: > java.lang.NoSuchMethodException: setAttributes > ERROR.=At least one error was found! > version.xalan1=not-present > version.ant=not-present > version.SAX-backlevel=2.0beta2-or-earlier > java.version=1.3.1_03 > version.DOM=2.0 > version.crimson=not-present > sun.boot.class.path=D:\javasoft\jdk1.3.1\jre\lib\rt.jar;D:\jav > asoft\jdk1.3.1 > \jre\lib\i18n.jar;D:\javasoft\jdk1.3.1\jre\lib\sunrsasign.jar; > D:\javasoft\jd > k1.3.1\jre\classes > # BEGIN Listing XML-related jars in: > foundclasses.java.class.path > xml-apis.jar-apparent.version=xml-apis.jar from xalan-j_2_3_0 from > xml-commons-1.0.b2 > xml-apis.jar-path=f:\java\projects\star\beta\java\ext\tools\li > b\xalan-2.3.1_ > xml-apis.jar > #- END Listing XML-related jars in: > foundclasses.java.class.path - > version.xalan2x=Xalan Java 2.3.1 > #- END writeEnvironmentReport: Useful properties found: - > # WARNING: Potential problems found in your environment! > #Check any 'ERROR' items above against the Xalan FAQs > #to correct potential problems with your classes/jars > #http://xml.apache.org/xalan-j/faq.html > > Can anyone help me? I don't understand the difference, > because the classpath > and the sequence of jar files is the same in both cases! > > ThanX Torsten > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Environment problem (fixed)
Hi, just for information, for anyone, who gets in the same trouble! I've found the problem with the obsoleter SAX-2 implementation. In my classpath are 2 different xml-api's (I know about that, but I cannot avoid that, because of foreign parts in our app are delivered with this api contained in the jar file). To solve this, the xalan/xerxes libraries are in front of my classpath and it works fine, but JUnit uses two different classloader, the System ClassLoader and for reloading classes in gui (swing) testing they are using their own Class Loader. This loader seems to ignore the sequence of libraries in the classpath and returns the wrong implementation class (SAX 2.0beta2). Now I've disabled class reloading and all works perfect (May god be praised). cu Torsten :) ---snip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Font Metrics AWT
Hi all Great work Ralph. The results looks very good and I hope the next release contains your fix. I've and additional wish for the AWTRenderer. Can anyone make the 'graphic' variable protected, to enable sublasses to draw on it? In my case I have to divide between final print and test print (crisscross the page and draw a test string on it). At this time I have to do it twice (without patching original sources). Firtsly at renderPage(Page) where I create my own Graphics2D instance after super.renderPage(Page) has finished and secondly on print with the passed in Graphics2D parameter. I think programmer who subclass the original know that they have to work with the graphics variable careful and are responsible for their own mistakes. Therefore I don't see a reason to hold the instance restrictively with private access. ThanX a lot (especially to ralph for the fix) cu Torsten > -Original Message- > From: Ralph LaChance [mailto:[EMAIL PROTECTED]] > Sent: Donnerstag, 16. Mai 2002 17:05 > To: [EMAIL PROTECTED] > Subject: RE: Font Metrics AWT > > > I have found the problem and worked out its repair. > The modified code is attached below. > > The problem stems from a bug in java's handling of drawing of > AttributedStrings when a font attribute is specified. Bug parade > #4650042 describes a similar problem unique to jdk 1.4, but > makes also suggests that there are other more general problems > w/ fonts and AttributedStrings. > > In our case, calling > drawString (string) instead of > drawString (AttributedString...) solves the problem. > > The fix simply draws the text using the string version of > drawString and then to draw the underline (if defined) > separately. > > I have tested it on jre 1.3.0, jre 1.3.0_02 and jre/jdk 1.4.0 - > all on WinNT4/sp5 > > attached is the changed code -- it only affects one method > in AWTRenderer. > > Will someone commit it ? > > x--snip ... x--snap > > > ' Best, > -Ralph LaChance > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
eps preview - question
Hi all I've a little(?) problem on previewing eps graphics in an awt-rendered window. I know that acrobat reader doesn't preview emebedded postscript. But have I misunderstood, I thought fop does the preview on screen!? I'm using 'external-graphic' for that. My rendered page does preserve the space correct for the picture but it doesn't show everything of the picture. I need this preview to give the user the possibility to cancel the printerjob before printing. Has anyone an idea what is going wrong or a way to do it? ThanX cu Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: eps preview - question
Ok thanks! :( cu Torsten P.S. Is there another known way to make eps visible in java? > -Original Message- > From: Jeremias Maerki [mailto:[EMAIL PROTECTED]] > Sent: Freitag, 24. Mai 2002 16:14 > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: eps preview - question > > > Neither Acrobat Reader not the AWT renderer can display an EPS image. > EPS only works with the PDF renderer IF(!) the document is > printed to a > PostScript printer, or with the PostScript renderer. No other renderer > in FOP can do aynthing with an EPS. > --X snip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Could not compile
Hi just an idea: The error message suggests that there is a compiler switch [-classic] anywhere in the build process, but AFAIK jdk 1.4 doesn't deliver a classic compiler (JIT) anymore. cu Torsten > -Original Message- > From: RamanaJV [mailto:[EMAIL PROTECTED]] > Sent: Montag, 1. Juli 2002 15:27 > To: [EMAIL PROTECTED] > Subject: RE: Could not compile > > > Thanks for the reply Keiron, > I have the JAVA_HOME pointing towards the JDK and not > the JRE. Just > for confirmation, I have installed JDK 1.3 and changed the JAVA_HOME > pointing towards the JDK 1.3 directory. Now, I'm able to successfully > execute build.bat. It seems like to be a problem with the > java version. I'm > using fop version 0.20.3. Is 0.20.3 not ready for JDK 1.4? > > -Original Message- > From: Keiron Liddle [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 01, 2002 5:23 PM > To: FOP > Subject: Re: Could not compile > > > > You probably have your JAVA_HOME pointing to a jre directory. It needs > to be a jdk directory that contains extra jars. > > On Mon, 2002-07-01 at 13:01, RamanaJV wrote: > > Hi everyone, > > I'm trying to compile the source files through build.bat and it > > fails saying the following error > > > > F:\fop-0.20.3-src\fop-0.20.3\build.xml:590: Cannot use > classic compiler, > as > > it is not available A > > common solution is to set the environment variable > JAVA_HOME to your jdk > > directory. > > > > But, I have jdk installed here. I use JDK 1.4. I'm new to this fop > > development and want to work on this project. Any help please. > > > > Ramana.JV. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
patch EPSReader (BoundingBox)
Hi , I've a lot of (incorrect) ps-files produced from a foreign app. The files have BoundingBox values like: %%BoundingBox: 0.0 0.0 139.0 25.8239998 I know that it isn't conform with the spec, which requires %%HiResBoundingBox for floating point values, but I think it is a little bit to restrictive to ignore this file totally on rendering (Image Area has 0x0 dimension). I think we should warn the user, that the postscript file has a failure, but we should preserve the space in the document with round off Integers. Here is the modified code, which seems to be working fine. // - code snip private int readLongString(long[] mbbox, int i, int idx) { while (idx < epsFile.length && (epsFile[idx] == 32)) idx++; int nidx = idx; while (nidx < epsFile.length && ((epsFile[nidx] >= 48 && epsFile[nidx] <= 57) || (epsFile[nidx] == 45) || (epsFile[nidx] == 46) ))//here check also for ANSI46(".") to identify floating point values nidx++; byte[] num = new byte[nidx - idx]; System.arraycopy(epsFile, idx, num, 0, nidx-idx); String ns = new String(num); if( ns.indexOf(".") > -1 ) { //here do something like logging a warning } mbbox[i] = (long) Math.ceil( Double.parseDouble( ns ) );//then parse the double and round off to the next math. Integer return (1 + nidx - idx); } // - end code snip It were great if any commiter can put this into the original file. cu Torsten - Unless otherwise indicated, this e-mail and any attachments hereto contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above under terms of confidentiality nd non-use agreements. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) or for purposes not permitted by such agreements, is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]