create READ_ONLY PDF from FOP ??

2002-06-12 Thread Jie Wang
Title: Possibility of converting from XML to PDF without the intermediate stage of FO format



Can we 
create READ_ONLY PDF from FOP ?? Thanks.

  -Original Message-From: Jie Wang 
  [mailto:[EMAIL PROTECTED]Sent: Tuesday, June 11, 2002 3:57 
  PMTo: '[EMAIL PROTECTED]'Subject: RE: Possibility 
  of converting from XML to PDF without the interm ediate stage of FO 
  format
  Yes, 
  we are doing the xml to pdf transformation in memeory. The xml file size is 
  330K and pdf file is 56 page.
  
-Original Message-From: Buonincontri, Steve (CAP, 
MMF, ITSS) [mailto:[EMAIL PROTECTED]Sent: 
Tuesday, June 11, 2002 3:51 PMTo: 
[EMAIL PROTECTED]Subject: RE: Possibility of converting 
from XML to PDF without the intermediate stage of FO 
format
I 
have also noticed that doing the XML to FO to PDF in memory as opposed to 
writing to disk reduces time by about 80% in the samples that I 
tried.

I 
was using iTEXT, XEP, FOP, RTF2FO etc. 

Below you say that a 56 page PDF from XML files 
takes about 2 minutes. That sounds really good - I was working with 2 pages 
and 2 XML files generating FO doing an XSLT transform to merge and coverting 
to PDF and that was taking me about 1.5 minutes on a 333MHZ 
machine.

I 
was just curoius what the total sizes of the XML, the FOs and the PDF were. 
Did you concate the FOs? how did you get a single PDF (what 
tool)?

steveb

  -Original Message-From: Jie Wang 
  [mailto:[EMAIL PROTECTED]Sent: Tuesday, June 11, 2002 6:37 
  PMTo: '[EMAIL PROTECTED]'Subject: RE: 
  Possibility of converting from XML to PDF without the intermediate stage 
  of FO format
  The size of xml file is 330K. 

  
-Original Message-From: Buonincontri, Steve 
(CAP, MMF, ITSS) 
[mailto:[EMAIL PROTECTED]Sent: Tuesday, June 
11, 2002 3:37 PMTo: 
[EMAIL PROTECTED]Subject: RE: Possibility of converting 
from XML to PDF without the intermediate stage of FO 
format
Just curious - what are the sizes of the XML, 
FO and PDF files?


  -Original Message-From: Jie Wang 
  [mailto:[EMAIL PROTECTED]Sent: Tuesday, June 11, 2002 5:31 
  PMTo: '[EMAIL PROTECTED]'Subject: 
  Possibility of converting from XML to PDF without the intermediate 
  stage of FO format
  How to decrease the responding time of converting from 
  XML to PDF ? Currently it took me about 2 Mins to generate my 56 page 
  PDF from XML files. Is that possible to convert from XML to PDF 
  without the intermediate stage of FO format ? 
  Thanks, Jie 

  -Original Message- From: Oleg Tkachenko [mailto:[EMAIL PROTECTED]] 
  Sent: Tuesday, June 04, 2002 11:47 AM 
  To: [EMAIL PROTECTED] Subject: Re: FOP error with xsl:copy-of .../ 
  
  There are no chapter_title or sub formatting objects 
  in xsl-fo, you have to transform it in xslt to 
  fo objects, like fo:inline rather than just copying 
  them to the fo. 
  [EMAIL PROTECTED] wrote:  Hi,  
   I am attaching the test 
  xsl,xml and the java files. The problem is that the description 
  of any node could have tags and text mixed. If I use 
  xsl:value-of (with FOP), I get only
   the text and when I use 
  xsl:copy-of (without FOP embeded), I get the desired result, 
  but with FOP I am getting 'error 10231' I have tried 
  everything that I could think of and could not come up with the 
  correct stylesheet. 
   I truly could use your 
  help  I am anxiously 
  waiting for a solution.   Thank you so much in advance.  Norm  
   --- ERROR - 
   ERROR 10231 
  [fop ] (): Unknown formatting object 
  null^chapter_title  Exception 
  in thread "main" org.apache.fop.apps.FOPException: 
  java.lang.NullPoin  
  erException  at 
  org.apache.fop.apps.Driver.render(Driver.java:486)  at 
  test1.main(test1.java:102)  
    test.xml 
  --  ?xml version="1.0" 
  encoding="iso-8859-1"?  
  ?xml-stylesheet type='text/xsl' href=''? 
   document id="DOCUMENT 
  810-005_103"  chapter 
  id="test"  
  chapter_titleTesting Chapter 
  sub3/sub/chapter_title 
   
  /chapter  
  /document   -- test.xsl 
  ---  
  xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  version="1.0"  xmlns:fo="http://www.w3.org/1999/XSL/Format" 

Possibility of converting from XML to PDF without the intermedia te stage of FO format

2002-06-11 Thread Jie Wang
Title: Possibility of  converting from XML to PDF without the intermediate stage of FO format





How to decrease the responding time of converting from XML to PDF ? Currently it took me about 2 Mins to generate my 56 page PDF from XML files. Is that possible to convert from XML to PDF without the intermediate stage of FO format ? 


Thanks,
Jie 




-Original Message-
From: Oleg Tkachenko [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 11:47 AM
To: [EMAIL PROTECTED]
Subject: Re: FOP error with xsl:copy-of .../



There are no chapter_title or sub formatting objects in xsl-fo, you have to 
transform it in xslt to fo objects, like fo:inline rather than just copying 
them to the fo.


[EMAIL PROTECTED] wrote:
 Hi,
 
 I am attaching the test xsl,xml and the java files. The problem is that the description of any node could have tags and text mixed. If I use xsl:value-of (with FOP), I get only

 the text and when I use xsl:copy-of (without FOP embeded), I get the desired result, but with FOP I am getting 'error 10231' I have tried everything that I could think of and could not come up with the correct stylesheet. 

 I truly could use your help
 I am anxiously waiting for a solution.
 
 Thank you so much in advance.
 Norm
 
 --- ERROR -
 ERROR 10231 [fop ] (): Unknown formatting object null^chapter_title
 Exception in thread main org.apache.fop.apps.FOPException: java.lang.NullPoin
 erException
 at org.apache.fop.apps.Driver.render(Driver.java:486)
 at test1.main(test1.java:102)
 
  test.xml --
 ?xml version=1.0 encoding=iso-8859-1?
 ?xml-stylesheet type='text/xsl' href=''?
 document id=DOCUMENT 810-005_103
 chapter id=test
 chapter_titleTesting Chapter sub3/sub/chapter_title 
 /chapter
 /document
 
 -- test.xsl ---
 xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform version=1.0
 xmlns:fo=http://www.w3.org/1999/XSL/Format
 xsl:template match=document
 fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format 
 fo:layout-master-set
 fo:simple-page-master page-width=200mm master-name=Page1 page-height=280mm
 margin-top=10mm margin-bottom=10mm margin-left=20mm margin-right=20mm
 fo:region-body margin-top=0mm margin-bottom=10mm
 margin-left=0mm margin-right=0mm/
 /fo:simple-page-master
 fo:page-sequence-master master-name=PS1
 fo:single-page-master-reference master-name=Page1/
 /fo:page-sequence-master 
 /fo:layout-master-set
 
 fo:page-sequence master-reference=Page1
 fo:flow flow-name=xsl-region-body 
 xsl:apply-templates/
 /fo:flow 
 /fo:page-sequence  
 /fo:root
 /xsl:template
 
 xsl:template match=document/chapter/chapter_title
 fo:block space-after=3mm font-size=14pt text-align=center break-before=page
 break-after=page
 xsl:copy-of select=./
 /fo:block
 /xsl:template
 /xsl:stylesheet
 
 --- test.java file just the main()
 public static void main () { 
 
 File xmlFile=new File(test.xml);
 File xslFile=new File(test.xsl);
 File pdfFile=new File(test.pdf);
 
 Logger log = null;
 
 if(log == null) {
 Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
 log = hierarchy.getLoggerFor(fop);
 log.setPriority(Priority.WARN);
 }
 FileOutputStream OutFile = new FileOutputStream(pdfFile);
 ByteArrayOutputStream out = new ByteArrayOutputStream();
 Driver driver=new Driver();
 
 driver.setLogger(log);
 driver.setRenderer(Driver.RENDER_PDF);
 InputHandler ih=new XSLTInputHandler(xmlFile,xslFile);
 XMLReader p=ih.getParser();
 driver.setOutputStream(OutFile);
 driver.render(p, ih.getInputSource());
 OutFile.close();
 }
 }//main
 
 
 __
 Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with [EMAIL PROTECTED] http://shopnow.netscape.com/

 
 Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
 




-- 
Oleg Tkachenko
Multiconn International, Israel






long word wrapping problem solved in Fop-0.20.1 ???

2002-03-25 Thread Jie Wang
Title: long word wrapping problem solved in Fop-0.20.1 ???





I have a word 12345678 and the space defined in
table-column is 1 inch then it spills over. If the words are spaced out
,then wrapping occurs 1 2 3 4 5 6 7 8.
So you see, fo:block wrap-option=wrap in Fop-0.20.1 is still not working ?


I would be glad if anyone of you could help me out.


Thanks,
Jie


-Original Message-
From: J.Pietschmann [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 11:30 AM
To: [EMAIL PROTECTED]
Subject: Re: Adding columns using XSL



Josh Campbell wrote:
 I've got a column of numbers being pulled out of XML that I want to 
 total at the bottom of the page using the XSL.
 I don't know how many rows of figures will be generated so need 
 something that can just take all the values in a column and add them up
Check out the sum() function:
 http://www.w3.org/TR/xpath#section-Number-Functions
If your XML is something like this
 records
 record
 namefoo/nameprice99.0/price
 record
 /record
 namebar/nameprice100.0/price
 /record
 /records
use it like
 xsl:template match=records
 xsl:textTotal: /xsl:text
 xsl:value-of select=sum(record/price)/
 /xsl:template
If your problem is more complicated, ask on the XSL list
(http://www.mulberrytech.com/xsl/xsl-list/), because you
have an XSLT problem rather than a FOP problem. Provide
some more details: a relevant snippet of your XML, and how
to derive the total you are after. If your computation
involves something like price*quantity per record, look
into the list archives first.


J.Pietschmann






long word wrapping problem solved in Fop-0.20.1 ???

2002-03-22 Thread Jie Wang
Title: long word wrapping problem solved in Fop-0.20.1 ???





I have a word 12345678 and the space defined in
table-column is 1 inch then it spills over. If the words are spaced out
,then wrapping occurs 1 2 3 4 5 6 7 8.
So you see, fo:block wrap-option=wrap in Fop-0.20.1 is still not working ?


I would be glad if anyone of you could help me out.


Thanks,
Jie


-Original Message-
From: Saif Khaja [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 1:33 PM
To: [EMAIL PROTECTED]
Subject: Re: fo:basic-link on svg image



I have SVG working in FOP, and it works great (except some minor issues, 
which is out of scope of this mail here). And I didnt post the complete svg 
code in my previous mail.


Here it is what I was trying to achieve. Each rect in this svg image would 
point to a different bookmark in the same PDF document (as shown in comments 
in the svg code).



!--  SVG code = --
fo:block xmlns:fo=http://www.w3.org/1999/XSL/Format
fo:instream-foreign-object xmlns:svg=http://www.w3.org/2000/svg


svg:svg width=600 height=400


svg:rect x=20 y=20 width=100 height=200
style=stroke:rgb(0,0,0);stroke-width:1/


!-- This RECT links to book mark - 1 --
svg:rect x=15 y=30 width=110 height=50
style=stroke:rgb(0,0,0);stroke-width:1;fill:rgb(60,237,248)/


!-- This RECT links to book mark - 2 --
svg:rect x=15 y=90 width=110 height=50
style=stroke:rgb(0,0,0);stroke-width:1;fill:rgb(60,237,248)/


!-- This RECT links to book mark - 3 --
svg:rect x=15 y=150 width=110 height=50
style=stroke:rgb(0,0,0);stroke-width:1;fill:rgb(60,237,248)/


svg:text x=75 y=50 
style=fill:rgb(0,0,0);font-size:10;font-family:Andale MonoLTUE/svg:text


/svg:svg


/fo:instream-foreign-object
/fo:block



Now, is there any way I can provide links (either external or internal) to 
an SVG image inside a pdf document.


Thanks,
Saif.





From: Joerg Pietschmann [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: FOP User [EMAIL PROTECTED]
Subject: Re: fo:basic-link on svg image
Date: Fri, 22 Mar 2002 11:09:21 +0100

Saif Khaja [EMAIL PROTECTED] wrote:
  fo:basic-link internal-destination=mark1
  svg:rect x=100 y=100 width=100 height=200/
  fo:basic-link
If you want to embed SVG data into a FO document, you have
to use a fo:instream-foreign-object.
Furthermore, i vaguely remember that you need a top level
svg:svg element.

Therefore, try:
 fo:instream-foreign-object
 svg:svg width=10mm height=20mm viewBox=0 0 101 201
 svg:rect x=0 y=0 width=100 height=200/
 /svg:svg
 /fo:instream-foreign-object

I think it would be a good idea to try the embedded SVG
code in a SVG viewer first in order to see whether it works
and embed it only after you got it working. It may still be
tricky to manage the window/viewport issues, documentation
is very scarce.
Assistance to get your SVG working is more likely to be found
on other lists. If you use Batik as standalone viewer, you
could try batik-user.

J.Pietschmann





_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.






Help ! the xml file can be parsed by version 1_0_3 , not 1_2_3. See Exception

2002-03-08 Thread Jie Wang
Title: Help !  the xml file can be parsed by version 1_0_3 , not 1_2_3. See Exception





Can not be compiled with version1_2_3 ? Any idea ?


/***Document.xml File block **/
entity_list
 entity_definition
 !-- global entity information --
 entity_nameDocument/entity_name
 entity_package_namecom.dicarta.infra.dms.adapter.dicartafs.server
. 
/***Following is Comply error **/


 [codegen] 703 [main] DEBUG com.dicarta.infra.logging.NullLogger - 
 [codegen] java.lang.Exception: File D:\depot\src\com\dicarta\infra\dms\adapter\dicartafs\Document.xml not found.
 [codegen]  at com.dicarta.infra.persistence.codegen.XmlParser.init(XmlParser.java:64)
 [codegen]  at com.dicarta.infra.persistence.codegen.PersisterGenerator.readDataFromXMLFile(PersisterGenerator.java:2184)

 [codegen]  at com.dicarta.infra.persistence.codegen.PersisterGenerator.execute(PersisterGenerator.java:75)
 [codegen]  at com.dicarta.tools.ant.PersistenceCodeGen.execute(PersistenceCodeGen.java:60)
 [codegen]  at org.apache.tools.ant.Task.perform(Task.java:217)
 [codegen]  at org.apache.tools.ant.Target.execute(Target.java:186)
 [codegen]  at org.apache.tools.ant.Target.performTasks(Target.java:204)
 [codegen]  at org.apache.tools.ant.Project.executeTarget(Project.java:855)
 [codegen]  at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:290)
 [codegen]  at org.apache.tools.ant.Task.perform(Task.java:217)
 [codegen]  at org.apache.tools.ant.Target.execute(Target.java:186)
 [codegen]  at org.apache.tools.ant.Target.performTasks(Target.java:204)
 [codegen]  at org.apache.tools.ant.Project.executeTarget(Project.java:855)
 [codegen]  at org.apache.tools.ant.Project.executeTargets(Project.java:809)
 [codegen]  at org.apache.tools.ant.Main.runBuild(Main.java:468)
 [codegen]  at org.apache.tools.ant.Main.start(Main.java:159)
 [codegen]  at org.apache.tools.ant.Main.main(Main.java:182)
 [codegen] 703 [main] DEBUG com.dicarta.infra.logging.NullLogger - 
 [codegen] java.lang.Exception: File D:\depot\src\com\dicarta\infra\dms\adapter\dicartafs\Document.xml not found.


-Original Message-
From: TJ Smith [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 08, 2002 10:47 AM
To: [EMAIL PROTECTED]
Subject: Re: FopServlet question



Thanx Keiron
I solved the problem - the FopServlet with xsl and xml arguments does not
work in IE5.X - its the old problem with IE paying attention only to file
extensions. The solution is to add the suffix a=b.pdf to the URL that
invokes FopServlet.


TJ
- Original Message -
From: Keiron Liddle [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 04, 2002 3:35 AM
Subject: Re: FopServlet question



 Hi,

 Lets consider what this problem could be:
 - you are getting a transform error when using xml and xslt (stylesheet
 error)
 - the files from the distribution also have the problem
 - the files in the distribution work in the distribution
 - your file probably also work on the command line
 - the FopServlet works (I have tested it)

 This immediately tells us the it is a problem with the environment. What
 is different? You are running in a servlet. What libraries does the
 servlet use to run? I'm sure it is using an xml parser and possibly an
 xslt processor.

 So fix your classpath, ie. remove old/incompatible versions of xml
 libararies. (Note: jdk1.4 includes an xml parser)

 On 2002.03.02 04:08 TJ Smith wrote:
  Hello
  The xsl and xml files are rather huge and most likely would not be
  welcomed
  with open arms by the group :-) I have attached relevant bits of both
  files
  and the error walkback from executing FopServlet below. I have also
  tried
  the FopPrintServlet with identical results viz. works fine with 'fo'
  parameter, squawks about stylesheet requires attribute: version' if
  invoked
  with 'xml' and 'xsl' parameters. I tried using xsl and xml files from
  the
  fop 20.3 distribution - and they produced the same disappointing
results.
  I
  have recompiled both servlets without error - and have the jar files
that
  came with fop 20.3 in the path. This is making me crazy - crazier,
  actually
  :-) - so any and all advice is appreciated!
 
  Note that I did have the XSLT and FO namespaces in he stylesheet - but
  thanks for the suggestion :-)