Re: Output from NIST test suite

2003-12-31 Thread Carmelo Montanez
Hi Folks:

Somehow the final copy of the test suite was not uploaded to either our
server at NIST or W3C.  I uploaded a copy of the latest suite version
to the following link:
http://xw2k.sdct.itl.nist.gov/carmelo/formattingObjectsSuite123103.zip

I will make sure it is at the W3c and NIST server soon.

Thanks,
Carmelo
At 04:12 PM 12/25/2003 +0100, you wrote:
Hi,

After 'fixing' the master-reference issue in my copy of the NIST test 
suite, I ran the tests against 0.20.5 and 1.0dev and merged the result 
side by side into a single .pdf file.

You can download the result (1Mb) here:

   http://bckfnn-modules.sf.net/out-0.20.5-1.0.pdf

For some reason the pdf does not display correctly in my browsers, so it 
is better to download it. The merged pdf file is created using iText.

The square to the left contains the output from 0.20.5 and the square on 
the right the output from HEAD.

Here is also a merge between the pdf files that comes with the NIST suite 
and head:

   http://bckfnn-modules.sf.net/out-nist-1.0.pdf

There is still a few issues left to fix wink.

Another way of using the test suite could be to compare a binary image of 
the pages against some kind of reference. Has such a approach been tried? 
Does anyone know of available software that can render a PDF as an image file?

regards,
finn




Re: Trying to use the NIST test suite.

2003-12-24 Thread Carmelo Montanez
HI all:

I developed the NIST test suite.  I will look into this issue Friday
morning.  Regrettably I can't dot this minute.  I was under the
impression that the stated problem was solved years ago.
I will post something soon after Christmas.

Carmelo

At 03:29 PM 12/24/2003 +0100, you wrote:
Hi,

I was looking for xsl-fo test suites on the net and found
http://www.w3.org/Style/XSL/TestSuite/
but for some reason all the test in the NIST zip file uses master-name 
instead of master-reference on the fo:page-sequence's.

fo:page-sequence master-name=test-page-master

Is there some kind of background story of this? To me, it seems like the 
tests are plain wrong here.

regards,
finn




Re: table-cells

2002-01-11 Thread Carmelo Montanez



Did you tried using the "width" and "height" 
attributes of a table-cell?

Thanks
Carmelo Montanez

  - Original Message - 
  From: 
  Baptiste 
  Casanova 
  To: [EMAIL PROTECTED] 
  Sent: Friday, January 11, 2002 8:29 
  AM
  Subject: table-cells
  
  Hi,
  I have a problem with table-cells width 
  :
  if the text inside the cell is only a long word, 
  it is not truncated and doesn't fit in the cell.
  Howcould imanage that?
  
  Anyhelp much appreciated!
  thanks,
  
  Baptiste CASANOVA
  [EMAIL PROTECTED]
  
  
  


Re: Basic aspects (big fat list vs. live test documents)

2001-12-14 Thread Carmelo Montanez

Hi all:

Regarding the FO test suite.  We at NIST in conjunction with the W3C
Developed
a test suite for FO.  The site is:

www.w3.org/Style/XSL/TestSuite/

We are also working on expanding that work to include ALL of the basic
aspects of the language.  We expect to have close to 5000 tests by
next march.  Any contributions, ideas, etc.  will be
appreciated.

Thanks
Carmelo Montanez


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: FOP conformance

2001-11-30 Thread Carmelo Montanez

Hi All:

Actually I was not implying or suggesting that you correct FOP and
make it work for just the page-reference property, that will be a minor
change on the great scheme of things, however if you have a number
of minor things, it eventually adds up to a lot of things.

On my particular case, I will be unable to take advantage of all the 
wonderful things FOP has to offer.  It will be nice to check the
tests (I think we will have thousands of tests) against various
implementations. 

I guess my point is that even if FOP does not have those
minor things at this point, maybe it can have them
at some not too distant future.

Greetings
Carmelo Montanez


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




FOP servlet

2001-10-19 Thread Carmelo Montanez



Hi All:
I have a servlet with the following code fragment 
in it:

 Driver driver = 
new Driver(); 
driver.setRenderer(Driver.RENDER_PDF); 
InputHandler inputHandler = new XSLTInputHandler(new File(xmlFile), new 
File(xslFile));
 XMLReader parser = 
inputHandler.getParser(); 
driver.setOutputStream(new 
FileOutputStream(outFile)); 
driver.render(parser,inputHandler.getInputSource());

I get the following message when I attempt to 
compile it:

runTestsServlet1.java:387: render() in 
org.apache.fop.apps.Driver cannot be applied to 
(org.xml.sax.XMLReader,org.xml.sax.InputSource) 
driver.render(parser,inputHandler.getInputSource()); 

I got the code from the examples at the Apache 
site. It looks
as though the rendermethods takes no 
arguments.

Any help ideas?. Basically I am trying to 
create a PDF file
from an XML and XSL file.

Greetings,
Carmelo

Carmelo MontanezNIST Stop 8970Gaithersburg, 
MD 20899

[EMAIL PROTECTED]


Re: Embedding fop in IE..Help!!!

2001-10-15 Thread Carmelo Montanez

I take it you are using an application.  Are you sending both text
and binary data at the same time?, are you using the
printWriter? or the getOutputStream method class?, for binary data
you will need the getOutputStream.  I had the same problem
some time ago and sending JUST the binary data solved the problem.

The problem I ran into was the PDF taking the whole screen
and not a portion of it as I wanted to.  Is anyone aware of
how to restrict a a PDF file to a portion of the screen?

Greetings,

Carmelo Montanez

- Original Message - 
From: Rajagopal. V [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 15, 2001 10:45 AM
Subject: Embedding fop in IE..Help!!!


 Hi All
 I have an XML file which i combine with a XSL to
 generate the FO file and render it. It works fine with
 Netscape but im having a tough time with IE. It is
 displaying garbage on teh screen. All i get is binary
 characters for the PDF File. I have IE 5.5 Sp1. and i
 tried all the workarounds. These are the ones I tried
 1) Changed the name of the file to be .pdf so that IE
 will look at the extension and treat it as PDF
 
 2) Bloated the file size to be more than 8k so that
 there is no buffer problem with IE
 
 3) Downloaded the Fo file generated and ran the fo
 command line and it generates the PDF properly(as an
 application). So there is nothing wrong with the FO.
 
 IS there any other way to get a PDF on IE? Im not sure
 why im getting binary content all over the screen?
 
 Please HElpp...
 
 TIA
 Raj
 
 __
 Do You Yahoo!?
 Make a great connection at Yahoo! Personals.
 http://personals.yahoo.com
 
 -
 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: fo:block

2001-10-15 Thread Carmelo Montanez

I had not try this, but how about using a table?, then you
can put each block in the same table.

Greetings
Carmelo
- Original Message - 
From: Pablo Iaria [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 15, 2001 3:03 PM
Subject: fo:block


 Hi all,
 How can I do to have several blocks in the same row ?
 
 Example:
 Suposse I have:
 
 fo:blockFirst text/fo:block
 fo:blockSecond text/fo:block
 
 And I want to get First text and second text in the same row.
 
 
 Thanks in advance,
 Pablo.-
 
 
 -
 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: Page Breaks

2001-09-28 Thread Carmelo Montanez

Yes, use the break-before and break-after-properties in your FO file.
See section
7.19 of the specs.

Carmelo
- Original Message -
From: Amit [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 27, 2001 10:00 AM
Subject: Page Breaks


 Is there a way to insert a bage break in the pdf that I am trying to
 generate using
 a xsl fo tag in my xsl file?


 -
 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: Anything wrong with this code (please look at attachements)

2001-09-27 Thread Carmelo Montanez

Thanks it worked for me too now both in Netscape and
IE.  However what if I wanted to embed to PDF results from
FOP inside some HTML code for formatting
purposes?, is that possible at all.  What I mean is
is possible to send the PDF and the HTML back to
the client in some fashion?

Greetings,
Carmelo
- Original Message - 
From: Matt Savino [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 26, 2001 7:20 PM
Subject: Re: Anything wrong with this code (please look at attachements)


 For one thing it looks like you are mixing PDF and HTML content in your
 response:
 
   ServletOutputStream out = response.getOutputStream();
   try {
 out.println(HTML\n);
 out.println(HEAD\n);
 out.println(BODY\n);
 out.println(CENTERH1FOP and PDF
 Creation./H1/CENTER\n);
 renderFO(response);
 out.println(/BODY\n);
 out.println(/HTML\n);
  }
 and 

byte[] content = outPDF.toByteArray();
   response.setContentLength(content.length);
   response.getOutputStream().write(content);
   response.getOutputStream().println(BRBR);
   response.getOutputStream().println(There should be a PDF
 image above);
   response.flushBuffer();
   response.getOutputStream().flush();
 
 For some reason, Netscape doesn't mind this. But IE seems to create an
 Http error that's related to the discrepancy in the content length of
 the response. (At least with Weblogic). I removed all your 
 out.println(..) calls and the code works.
 
 Also I have noticed a weird bug where IE sometimes doesn't recognize
 PDF, even though you set the response type to application/pdf. I was
 using the FopServlet example from .20.1. It worked fine if used
 Netscape. The weird thing is if I clicked back, then forward in IE, it
 recognized the PDF and loaded the plugin. I think I solved the problem
 by mapping the servlet URI to FopServletTest.pdf and sending the FO
 filename as a POST form instead of a GET. 
 
 Hope this helps,
 Matt
 
  Carmelo Montanez wrote:
  
  Hello all
  
  Thanks Sempri for all your comments.  For anyone interested, I am
  attaching a very
  slimed down copy of my Servlet.  I am hardwiring the file name (FO
  file) inside the
  servlet (for convenience of running). I am also attaching a dummy
  HTML file
  to call the servlet (no parameters are retrieved from the HTML by the
  servlet).
  I am also attaching the FO file
  
  I am running this using Tomcat.   If anyone please try an attempt to
  run the
  servlet.  I am still getting stuff (as you will see) on
  the browser.  Please look
  at the import statements (most of them are comments) to see
  which classes you need, I can can provide them if need be.
  
  I am using FOP's latest version.
  
  Greetings,
  Carmelo
  
 Name: testPDF.java
 testPDF.javaType: unspecified type (application/octet-stream)
 Encoding: quoted-printable
  
  Name: test.html
 test.htmlType: Hypertext Markup Language (text/html)
  Encoding: 7bit
  
   Name: cbpbp-background-color4.fo
 cbpbp-background-color4.foType: unspecified type
 (application/octet-stream)
   Encoding: quoted-printable
  
  ---
  -
  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]




Anything wrong with this code (please look at attachements)

2001-09-26 Thread Carmelo Montanez



Hello all

Thanks Sempri for all your comments. For 
anyone interested, I am attaching a very
slimed down copy of my Servlet. I am 
hardwiring the file name (FO file) inside the
servlet (for convenience of running). I am also 
attaching a "dummy" HTML file
to call the servlet (no parameters are retrieved 
from the HTML by the servlet).
I am also attaching the FO file

I am running this using Tomcat. If 
anyone please try an attempt to run the
servlet. I am still getting "stuff" (as you 
will see) on thebrowser. Please look
at the "import" statements (most of them are 
comments) to see
which classes you need, I can can provide them if 
need be.

I am using FOP's latest version.

Greetings,
Carmelo
 testPDF.java

This is an FOP PDF generation test

This is just a test





 cbpbp-background-color4.fo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


Re: Anything wrong with this code

2001-09-25 Thread Carmelo Montanez



When the PDF data is sent back to my client. 
Am I suppose to tell my client
(IE6) that this is a PDF file (or a stream). 
I do set response.contentType to 
"application/pdf". Am I suppose to do 
something else?

Carmelo



  - Original Message - 
  From: 
  Semprini Davide 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, September 25, 2001 3:51 
  AM
  Subject: Re: Anything wrong with this 
  code
  Hi,PDF file is a binary file!!!Use this code it's 
  work:byte[] content = outPDF.toByteArray(); 
  response.setContentLength(content.length); 
  response.getOutputStream().write(content); 
  response.getOutputStream().flush(); D.SempriniCarmelo 
  Montanez wrote:
  02be01c1452d$7953e270$[EMAIL PROTECTED] 
type="cite">


Hi All:

I know that my browser can 
display PDF propertly now, however the following
piece of code (that generates PDF data) sends 
the data back to the client 
(IE6) and still does not not looks like 
PDF at all. Can someone please tell me
if there is something wrong with this 
code. By the way
(out = response.getOutputStream() and "foFile" 
comes from an "FO" file).



 public void 
renderFO(InputSource foFile, HttpServletResponse 
response) throws 
IOException { try 
{ ByteArrayOutputStream outPDF 
= new ByteArrayOutputStream(); 
response.setContentType("application/pdf"); 
 Driver driver = 
new Driver(foFile, 
outPDF); 
driver.setRenderer(Driver.RENDER_PDF); 
driver.setOutputStream(outPDF); 
driver.run();

 byte[] content 
= 
outPDF.toByteArray(); 
response.setContentLength(content.length); 
out.write(content); 
out.flush(); } 
 catch (Exception ex) 
{ 
System.out.println(ex); }
 
Thanks,
Carmelo Montanez

Carmelo MontanezNIST Stop 
8970Gaithersburg, MD 20899

[EMAIL PROTECTED] 
  


Anything wrong with this code

2001-09-24 Thread Carmelo Montanez



Hi All:

I know that my browser can 
display PDF propertly now, however the following
piece of code (that generates PDF data) sends the 
data back to the client 
(IE6) and still does not not looks like PDF 
at all. Can someone please tell me
if there is something wrong with this code. 
By the way
(out = response.getOutputStream() and "foFile" 
comes from an "FO" file).



 public void renderFO(InputSource 
foFile, HttpServletResponse response) throws 
IOException { try 
{ ByteArrayOutputStream outPDF = 
new ByteArrayOutputStream(); 
response.setContentType("application/pdf"); 
 Driver driver = new 
Driver(foFile, 
outPDF); 
driver.setRenderer(Driver.RENDER_PDF); 
driver.setOutputStream(outPDF); 
driver.run();

 byte[] content = 
outPDF.toByteArray(); 
response.setContentLength(content.length); 
out.write(content); 
out.flush(); } 
 catch (Exception ex) 
{ 
System.out.println(ex); }
 
Thanks,
Carmelo Montanez

Carmelo MontanezNIST Stop 8970Gaithersburg, 
MD 20899

[EMAIL PROTECTED]


Re: Another servlet problem

2001-09-21 Thread Carmelo Montanez

Thanks!!!

Actually I changed the servlet to use the getOutputStream() and it works
fine even
for non-binary data.  My new problem is the IE6 do not properly displays the
PDF data, I get what seems to be PDF internal stuff (what you will see if
you try to edit a PDF file in an editor).  I think IE6 should be able to
read
PDF data correctly.  Anyone aware of any details I need to set?

Carmelo


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




FOP with Java

2001-09-20 Thread Carmelo Montanez



Hi All:

 I am attempting to develop a 
servlet application using FOP. All seems to compile ok, 
except
that while running I get the following 
servlet exception:



Rootjavax.servlet.ServletException: 
Servlet execution threw an exception at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain 
Cause:
.

Root Cause:java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGLength
	at org.apache.fop.svg.SVGElementMapping.addToBuilder(SVGElementMapping.java:62)
	at org.apache.fop.apps.Driver.addElementMapping(Driver.java:314)
	at org.apache.fop.apps.Driver.addElementMapping(Driver.java:326)
	at org.apache.fop.apps.Driver.setupDefaultMappings(Driver.java:209)
It seems like the "SVGLength" class is not 
availabe. I am following the example given with the
distribution. I can't find a trace of that 
class anywhere in the distribution.

Any ideas, suggestions, fixes?

Thanks,
Carmelo Montanez

Carmelo MontanezNIST Stop 8970Gaithersburg, 
MD 20899

[EMAIL PROTECTED]



Re: FOP with Java

2001-09-20 Thread Carmelo Montanez


Thanks for the answer.  Actually anyone knows where I can find the package
org.w3c.dom.svg?,
 thats where the class is.  I can't find it anywhere.

Carmelo
- Original Message -
From: toby cabot [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 20, 2001 3:10 PM
Subject: Re: FOP with Java



  java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGLength

 Just guessing here - do you have your Batik jar where the classloader
 can find it?




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]