Rows of tables don't line up
Apologies for such a helpless question. In the attached fo: doc, I am laying out 4 visible tables formatted inside another table. (I assume standard operating procedure for managing page layout.) The three right-most tables all have their rows lined up correctly with each other. I cannot figure out how to line up the left-most table with the others. I have tried playing with the font-size, line-height, space-after.optimum, etc. in different combinations but the left-most table just simply will not line up with the others. The clue is pretty clear -- the left-most table has text in cells and the others don't -- but I can't see how this should matter. Is there something else? Thanks very much in advance for any help. The doc follows (apologies for size, but I thought the whole doc might help): fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=first page-height =21cm page-width=29.7cm margin-top=1cm margin-bottom=2cm margin-left=2.5cm margin-right=2.5cm fo:region-body margin-top=3cm / fo:region-before extent=3cm / fo:region-after extent=1.5cm / /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=first fo:flow flow-name=xsl-region-body fo:block font-size=11pt font-family=sans-serif font-weight=bold text-align=left border-top-width=5px border-top-style=solid border-top-color=blue border-bottom-width=5px border-bottom-style=solid border-bottom-color=blue space-after.optimum =10ptMonthly Histogram for Apr 2003/fo:block fo:table border-collapse=separate fo:table-column column-width=36mm / fo:table-column column-width=4mm / fo:table-column column-width=61mm / fo:table-column column-width=4mm / fo:table-column column-width=83mm / fo:table-column column-width=4mm / fo:table-column column-width=61mm / fo:table-body fo:table-row fo:table-cell border-width =0.0mm border-style=solid background-color=white fo:table border-collapse=separate fo:table-column column-width=35mm / fo:table-body font-size=8pt font-family=sans-serif fo:table-row font-size=10pt font-family=sans-serif fo:table-cell background-color=aqua fo:block text-align=centerApplications/Systems/fo:block /fo:table-cell /fo:table-row fo:table-row line-height=10pt fo:table-cell background-color=lightblue fo:block text-align=centerMONTH/fo:block /fo:table-cell /fo:table-row fo:table-row line-height=10pt fo:table-cell background-color=blue fo:block color=white text-align=centerWEEK/fo:block /fo:table-cell /fo:table-row fo:table-row line-height=10pt fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:block font-size=8ptACBS/fo:block /fo:table-cell /fo:table-row fo:table-row line-height=10pt fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:block font-size=8ptACBS-ALPHA/fo:block /fo:table-cell /fo:table-row fo:table-row line-height=10pt fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:block font-size=8ptCARS/fo:block /fo:table-cell /fo:table-row fo:table-row line-height=10pt fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:block font-size=8ptCASSETT/fo:block /fo:table-cell /fo:table-row fo:table-row line-height=10pt fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:block font-size=8ptCFAS/fo:block /fo:table-cell /fo:table-row fo:table-row line-height=10pt fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:block font-size=8ptCHECK PROCESSOR/fo:block /fo:table-cell /fo:table-row fo:table-row line-height=10pt fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:block font-size=8ptCHINA EXIMBILLS/fo:block /fo:table-cell /fo:table-row fo:table-row line-height=10pt fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:block font-size=8ptCIF/fo:block /fo:table-cell /fo:table-row fo:table-row line-height=10pt fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:block font-size=8ptCLO/fo:block /fo:table-cell /fo:table-row fo:table-row line-height=10pt fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:block font-size=8ptCTDS/fo:block /fo:table-cell /fo:table-row fo:table-row line-height=10pt fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:block
Help: Output from servlet is garbage
FOP version: fop-0.20.3 Platform: Win2K WebSphere V5.0 J2EE Version: 1.3 I am getting following gibberish as a result of parsing the tollowing fo: document. Apologies if this is too much too ask here. I am also getting the following messages, but I think these are only page size issues that shouldn't cause this result. GIBBERISH EXTRACT %PDF-1.3 %?«¬ 4 0 obj /Type /Info /Producer (null) endobj 5 0 obj /Length 1581 /Filter /FlateDecode stream x???Ks?HF??Z??(??2?xL ? (`? I2 ?=Wn??·7???mY?a?'¤??/?B?(U jc+MHM?®dM??O??? «?2}??µ¤2q?'+^QZ ???/ ? ??N? 4|*«?o?_?¶w????f? |?»'W?S-?b*'V?« nDm??O?¶fU?LF??)??t Ak??T|????} xqZi#8f?ZB?qS3u d?¬?? /GIBBERISH EXTRACT XML FO DOC follows: fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=first page-height =21cm page-width=29.7cm margin-top=1cm margin-bottom=2cm margin-left=2.5cm margin-right=2.5cm fo:region-body margin-top=3cm / fo:region-before extent=3cm / fo:region-after extent=1.5cm / /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=first fo:flow flow-name=xsl-region-body fo:block font-size=11pt font-family=sans-serif font-weight=bold text-align=left border-top-width=5px border-top-style=solid border-top-color=blue border-bottom-width=5px border-bottom-style=solid border-bottom-color=blue space-after.optimum =10ptMonthly Histogram for null null/fo:block fo:table border-collapse=separate fo:table-column column-width=36mm / fo:table-column column-width=4mm / fo:table-column column-width=61mm / fo:table-column column-width=4mm / fo:table-column column-width=61mm / fo:table-column column-width=4mm / fo:table-column column-width=83mm / fo:table-column column-width=83mm / fo:table-body fo:table-row fo:table-cell border-width =0.0mm border-style=solid background-color=white fo:table border-collapse=separate fo:table-column column-width=35mm / fo:table-body font-size=8pt font-family=sans-serif fo:table-row font-size=10pt font-family=sans-serif fo:table-cell background-color=aqua fo:block text-align=centerApplications/Systems/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell background-color=lightblue fo:block text-align=centerMONTH/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell background-color=blue fo:block color=white text-align=centerWEEK/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:block1633 ARCSERVE BACKUP/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:block4 CC ARCSERVE BKP/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:blockAAMS/IPTS/IRMIS/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:blockACBS/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:blockACBS-ALPHA/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:blockARMS/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:blockCALL REPORT (MARK TO MKT)/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:blockCARS/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:blockCASSETT/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:blockCDB/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:blockCFAS/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:blockCHECK PROCESSOR/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border-width=0.175mm border-style=solid background-color =white fo:blockCHINA
RE: Help: Output from servlet is garbage
Thanks for the super fast reponse. I'm using the following code to write the rendered stream to the response. I don't think I can just append the dummy.pdf to the prepared stream, as it will will likely have an eof marker. I was not able to find anything in the apache/xml docs and nothing wholly relevant in the archives. I may be a bit lame today (among other days). I would really appreciate it if you or someone else could help me further in this. As a note, I had this working at one point. I made some big changes and then this started happening. I then went and removed the changes and now the problem persists. Hmmm. a) Can you/anyone suggest how this could be done b) Can you point to where to look on the dummy.pdf problem Thanks againJoe CODE-SNIPPET Reader reader = new java.io.StringReader(strBuffer1.toString()); InputSource foDoc = new InputSource(reader); response.setContentType(application/pdf); XMLReaderFactory.createXMLReader(); System.setProperty( org.xml.sax.driver, org.apache.xerces.parsers.SAXParser); ByteArrayOutputStream baos = new ByteArrayOutputStream(); org.apache.fop.apps.Driver driver2 = new org.apache.fop.apps.Driver(foDoc, baos); String version = org.apache.fop.apps.Version.getVersion(); driver2.setRenderer(org.apache.fop.render.pdf.PDFRenderer); driver2.addElementMapping( org.apache.fop.fo.StandardElementMapping); driver2.addElementMapping(org.apache.fop.svg.SVGElementMapping); XMLReader parser = createParser(); parser.setFeature( http://xml.org/sax/features/namespace-prefixes, true); driver2.run(); byte[] content = baos.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); //THIS WILL NOT WORK EVEN IF I FIX content.length -- //response.getOutputStream().write(dummy.pdf.getBytes()); /CODE-SNIPPET Adam Shelley [EMAIL PROTECTED] 04/25/2003 04:45 PM Please respond to fop-user To:[EMAIL PROTECTED] cc: Subject:RE: Help: Output from servlet is garbage The giberish is your pdf in binary format. if you are using ie add dummy.pdf onto the end to ensure it will open it in the acrobat plugin. Check the docs regarding this. -Adam -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: April 25, 2003 1:40 PM To: [EMAIL PROTECTED] Subject: Help: Output from servlet is garbage FOP version: fop-0.20.3 Platform: Win2K WebSphere V5.0 J2EE Version: 1.3 I am getting following gibberish as a result of parsing the tollowing fo: document. Apologies if this is too much too ask here. I am also getting the following messages, but I think these are only page size issues that shouldn't cause this result. GIBBERISH EXTRACT %PDF-1.3 %?«¬ 4 0 obj /Type /Info /Producer (null) endobj 5 0 obj /Length 1581 /Filter /FlateDecode stream x???Ks?HF??Z??(??2?xL ? (`? I2 ?=Wn??·7???mY?a?'¤??/?B?(U jc+MHM?®dM??O??? «?2}??µ¤2q?'+^QZ ???/ ? ??N? 4|*«?o?_?¶w????f? |?»'W?S-?b*'V?« nDm??O?¶fU?LF??)??t Ak??T|????} xqZi#8f?ZB?qS3u d?¬?? /GIBBERISH EXTRACT XML FO DOC follows: fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format fo:layout-master-set fo:simple-page-master master-name=first page-height =21cm page-width=29.7cm margin-top=1cm margin-bottom=2cm margin-left=2.5cm margin-right=2.5cm fo:region-body margin-top=3cm / fo:region-before extent=3cm / fo:region-after extent=1.5cm / /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=first fo:flow flow-name=xsl-region-body fo:block font-size=11pt font-family=sans-serif font-weight=bold text-align=left border-top-width=5px border-top-style=solid border-top-color=blue border-bottom-width=5px border-bottom-style=solid border-bottom-color=blue space-after.optimum =10ptMonthly Histogram for null null/fo:block fo:table border-collapse=separate fo:table-column column-width=36mm / fo:table-column column-width=4mm / fo:table-column column-width=61mm / fo:table-column column-width=4mm / fo:table-column column-width=61mm / fo:table-column column-width=4mm / fo:table-column column-width=83mm / fo:table-column column-width=83mm / fo:table-body