Re: FOP command-line option in ant task

2011-03-09 Thread Peter Hancock
Hi Walter,

Have you tried running FOP from the command line? This is the
preferred way to run FOP as a stand alone application.  If you can
invest a little time to set this up you will be rewarded with the
ability to fully configure FOP.

If you think you are truly bound to the ant task, then a modest
modification to org.apache.fop.tools.anttasks.Fop to parse the
properties for the encryption parameters, as suggested by Jeremias.
This is handled from the command line arguments by
org.apache.fop.cli.CommandLineOptions, which you may want to use for
inspiration.

Good luck,

Peter


On Wed, Mar 9, 2011 at 6:09 AM, Walter Kruse ou_ryp...@hotmail.com wrote:
 I build PDF from DocBook with Ant in Eclipse. All works well.

 I want to pass the FOP command line args for -noprint, -nocopy, -noedit and
 -noannotations. I read about this in the FOP docs under security/encryption
 (http://xmlgraphics.apache.org/fop/0.95/pdfencryption.html). However, I
 cannot seem to find how to do this in my Ant build.xml

 The built-in ant task (http://xmlgraphics.apache.org/fop/0.95/anttask.html)
 makes provision for indir, outdir etc. parameters. How do I include the FOP
 command-line options though ?

 My target is as follows:

 target name=build-pdf depends=depends
         description=Generates PDF files from DocBook XML
         echo message=Running 'build-pdf' at ${timestamp} /
         echo message=** /
         xslt style=${fo.stylesheet} extension=.fo
         basedir=${source.dir} destdir=${fo.dir}
         classpath refid=xalan.classpath /
         include name=RubyRecipesForTesters.xml /

         /xslt
         taskdef name=fop classname=org.apache.fop.tools.anttasks.Fop
         classpath
         fileset dir=${fop.home}/lib
         include name=*.jar /
         /fileset
         fileset dir=${fop.home}/build
         include name=fop.jar /
         include name=fop-hyph.jar /
         /fileset
         /classpath
         /taskdef


         fop format=application/pdf
 fofile=${fo.dir}/RubyRecipesForTesters.fo
         outfile=${target.dir}/RubyRecipesForTesters.pdf/
         copy file=${target.dir}/RubyRecipesForTesters.pdf
 tofile=${publish.dir}/${pub.dir}/RubyRecipesforTesters.pdf/
     /target

 Thanks in advance
 Walter Kruse


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Apache FOP Newbie needs Help Converting XML to PDF

2011-03-09 Thread italocardwell

Ill be upfront I know nothing about XML.  I am a SQL developer and I have a
project where I need to convert XML files to a PDF.  The XML are going to be
the same format every time with different data in them.  I am wanting to use
apache fop 1.0 at the command line to convert these.  I am getting an error
every time that I attempt to do this.  I will attach the files and the
error.  Would someone please help me out.  Thanks.
http://old.nabble.com/file/p31105999/a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml 
http://old.nabble.com/file/p31105999/ccr.xsl ccr.xsl 
http://old.nabble.com/file/p31105999/date.format-date.template.xsl
date.format-date.template.xsl 
http://old.nabble.com/file/p31105999/str.padding.template.xsl
str.padding.template.xsl 

The error that I get states that fo needs to be in xml-fo format.





-- 
View this message in context: 
http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31105999.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Font Configuration

2011-03-09 Thread Sandeep Dhulia
Hi Guys,

I need some help for afp-font configuration.  Currently my fo uses 2 fonts,
TimeRoman-10-Normal and TimesRoman-10-Bold. I am using default fop
configuration. When I generate afp file, I get the codepages (T1V10500) 
character sets (C0N2 and C0N4) as external resource referenced in
afp file. It seems the codepage and character set are mapped to following
line in fop configuration

afp-font name=Times Roman type=raster codepage=T1V10500
encoding=Cp500

afp-raster-font size=10 characterset=C0N2 base14-font=TimeRoman/

afp-font name=Times Roman Bold type=raster codepage=T1V10500
encoding=Cp500

afp-raster-font size=10 characterset=C0N4 base14-font=TimesBold/

I though the above configuration will embed the font information in the afp
file but it is added as an external resource.

The sample afp I received from client has embedded resource codepage T1GMCUSR
(ibm-500_P100-

1995) with character - set C001 (Arial, 10) and character-set C002
(ArialBold, 10).  I am not

sure how to proceed with this. What all resources and configuration I would
need to map and embed this

Information in generated afp file.



Attach is the afp file output.



Please help.



Thanks  Regards,

Sandeep
attachment: Font.JPG
-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Re: Apache FOP Newbie needs Help Converting XML to PDF

2011-03-09 Thread Peter Hancock
Hi,

Can you tell us exactly which files you are using when you invoke fop, please.
Your command should look something like
fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf
 judging by the files you have attached.
I am guessing you missed out the -xml/-xsl flags, leading FOP to
believe you were supplying an FO file.

When an  XML and XSL files are supplied, FOP will perform an XSLT
transform using the Xalan XSLT Xalan library (I am guessing you will
need to know more about this stage in your project), generating the FO
document stream that is then processed to generate the output in the
desired format:

XML + XSL - [XSLT transformer] - FO - [XSL:FO processor] - PDF

This initial stage just saves on from having to do the transform first.

I hope this info helps,

Peter



On Wed, Mar 9, 2011 at 12:43 PM, italocardwell italo.cardw...@gmail.com wrote:

 Ill be upfront I know nothing about XML.  I am a SQL developer and I have a
 project where I need to convert XML files to a PDF.  The XML are going to be
 the same format every time with different data in them.  I am wanting to use
 apache fop 1.0 at the command line to convert these.  I am getting an error
 every time that I attempt to do this.  I will attach the files and the
 error.  Would someone please help me out.  Thanks.
 http://old.nabble.com/file/p31105999/a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
 a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
 http://old.nabble.com/file/p31105999/ccr.xsl ccr.xsl
 http://old.nabble.com/file/p31105999/date.format-date.template.xsl
 date.format-date.template.xsl
 http://old.nabble.com/file/p31105999/str.padding.template.xsl
 str.padding.template.xsl

 The error that I get states that fo needs to be in xml-fo format.





 --
 View this message in context: 
 http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31105999.html
 Sent from the FOP - Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Apache FOP Newbie needs Help Converting XML to PDF

2011-03-09 Thread italocardwell

I was using 
fop -xm la91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
   -xsl ccr.xsl -pdf test.pdf

 

Peter Hancock-2 wrote:
 
 Hi,
 
 Can you tell us exactly which files you are using when you invoke fop,
 please.
 Your command should look something like
 fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf
  judging by the files you have attached.
 I am guessing you missed out the -xml/-xsl flags, leading FOP to
 believe you were supplying an FO file.
 
 When an  XML and XSL files are supplied, FOP will perform an XSLT
 transform using the Xalan XSLT Xalan library (I am guessing you will
 need to know more about this stage in your project), generating the FO
 document stream that is then processed to generate the output in the
 desired format:
 
 XML + XSL - [XSLT transformer] - FO - [XSL:FO processor] - PDF
 
 This initial stage just saves on from having to do the transform first.
 
 I hope this info helps,
 
 Peter
 
 
 
 On Wed, Mar 9, 2011 at 12:43 PM, italocardwell italo.cardw...@gmail.com
 wrote:

 Ill be upfront I know nothing about XML.  I am a SQL developer and I have
 a
 project where I need to convert XML files to a PDF.  The XML are going to
 be
 the same format every time with different data in them.  I am wanting to
 use
 apache fop 1.0 at the command line to convert these.  I am getting an
 error
 every time that I attempt to do this.  I will attach the files and the
 error.  Would someone please help me out.  Thanks.
 http://old.nabble.com/file/p31105999/a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
 a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
 http://old.nabble.com/file/p31105999/ccr.xsl ccr.xsl
 http://old.nabble.com/file/p31105999/date.format-date.template.xsl
 date.format-date.template.xsl
 http://old.nabble.com/file/p31105999/str.padding.template.xsl
 str.padding.template.xsl

 The error that I get states that fo needs to be in xml-fo format.





 --
 View this message in context:
 http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31105999.html
 Sent from the FOP - Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31106656.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: Apache FOP Newbie needs Help Converting XML to PDF

2011-03-09 Thread Eric Douglas
-xm?  Try -xml?
Then take the dashes out of your file name, or try putting it in quotes. 

-Original Message-
From: italocardwell [mailto:italo.cardw...@gmail.com] 
Sent: Wednesday, March 09, 2011 9:10 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Apache FOP Newbie needs Help Converting XML to PDF


I was using
fop -xm la91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
   -xsl ccr.xsl -pdf test.pdf

 

Peter Hancock-2 wrote:
 
 Hi,
 
 Can you tell us exactly which files you are using when you invoke fop, 
 please.
 Your command should look something like fop -xml foo.xml -xsl foo.xsl 
 -pdf foo.pdf  judging by the files you have attached.
 I am guessing you missed out the -xml/-xsl flags, leading FOP to 
 believe you were supplying an FO file.
 
 When an  XML and XSL files are supplied, FOP will perform an XSLT 
 transform using the Xalan XSLT Xalan library (I am guessing you will 
 need to know more about this stage in your project), generating the FO 
 document stream that is then processed to generate the output in the 
 desired format:
 
 XML + XSL - [XSLT transformer] - FO - [XSL:FO processor] - PDF
 
 This initial stage just saves on from having to do the transform first.
 
 I hope this info helps,
 
 Peter
 
 
 
 On Wed, Mar 9, 2011 at 12:43 PM, italocardwell 
 italo.cardw...@gmail.com
 wrote:

 Ill be upfront I know nothing about XML.  I am a SQL developer and I 
 have a project where I need to convert XML files to a PDF.  The XML 
 are going to be the same format every time with different data in 
 them.  I am wanting to use apache fop 1.0 at the command line to 
 convert these.  I am getting an error every time that I attempt to do 
 this.  I will attach the files and the error.  Would someone please 
 help me out.  Thanks.
 http://old.nabble.com/file/p31105999/a91ec9d3-e021-4e5e-933f-54992cdc
 415c.20110308172937.xml 
 a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
 http://old.nabble.com/file/p31105999/ccr.xsl ccr.xsl 
 http://old.nabble.com/file/p31105999/date.format-date.template.xsl
 date.format-date.template.xsl
 http://old.nabble.com/file/p31105999/str.padding.template.xsl
 str.padding.template.xsl

 The error that I get states that fo needs to be in xml-fo format.





 --
 View this message in context:
 http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-
 PDF-tp31105999p31105999.html Sent from the FOP - Users mailing list 
 archive at Nabble.com.


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: 
 fop-users-h...@xmlgraphics.apache.org


 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 
 
 

--
View this message in context: 
http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31106656.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: Apache FOP Newbie needs Help Converting XML to PDF

2011-03-09 Thread italocardwell

Sorry the -xm was a fat finger.  I was using -xml and even if I change the
file name to test it still produces the same error.  Complete error below.

SEVERE: Exception
javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException:
 First element must be the fo:root formatting object. Found (Namespace URI:
,
Local Name: html) instead. Please make sure you're producing a valid
XSL-FO do
cument.







Eric Douglas wrote:
 
 -xm?  Try -xml?
 Then take the dashes out of your file name, or try putting it in quotes. 
 
 -Original Message-
 From: italocardwell [mailto:italo.cardw...@gmail.com] 
 Sent: Wednesday, March 09, 2011 9:10 AM
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: Apache FOP Newbie needs Help Converting XML to PDF
 
 
 I was using
 fop -xm la91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
-xsl ccr.xsl -pdf test.pdf
 
  
 
 Peter Hancock-2 wrote:
 
 Hi,
 
 Can you tell us exactly which files you are using when you invoke fop, 
 please.
 Your command should look something like fop -xml foo.xml -xsl foo.xsl 
 -pdf foo.pdf  judging by the files you have attached.
 I am guessing you missed out the -xml/-xsl flags, leading FOP to 
 believe you were supplying an FO file.
 
 When an  XML and XSL files are supplied, FOP will perform an XSLT 
 transform using the Xalan XSLT Xalan library (I am guessing you will 
 need to know more about this stage in your project), generating the FO 
 document stream that is then processed to generate the output in the 
 desired format:
 
 XML + XSL - [XSLT transformer] - FO - [XSL:FO processor] - PDF
 
 This initial stage just saves on from having to do the transform first.
 
 I hope this info helps,
 
 Peter
 
 
 
 On Wed, Mar 9, 2011 at 12:43 PM, italocardwell 
 italo.cardw...@gmail.com
 wrote:

 Ill be upfront I know nothing about XML.  I am a SQL developer and I 
 have a project where I need to convert XML files to a PDF.  The XML 
 are going to be the same format every time with different data in 
 them.  I am wanting to use apache fop 1.0 at the command line to 
 convert these.  I am getting an error every time that I attempt to do 
 this.  I will attach the files and the error.  Would someone please 
 help me out.  Thanks.
 http://old.nabble.com/file/p31105999/a91ec9d3-e021-4e5e-933f-54992cdc
 415c.20110308172937.xml 
 a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
 http://old.nabble.com/file/p31105999/ccr.xsl ccr.xsl 
 http://old.nabble.com/file/p31105999/date.format-date.template.xsl
 date.format-date.template.xsl
 http://old.nabble.com/file/p31105999/str.padding.template.xsl
 str.padding.template.xsl

 The error that I get states that fo needs to be in xml-fo format.





 --
 View this message in context:
 http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-
 PDF-tp31105999p31105999.html Sent from the FOP - Users mailing list 
 archive at Nabble.com.


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: 
 fop-users-h...@xmlgraphics.apache.org


 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 
 
 
 
 --
 View this message in context:
 http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31106656.html
 Sent from the FOP - Users mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31106816.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Font Configuration

2011-03-09 Thread Peter Hancock
Hi Sandeep,
The answer to your question can be found at
 http://xmlgraphics.apache.org/fop/trunk/output.html#afp-font-config
and
http://xmlgraphics.apache.org/fop/trunk/fonts.html#embedding

Peter


On Wed, Mar 9, 2011 at 1:38 PM, Sandeep Dhulia sdhu...@gmail.com wrote:
 Hi Guys,

 I need some help for afp-font configuration.  Currently my fo uses 2 fonts,
 TimeRoman-10-Normal and TimesRoman-10-Bold. I am using default fop
 configuration. When I generate afp file, I get the codepages (T1V10500) 
 character sets (C0N2 and C0N4) as external resource referenced in
 afp file. It seems the codepage and character set are mapped to following
 line in fop configuration

 afp-font name=Times Roman type=raster codepage=T1V10500
 encoding=Cp500

 afp-raster-font size=10 characterset=C0N2 base14-font=TimeRoman/

 afp-font name=Times Roman Bold type=raster codepage=T1V10500
 encoding=Cp500

 afp-raster-font size=10 characterset=C0N4 base14-font=TimesBold/

 I though the above configuration will embed the font information in the afp
 file but it is added as an external resource.

 The sample afp I received from client has embedded resource codepage
 T1GMCUSR (ibm-500_P100-

 1995) with character - set C001 (Arial, 10) and character-set C002
 (ArialBold, 10).  I am not

 sure how to proceed with this. What all resources and configuration I would
 need to map and embed this

 Information in generated afp file.



 Attach is the afp file output.



 Please help.



 Thanks  Regards,

 Sandeep

 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Apache FOP Newbie needs Help Converting XML to PDF

2011-03-09 Thread Peter Hancock
It seems that date.format-date.template.xsl is unavailable.

I suggest that you generate the fo first from the relavent xml and xsl
(this is out of scope of this mailing list - help can be found on
other mailing lists like http://www.mulberrytech.com/xsl/xsl-list/),
and then post the corresponding fo to this list if you are still
having problems processing it with FOP.

Thanks,

Peter



On Wed, Mar 9, 2011 at 2:25 PM, italocardwell italo.cardw...@gmail.com wrote:

 Sorry the -xm was a fat finger.  I was using -xml and even if I change the
 file name to test it still produces the same error.  Complete error below.

 SEVERE: Exception
 javax.xml.transform.TransformerException:
 org.apache.fop.fo.ValidationException:
  First element must be the fo:root formatting object. Found (Namespace URI:
 ,
 Local Name: html) instead. Please make sure you're producing a valid
 XSL-FO do
 cument.







 Eric Douglas wrote:

 -xm?  Try -xml?
 Then take the dashes out of your file name, or try putting it in quotes.

 -Original Message-
 From: italocardwell [mailto:italo.cardw...@gmail.com]
 Sent: Wednesday, March 09, 2011 9:10 AM
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: Apache FOP Newbie needs Help Converting XML to PDF


 I was using
 fop -xm la91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
    -xsl ccr.xsl -pdf test.pdf



 Peter Hancock-2 wrote:

 Hi,

 Can you tell us exactly which files you are using when you invoke fop,
 please.
 Your command should look something like fop -xml foo.xml -xsl foo.xsl
 -pdf foo.pdf  judging by the files you have attached.
 I am guessing you missed out the -xml/-xsl flags, leading FOP to
 believe you were supplying an FO file.

 When an  XML and XSL files are supplied, FOP will perform an XSLT
 transform using the Xalan XSLT Xalan library (I am guessing you will
 need to know more about this stage in your project), generating the FO
 document stream that is then processed to generate the output in the
 desired format:

 XML + XSL - [XSLT transformer] - FO - [XSL:FO processor] - PDF

 This initial stage just saves on from having to do the transform first.

 I hope this info helps,

 Peter



 On Wed, Mar 9, 2011 at 12:43 PM, italocardwell
 italo.cardw...@gmail.com
 wrote:

 Ill be upfront I know nothing about XML.  I am a SQL developer and I
 have a project where I need to convert XML files to a PDF.  The XML
 are going to be the same format every time with different data in
 them.  I am wanting to use apache fop 1.0 at the command line to
 convert these.  I am getting an error every time that I attempt to do
 this.  I will attach the files and the error.  Would someone please
 help me out.  Thanks.
 http://old.nabble.com/file/p31105999/a91ec9d3-e021-4e5e-933f-54992cdc
 415c.20110308172937.xml
 a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
 http://old.nabble.com/file/p31105999/ccr.xsl ccr.xsl
 http://old.nabble.com/file/p31105999/date.format-date.template.xsl
 date.format-date.template.xsl
 http://old.nabble.com/file/p31105999/str.padding.template.xsl
 str.padding.template.xsl

 The error that I get states that fo needs to be in xml-fo format.





 --
 View this message in context:
 http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-
 PDF-tp31105999p31105999.html Sent from the FOP - Users mailing list
 archive at Nabble.com.


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail:
 fop-users-h...@xmlgraphics.apache.org



 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




 --
 View this message in context:
 http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31106656.html
 Sent from the FOP - Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




 --
 View this message in context: 
 http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31106816.html
 Sent from the FOP - Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional 

RE: Apache FOP Newbie needs Help Converting XML to PDF

2011-03-09 Thread Eric Douglas
That error means exactly what it says.  The file you're passing with the -xsl 
parameter is incorrect.  It's not xslfo.
Your xsl file is designed for viewing xml in a browser, not for transforming 
xml into a document.
HTML xsl (http://www.w3schools.com/xsl/default.asp)
Xslfo (http://www.w3schools.com/xslfo/xslfo_documents.asp)

That xslfo page shows how to create the fo which would be the xsl combined with 
xml, as it doesn't have the stylesheet tag.
The file FOP is looking for on the -xsl parameter is the combination of those, 
with the stylesheet tag and the fo:root tag.
The FO tutorials explain how you can mix the xsl and fo together 
(http://www.w3schools.com/xslfo/xslfo_xslt.asp). 

-Original Message-
From: italocardwell [mailto:italo.cardw...@gmail.com] 
Sent: Wednesday, March 09, 2011 9:26 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Apache FOP Newbie needs Help Converting XML to PDF


Sorry the -xm was a fat finger.  I was using -xml and even if I change the file 
name to test it still produces the same error.  Complete error below.

SEVERE: Exception
javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException:
 First element must be the fo:root formatting object. Found (Namespace URI:
,
Local Name: html) instead. Please make sure you're producing a valid XSL-FO 
do cument.







Eric Douglas wrote:
 
 -xm?  Try -xml?
 Then take the dashes out of your file name, or try putting it in quotes. 
 
 -Original Message-
 From: italocardwell [mailto:italo.cardw...@gmail.com]
 Sent: Wednesday, March 09, 2011 9:10 AM
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: Apache FOP Newbie needs Help Converting XML to PDF
 
 
 I was using
 fop -xm la91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
-xsl ccr.xsl -pdf test.pdf
 
  
 
 Peter Hancock-2 wrote:
 
 Hi,
 
 Can you tell us exactly which files you are using when you invoke 
 fop, please.
 Your command should look something like fop -xml foo.xml -xsl foo.xsl 
 -pdf foo.pdf  judging by the files you have attached.
 I am guessing you missed out the -xml/-xsl flags, leading FOP to 
 believe you were supplying an FO file.
 
 When an  XML and XSL files are supplied, FOP will perform an XSLT 
 transform using the Xalan XSLT Xalan library (I am guessing you will 
 need to know more about this stage in your project), generating the 
 FO document stream that is then processed to generate the output in 
 the desired format:
 
 XML + XSL - [XSLT transformer] - FO - [XSL:FO processor] - PDF
 
 This initial stage just saves on from having to do the transform first.
 
 I hope this info helps,
 
 Peter
 
 
 
 On Wed, Mar 9, 2011 at 12:43 PM, italocardwell 
 italo.cardw...@gmail.com
 wrote:

 Ill be upfront I know nothing about XML.  I am a SQL developer and I 
 have a project where I need to convert XML files to a PDF.  The XML 
 are going to be the same format every time with different data in 
 them.  I am wanting to use apache fop 1.0 at the command line to 
 convert these.  I am getting an error every time that I attempt to 
 do this.  I will attach the files and the error.  Would someone 
 please help me out.  Thanks.
 http://old.nabble.com/file/p31105999/a91ec9d3-e021-4e5e-933f-54992cd
 c
 415c.20110308172937.xml
 a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
 http://old.nabble.com/file/p31105999/ccr.xsl ccr.xsl 
 http://old.nabble.com/file/p31105999/date.format-date.template.xsl
 date.format-date.template.xsl
 http://old.nabble.com/file/p31105999/str.padding.template.xsl
 str.padding.template.xsl

 The error that I get states that fo needs to be in xml-fo format.





 --
 View this message in context:
 http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to
 - PDF-tp31105999p31105999.html Sent from the FOP - Users mailing 
 list archive at Nabble.com.


 
 - To unsubscribe, e-mail: 
 fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: 
 fop-users-h...@xmlgraphics.apache.org


 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: 
 fop-users-h...@xmlgraphics.apache.org
 
 
 
 
 --
 View this message in context:
 http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-P
 DF-tp31105999p31106656.html Sent from the FOP - Users mailing list 
 archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 
 
 

--
View this message in context: 

Re: Font Configuration

2011-03-09 Thread Sandeep Dhulia
Hi Peter,

Thanks for the response. Currently I don't have the IBM raster fonts, so the
configuration is with base-14 fonts. But the documents says

*By default, all manually configured fonts are embedded, unless they are
matched in the **referenced-fonts section of the configuration
file*http://xmlgraphics.apache.org/fop/trunk/fonts.html#embedding
*. However, the default fonts shown above will not be embedded.*
So default fonts here means base14-font. Is the assumption right or my
configuration is not able to detect base14-font. I have given auto-detect
tag in fonts config file.

Regards,
Sandeep


On Wed, Mar 9, 2011 at 7:58 PM, Peter Hancock peter.hanc...@gmail.comwrote:

 Hi Sandeep,
 The answer to your question can be found at
  http://xmlgraphics.apache.org/fop/trunk/output.html#afp-font-config
 and
 http://xmlgraphics.apache.org/fop/trunk/fonts.html#embedding

 Peter


 On Wed, Mar 9, 2011 at 1:38 PM, Sandeep Dhulia sdhu...@gmail.com wrote:
  Hi Guys,
 
  I need some help for afp-font configuration.  Currently my fo uses 2
 fonts,
  TimeRoman-10-Normal and TimesRoman-10-Bold. I am using default fop
  configuration. When I generate afp file, I get the codepages (T1V10500) 
  character sets (C0N2 and C0N4) as external resource referenced in
  afp file. It seems the codepage and character set are mapped to following
  line in fop configuration
 
  afp-font name=Times Roman type=raster codepage=T1V10500
  encoding=Cp500
 
  afp-raster-font size=10 characterset=C0N2
 base14-font=TimeRoman/
 
  afp-font name=Times Roman Bold type=raster codepage=T1V10500
  encoding=Cp500
 
  afp-raster-font size=10 characterset=C0N4
 base14-font=TimesBold/
 
  I though the above configuration will embed the font information in the
 afp
  file but it is added as an external resource.
 
  The sample afp I received from client has embedded resource codepage
  T1GMCUSR (ibm-500_P100-
 
  1995) with character - set C001 (Arial, 10) and character-set
 C002
  (ArialBold, 10).  I am not
 
  sure how to proceed with this. What all resources and configuration I
 would
  need to map and embed this
 
  Information in generated afp file.
 
 
 
  Attach is the afp file output.
 
 
 
  Please help.
 
 
 
  Thanks  Regards,
 
  Sandeep
 
  -
  To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
  For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 

 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: Apache FOP Newbie needs Help Converting XML to PDF

2011-03-09 Thread Oscar Schoof

Your ccr.xsl is not producing fo, but html. Maybe that's the problem.

Oscar



Re: Apache FOP Newbie needs Help Converting XML to PDF

2011-03-09 Thread italocardwell

Thanks everyone for helping me out.  I do appologize for being a moron with
this stuff.  Is there any way to convert my xsl file to a xslfo file so that
it can be used?  Or will it have to be completely re-created?



Oscar Schoof wrote:
 
 Your ccr.xsl is not producing fo, but html. Maybe that's the problem.
 
 Oscar
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31108052.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Apache FOP Newbie needs Help Converting XML to PDF

2011-03-09 Thread Christopher R. Maden
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/09/2011 11:41 AM, italocardwell wrote:
 Thanks everyone for helping me out.  I do appologize for being a
 moron with this stuff.  Is there any way to convert my xsl file to a
 xslfo file so that it can be used?  Or will it have to be completely
 re-created?

XSLT is a transformation language that turns one kind of XML into
another.  XHTML is one kind of XML; XSL-FO is a completely different
kind of XML.

Since you said you were a SQL guy, think of XSLT as like a report generator.

If you have a report that lists employees by ID with their SSNs and
salaries, and you instead need a report that lists employees by
department and last name with salaries and managers, you’re going to
need to write a new report.

~Chris
- -- 
Chris Maden, text nerd  URL: http://crism.maden.org/ 
“Those in power write the history, while those who suffer
 write the songs.” — Frank Harte
GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk13rv8ACgkQGfhmdwB3wxlAHgCfRVuyfZqQkMfZu0m5O8vnCpOQ
RDwAnj7G88fTYFst9A2mkmyHcjUOLG38
=M6qQ
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: Font Weight

2011-03-09 Thread Marquart, Joshua D
“FOP does not synthesize fonts with different weights. You need to supply the 
fonts with the weights you specify in FO content.”

 

I understand Fop doesn’t synthesize the weights.  I understand that it has two 
specific built-in weights (700 and 400) that are being used to replace other 
weights per the following:

 

When I set-up using a Java2DRenderer and specify the following FO content 
snippets:

 

fo:table-cell font-size=10pt font-family=Helveticafo:block 
line-height=13pt

fo:block white-space-collapse=true

fo:inline font-weight=900900 Weight /fo:inline

…

fo:inline font-weight=800800 Weight /fo:inline

…

fo:inline font-weight=700700 Weight /fo:inline

…

fo:inline font-weight=600600 Weight /fo:inline

…

fo:inline font-weight=500500 Weight /fo:inline

…

fo:inline font-weight=400400 Weight /fo:inline

…

fo:inline font-weight=300300 Weight /fo:inline

/fo:block/fo:block/fo:table-cell

…

 

the logger gives me the following information:

 

WARNING: Font Helvetica,normal,900 not found. Substituting with 
Helvetica,normal,700.

WARNING: Font Helvetica,normal,800 not found. Substituting with 
Helvetica,normal,700.

WARNING: Font Helvetica,normal,600 not found. Substituting with 
Helvetica,normal,700.

WARNING: Font Helvetica,normal,500 not found. Substituting with 
Helvetica,normal,400.

WARNING: Font Helvetica,normal,300 not found. Substituting with 
Helvetica,normal,400.

 

So I would need to supply very specific replacement fonts for 
Helvetica,normal,900 ( and 800-300, not counting 400)?

(Same as above when replacing Helvetica with Arial).

 

I DO understand the following:

 

1- that per the current specs, item 7.9.9 for font-weight has a “TODO 
relative font weights” message.

2 - that per the current build, the font classes generated from Helvetica.xml 
and HelveticaBold.xml are used for 400 and 700 respectively

3 - that per the fuzzy replacement, 700 is used for 900-600 and 400 is used for 
500-100(probably).

 

So my questions still stand

1 - is there a simpler way to use / access / apply a darker 500 or 600 weight 
Helvetica and if so, what’s the best process to handle it given the codebase?

2 - should I instead render a “Helvetica500.xml” and generate the appropriate 
font class; obviously since that’s not yet been done with the existing fop 
codebase, it is probably a lot more work than needed.

3 - Any other option I should pursue?

 

If there is a process started to handle item 7.9.9, I would be happy to pitch 
in and help, I am just not certain where to start.

 

Thanks,

 

Josh

 

 

From: Glenn Adams [mailto:gl...@skynav.com] 
Sent: Tuesday, March 08, 2011 6:40 PM
To: fop-users@xmlgraphics.apache.org
Cc: Marquart, Joshua D
Subject: Re: Font Weight

 

FOP does not synthesize fonts with different weights. You need to supply the 
fonts with the weights you specify in FO content.

 

Regards,

Glenn

On Tue, Mar 8, 2011 at 4:31 PM, Marquart, Joshua D 
joshua.marqu...@firstdata.com wrote:

I have a question about Font Weight.

 

We’re using Helvetica and using FOP to take the FO file and generate it as both 
(1) a PostScript file and (2) a TIFF file.  

 

Additionally, we are able to use third-party software to take the PostScript 
file and convert it directly to a second TIFF file (for comparison reasons).

 

Of course, the fonts on the TIFF from FOP are a little pixilated and the 
“normal” font could stand to be rendered a bit darker.

 

I am using Helvetica and tried to set the font-weight to 500 or 600, but it 
gets replaced with weight 400, which is apparently the “normal” Helvetica font 
registered in the system.

Font-weight Bold and values of 800 and 900 use the “bold” Helvetica which is 
weight 700.

 

Is there an easy way to use / access a darker 500 or 600 weight Helvetica, or 
possibly render the or am I really sunk here?

 

I’ve already extended the Java2DRenderer,  for my own purposes.  

 

The following Graphics2D rendering hints don’t seem to do much when included:

 

graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, 
RenderingHints.VALUE_FRACTIONALMETRICS_ON);

graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, 
RenderingHints.VALUE_ANTIALIAS_ON);

graphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, 
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);

graphics.setRenderingHint(RenderingHints.KEY_RENDERING, 
RenderingHints.VALUE_RENDER_QUALITY);

graphics.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, 
RenderingHints.VALUE_STROKE_PURE);

 

Suggestions would be very helpful.

 

Much thanks,

 

Josh

in error, please notify First Data immediately by replying to this message and 
deleting it from your computer. 

 



-
The information in this message may be proprietary and/or
confidential, and protected from disclosure.  If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you 

RE: Font Weight

2011-03-09 Thread Eric Douglas
Yes.  Generally one font file contains one font set with one weight.
You would need to supply a custom font set to get a different weight.
Any program which allows you to print in a different weight would do the
same, to either require you to have a font set in that weight or to
guess at it.
Guessing can be bad.  For instance I create images from FOP with the
PNGRenderer.  It gets larger images if I increase targetresolution.  If
I generate a smaller image then try to make it bigger with the
Graphics2D transforming method you can see it gets fuzzy.
Optional fuzzy logic could be useful, currently not implemented.



From: Marquart, Joshua D [mailto:joshua.marqu...@firstdata.com] 
Sent: Wednesday, March 09, 2011 11:50 AM
To: Glenn Adams; fop-users@xmlgraphics.apache.org
Subject: RE: Font Weight



FOP does not synthesize fonts with different weights. You need to
supply the fonts with the weights you specify in FO content.

 

I understand Fop doesn't synthesize the weights.  I understand that it
has two specific built-in weights (700 and 400) that are being used to
replace other weights per the following:

 

When I set-up using a Java2DRenderer and specify the following FO
content snippets:

 

fo:table-cell font-size=10pt font-family=Helveticafo:block
line-height=13pt

fo:block white-space-collapse=true

fo:inline font-weight=900900 Weight /fo:inline

...

fo:inline font-weight=800800 Weight /fo:inline

...

fo:inline font-weight=700700 Weight /fo:inline

...

fo:inline font-weight=600600 Weight /fo:inline

...

fo:inline font-weight=500500 Weight /fo:inline

...

fo:inline font-weight=400400 Weight /fo:inline

...

fo:inline font-weight=300300 Weight /fo:inline

/fo:block/fo:block/fo:table-cell

...

 

the logger gives me the following information:

 

WARNING: Font Helvetica,normal,900 not found. Substituting with
Helvetica,normal,700.

WARNING: Font Helvetica,normal,800 not found. Substituting with
Helvetica,normal,700.

WARNING: Font Helvetica,normal,600 not found. Substituting with
Helvetica,normal,700.

WARNING: Font Helvetica,normal,500 not found. Substituting with
Helvetica,normal,400.

WARNING: Font Helvetica,normal,300 not found. Substituting with
Helvetica,normal,400.

 

So I would need to supply very specific replacement fonts for
Helvetica,normal,900 ( and 800-300, not counting 400)?

(Same as above when replacing Helvetica with Arial).

 

I DO understand the following:

 

1- that per the current specs, item 7.9.9 for font-weight has a TODO
relative font weights message.

2 - that per the current build, the font classes generated from
Helvetica.xml and HelveticaBold.xml are used for 400 and 700
respectively

3 - that per the fuzzy replacement, 700 is used for 900-600 and 400 is
used for 500-100(probably).

 

So my questions still stand

1 - is there a simpler way to use / access / apply a darker 500 or 600
weight Helvetica and if so, what's the best process to handle it given
the codebase?

2 - should I instead render a Helvetica500.xml and generate the
appropriate font class; obviously since that's not yet been done with
the existing fop codebase, it is probably a lot more work than needed.

3 - Any other option I should pursue?

 

If there is a process started to handle item 7.9.9, I would be happy to
pitch in and help, I am just not certain where to start.

 

Thanks,

 

Josh

 

 

From: Glenn Adams [mailto:gl...@skynav.com] 
Sent: Tuesday, March 08, 2011 6:40 PM
To: fop-users@xmlgraphics.apache.org
Cc: Marquart, Joshua D
Subject: Re: Font Weight

 

FOP does not synthesize fonts with different weights. You need to supply
the fonts with the weights you specify in FO content.

 

Regards,

Glenn

On Tue, Mar 8, 2011 at 4:31 PM, Marquart, Joshua D
joshua.marqu...@firstdata.com wrote:

I have a question about Font Weight.

 

We're using Helvetica and using FOP to take the FO file and generate it
as both (1) a PostScript file and (2) a TIFF file.  

 

Additionally, we are able to use third-party software to take the
PostScript file and convert it directly to a second TIFF file (for
comparison reasons).

 

Of course, the fonts on the TIFF from FOP are a little pixilated and the
normal font could stand to be rendered a bit darker.

 

I am using Helvetica and tried to set the font-weight to 500 or 600, but
it gets replaced with weight 400, which is apparently the normal
Helvetica font registered in the system.

Font-weight Bold and values of 800 and 900 use the bold Helvetica
which is weight 700.

 

Is there an easy way to use / access a darker 500 or 600 weight
Helvetica, or possibly render the or am I really sunk here?

 

I've already extended the Java2DRenderer,  for my own purposes.  

 

The following Graphics2D rendering hints don't seem to do much when
included:

 

graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
RenderingHints.VALUE_FRACTIONALMETRICS_ON);

graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,

Re: Font Weight

2011-03-09 Thread Glenn Adams
Josh,

What you have not said yet is whether you actually have (on your system) a
font with the desired weight or not. Specifically, do you actually have
installed multiple font instances with the distinct weights you wish to
reference? If you do not, then it doesn't do much good to discuss referring
to them.

On the other hand, if you do have distinct faces with weights 300, 500, 600,
800, 900, etc., installed, then it is merely a matter of ensuring that the
reference in your FO file correctly maps to the associated font instance.
That can be handled in different ways.

So please answer whether you do have the fonts installed in the first place
with these weights.

G.

On Wed, Mar 9, 2011 at 9:50 AM, Marquart, Joshua D 
joshua.marqu...@firstdata.com wrote:

 “FOP does not synthesize fonts with different weights. You need to supply
 the fonts with the weights you specify in FO content.”



 I understand Fop doesn’t synthesize the weights.  I understand that it has
 two specific built-in weights (700 and 400) that are being used to replace
 other weights per the following:



 When I set-up using a Java2DRenderer and specify the following FO content
 snippets:



 fo:table-cell font-size=10pt font-family=Helveticafo:block
 line-height=13pt

 fo:block white-space-collapse=true

 fo:inline font-weight=900900 Weight /fo:inline

 …

 fo:inline font-weight=800800 Weight /fo:inline

 …

 fo:inline font-weight=700700 Weight /fo:inline

 …

 fo:inline font-weight=600600 Weight /fo:inline

 …

 fo:inline font-weight=500500 Weight /fo:inline

 …

 fo:inline font-weight=400400 Weight /fo:inline

 …

 fo:inline font-weight=300300 Weight /fo:inline

 /fo:block/fo:block/fo:table-cell

 …



 the logger gives me the following information:



 WARNING: Font Helvetica,normal,900 not found. Substituting with
 Helvetica,normal,700.

 WARNING: Font Helvetica,normal,800 not found. Substituting with
 Helvetica,normal,700.

 WARNING: Font Helvetica,normal,600 not found. Substituting with
 Helvetica,normal,700.

 WARNING: Font Helvetica,normal,500 not found. Substituting with
 Helvetica,normal,400.

 WARNING: Font Helvetica,normal,300 not found. Substituting with
 Helvetica,normal,400.



 So I would need to supply very specific replacement fonts for
 Helvetica,normal,900 ( and 800-300, not counting 400)?

 (Same as above when replacing Helvetica with Arial).



 I DO understand the following:



 1- that per the current specs, item 7.9.9 for font-weight has a “TODO
 relative font weights” message.

 2 - that per the current build, the font classes generated from
 Helvetica.xml and HelveticaBold.xml are used for 400 and 700 respectively

 3 - that per the fuzzy replacement, 700 is used for 900-600 and 400 is used
 for 500-100(probably).



 So my questions still stand

 1 - is there a simpler way to use / access / apply a darker 500 or 600
 weight Helvetica and if so, what’s the best process to handle it given the
 codebase?

 2 - should I instead render a “Helvetica500.xml” and generate the
 appropriate font class; obviously since that’s not yet been done with the
 existing fop codebase, it is probably a lot more work than needed.

 3 - Any other option I should pursue?



 If there is a process started to handle item 7.9.9, I would be happy to
 pitch in and help, I am just not certain where to start.



 Thanks,



 Josh





 *From:* Glenn Adams [mailto:gl...@skynav.com]
 *Sent:* Tuesday, March 08, 2011 6:40 PM
 *To:* fop-users@xmlgraphics.apache.org
 *Cc:* Marquart, Joshua D
 *Subject:* Re: Font Weight



 FOP does not synthesize fonts with different weights. You need to supply
 the fonts with the weights you specify in FO content.



 Regards,

 Glenn

 On Tue, Mar 8, 2011 at 4:31 PM, Marquart, Joshua D 
 joshua.marqu...@firstdata.com wrote:

 I have a question about Font Weight.



 We’re using Helvetica and using FOP to take the FO file and generate it as
 both (1) a PostScript file and (2) a TIFF file.



 Additionally, we are able to use third-party software to take the
 PostScript file and convert it directly to a second TIFF file (for
 comparison reasons).



 Of course, the fonts on the TIFF from FOP are a little pixilated and the
 “normal” font could stand to be rendered a bit darker.



 I am using Helvetica and tried to set the font-weight to 500 or 600, but it
 gets replaced with weight 400, which is apparently the “normal” Helvetica
 font registered in the system.

 Font-weight Bold and values of 800 and 900 use the “bold” Helvetica which
 is weight 700.



 Is there an easy way to use / access a darker 500 or 600 weight Helvetica,
 or possibly render the or am I really sunk here?



 I’ve already extended the Java2DRenderer,  for my own purposes.



 The following Graphics2D rendering hints don’t seem to do much when
 included:



 graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
 RenderingHints.VALUE_FRACTIONALMETRICS_ON);

 graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
 

Complex Script, BIDI text supported?

2011-03-09 Thread Matthias Reischenbacher

Glenn,

I tried your work today of the complex script branch. I managed to generate
a PDF file with Hebrew text using Arial Unicode MS font and writing-mode set
to rl-tb. The Hebrew text is displayed fine but english characters are also
mirrored. Do I have to set an additional xsl-fo attribute in order to
correctly display english characters or is the BIDI text algorithm not yet
implemented?

Thanks for your help,
Matthias Reischenbacher
-- 
View this message in context: 
http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109094.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Complex Script, BIDI text supported?

2011-03-09 Thread Glenn Adams
Matthias,

Thanks for the report. Could you send me the FO input file and PDF output
file? I am actively testing and fixing the Bidi and Script support, with
real-time updates occurring at git://github.com/skynavga/fop.git.

Regards,
Glenn

On Wed, Mar 9, 2011 at 11:28 AM, Matthias Reischenbacher 
matthias8...@gmx.at wrote:


 Glenn,

 I tried your work today of the complex script branch. I managed to generate
 a PDF file with Hebrew text using Arial Unicode MS font and writing-mode
 set
 to rl-tb. The Hebrew text is displayed fine but english characters are also
 mirrored. Do I have to set an additional xsl-fo attribute in order to
 correctly display english characters or is the BIDI text algorithm not yet
 implemented?

 Thanks for your help,
 Matthias Reischenbacher
 --
 View this message in context:
 http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109094.html
 Sent from the FOP - Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: Apache FOP Newbie needs Help Converting XML to PDF

2011-03-09 Thread Oscar Schoof
For what it's worth: there exists html to fo convertors. For example: 
http://html2fo.sourceforge.net/


Oscar


Op 9-3-2011 17:46, Christopher R. Maden schreef:


XSLT is a transformation language that turns one kind of XML into
another.  XHTML is one kind of XML; XSL-FO is a completely different
kind of XML.




RE: Font Weight

2011-03-09 Thread Marquart, Joshua D
I was just doing research on this topic, came back here to supplement my 
message with info, and saw you already beat me to it.

 

Helpful method: getFontInfo().dumpAllTripletsToSystemOut()

 

So… yes, I do not have fonts installed for font weights of 300, 500, etc. and 
that would account for resolving to 400/700.

 

The problem I’m seeing is when generating a PostScript and a Tiff from the same 
xsl-fo file.

The text generated in the Tiff (for the 400 weight) appears much lighter than 
identical text in the PostScript and is likely due to using the Java2DRenderer 
vs. the PsRenderer.

 

Oddly, when I set the font to Arial in the xsl-fo:

- the font in the resulting PostScript appears Times Roman

- the font in the resulting Tiff is identical to the font used in the Tiff when 
Helvetica was specified.

 

Other than hunting down, installing and registering a weight 500 or so font for 
Helvetica or Arial (where might I find one?  No idea.), are there other options 
that might I employ to lessen the lightness of the 400-weight ?

 

Thanks,

 

-Josh

 

From: Glenn Adams [mailto:gl...@skynav.com] 
Sent: Wednesday, March 09, 2011 12:02 PM
To: Marquart, Joshua D
Cc: fop-users@xmlgraphics.apache.org
Subject: Re: Font Weight

 

Josh,

 

What you have not said yet is whether you actually have (on your system) a font 
with the desired weight or not. Specifically, do you actually have installed 
multiple font instances with the distinct weights you wish to reference? If you 
do not, then it doesn't do much good to discuss referring to them.

 

On the other hand, if you do have distinct faces with weights 300, 500, 600, 
800, 900, etc., installed, then it is merely a matter of ensuring that the 
reference in your FO file correctly maps to the associated font instance. That 
can be handled in different ways.

 

So please answer whether you do have the fonts installed in the first place 
with these weights.

 

G.

On Wed, Mar 9, 2011 at 9:50 AM, Marquart, Joshua D 
joshua.marqu...@firstdata.com wrote:

“FOP does not synthesize fonts with different weights. You need to supply the 
fonts with the weights you specify in FO content.”

 

I understand Fop doesn’t synthesize the weights.  I understand that it has two 
specific built-in weights (700 and 400) that are being used to replace other 
weights per the following:

 

When I set-up using a Java2DRenderer and specify the following FO content 
snippets:

 

fo:table-cell font-size=10pt font-family=Helveticafo:block 
line-height=13pt

fo:block white-space-collapse=true

fo:inline font-weight=900900 Weight /fo:inline

…

fo:inline font-weight=800800 Weight /fo:inline

…

fo:inline font-weight=700700 Weight /fo:inline

…

fo:inline font-weight=600600 Weight /fo:inline

…

fo:inline font-weight=500500 Weight /fo:inline

…

fo:inline font-weight=400400 Weight /fo:inline

…

fo:inline font-weight=300300 Weight /fo:inline

/fo:block/fo:block/fo:table-cell

…

 

the logger gives me the following information:

 

WARNING: Font Helvetica,normal,900 not found. Substituting with 
Helvetica,normal,700.

WARNING: Font Helvetica,normal,800 not found. Substituting with 
Helvetica,normal,700.

WARNING: Font Helvetica,normal,600 not found. Substituting with 
Helvetica,normal,700.

WARNING: Font Helvetica,normal,500 not found. Substituting with 
Helvetica,normal,400.

WARNING: Font Helvetica,normal,300 not found. Substituting with 
Helvetica,normal,400.

 

So I would need to supply very specific replacement fonts for 
Helvetica,normal,900 ( and 800-300, not counting 400)?

(Same as above when replacing Helvetica with Arial).

 

I DO understand the following:

 

1- that per the current specs, item 7.9.9 for font-weight has a “TODO 
relative font weights” message.

2 - that per the current build, the font classes generated from Helvetica.xml 
and HelveticaBold.xml are used for 400 and 700 respectively

3 - that per the fuzzy replacement, 700 is used for 900-600 and 400 is used for 
500-100(probably).

 

So my questions still stand

1 - is there a simpler way to use / access / apply a darker 500 or 600 weight 
Helvetica and if so, what’s the best process to handle it given the codebase?

2 - should I instead render a “Helvetica500.xml” and generate the appropriate 
font class; obviously since that’s not yet been done with the existing fop 
codebase, it is probably a lot more work than needed.

3 - Any other option I should pursue?

 

If there is a process started to handle item 7.9.9, I would be happy to pitch 
in and help, I am just not certain where to start.

 

Thanks,

 

Josh

 

 

From: Glenn Adams [mailto:gl...@skynav.com] 
Sent: Tuesday, March 08, 2011 6:40 PM
To: fop-users@xmlgraphics.apache.org
Cc: Marquart, Joshua D
Subject: Re: Font Weight

 

FOP does not synthesize fonts with different weights. You need to supply the 
fonts with the weights you specify in FO content.

 

Regards,

Glenn

On Tue, Mar 8, 2011 at 4:31 PM, Marquart, Joshua D 

Re: Complex Script, BIDI text supported?

2011-03-09 Thread Matthias Reischenbacher

Glenn,

here it goes:
Fo file:  http://old.nabble.com/file/p31109566/hebrew_test.xml
hebrew_test.xml 
PDF file:  http://old.nabble.com/file/p31109566/hebrew_test.pdf
hebrew_test.pdf 

Should I try building your code on git hub? I've never used git therefore I
first went with the apache SVN branch.

Thanks  Regards,
Matthias


Glenn Adams-2 wrote:
 
 Matthias,
 
 Thanks for the report. Could you send me the FO input file and PDF output
 file? I am actively testing and fixing the Bidi and Script support, with
 real-time updates occurring at git://github.com/skynavga/fop.git.
 
 Regards,
 Glenn
 
 On Wed, Mar 9, 2011 at 11:28 AM, Matthias Reischenbacher 
 matthias8...@gmx.at wrote:
 

 Glenn,

 I tried your work today of the complex script branch. I managed to
 generate
 a PDF file with Hebrew text using Arial Unicode MS font and writing-mode
 set
 to rl-tb. The Hebrew text is displayed fine but english characters are
 also
 mirrored. Do I have to set an additional xsl-fo attribute in order to
 correctly display english characters or is the BIDI text algorithm not
 yet
 implemented?

 Thanks for your help,
 Matthias Reischenbacher
 --
 View this message in context:
 http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109094.html
 Sent from the FOP - Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


 
 

-- 
View this message in context: 
http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109566.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Font Weight

2011-03-09 Thread Glenn Adams
I agree it there are differences between Java2DRenderer and PsRenderer that
could account for this. Differences in anti-aliasing may also be at work
here.

I'm afraid I have exclusively used the PDFRenderer to date, so I can't offer
more help on this difference. Perhaps another party may have something more
to offer.

G.

On Wed, Mar 9, 2011 at 12:06 PM, Marquart, Joshua D 
joshua.marqu...@firstdata.com wrote:

 I was just doing research on this topic, came back here to supplement my
 message with info, and saw you already beat me to it.



 Helpful method: getFontInfo().dumpAllTripletsToSystemOut()



 So… yes, I do not have fonts installed for font weights of 300, 500, etc.
 and that would account for resolving to 400/700.



 The problem I’m seeing is when generating a PostScript and a Tiff from the
 same xsl-fo file.

 The text generated in the Tiff (for the 400 weight) appears much lighter
 than identical text in the PostScript and is likely due to using the
 Java2DRenderer vs. the PsRenderer.



 Oddly, when I set the font to Arial in the xsl-fo:

 - the font in the resulting PostScript appears Times Roman

 - the font in the resulting Tiff is identical to the font used in the Tiff
 when Helvetica was specified.



 Other than hunting down, installing and registering a weight 500 or so font
 for Helvetica or Arial (where might I find one?  No idea.), are there other
 options that might I employ to lessen the lightness of the 400-weight ?



 Thanks,



 -Josh



 *From:* Glenn Adams [mailto:gl...@skynav.com]
 *Sent:* Wednesday, March 09, 2011 12:02 PM
 *To:* Marquart, Joshua D
 *Cc:* fop-users@xmlgraphics.apache.org
 *Subject:* Re: Font Weight



 Josh,



 What you have not said yet is whether you actually have (on your system) a
 font with the desired weight or not. Specifically, do you actually have
 installed multiple font instances with the distinct weights you wish to
 reference? If you do not, then it doesn't do much good to discuss referring
 to them.



 On the other hand, if you do have distinct faces with weights 300, 500,
 600, 800, 900, etc., installed, then it is merely a matter of ensuring that
 the reference in your FO file correctly maps to the associated font
 instance. That can be handled in different ways.



 So please answer whether you do have the fonts installed in the first place
 with these weights.



 G.

 On Wed, Mar 9, 2011 at 9:50 AM, Marquart, Joshua D 
 joshua.marqu...@firstdata.com wrote:

 “FOP does not synthesize fonts with different weights. You need to supply
 the fonts with the weights you specify in FO content.”



 I understand Fop doesn’t synthesize the weights.  I understand that it has
 two specific built-in weights (700 and 400) that are being used to replace
 other weights per the following:



 When I set-up using a Java2DRenderer and specify the following FO content
 snippets:



 fo:table-cell font-size=10pt font-family=Helveticafo:block
 line-height=13pt

 fo:block white-space-collapse=true

 fo:inline font-weight=900900 Weight /fo:inline

 …

 fo:inline font-weight=800800 Weight /fo:inline

 …

 fo:inline font-weight=700700 Weight /fo:inline

 …

 fo:inline font-weight=600600 Weight /fo:inline

 …

 fo:inline font-weight=500500 Weight /fo:inline

 …

 fo:inline font-weight=400400 Weight /fo:inline

 …

 fo:inline font-weight=300300 Weight /fo:inline

 /fo:block/fo:block/fo:table-cell

 …



 the logger gives me the following information:



 WARNING: Font Helvetica,normal,900 not found. Substituting with
 Helvetica,normal,700.

 WARNING: Font Helvetica,normal,800 not found. Substituting with
 Helvetica,normal,700.

 WARNING: Font Helvetica,normal,600 not found. Substituting with
 Helvetica,normal,700.

 WARNING: Font Helvetica,normal,500 not found. Substituting with
 Helvetica,normal,400.

 WARNING: Font Helvetica,normal,300 not found. Substituting with
 Helvetica,normal,400.



 So I would need to supply very specific replacement fonts for
 Helvetica,normal,900 ( and 800-300, not counting 400)?

 (Same as above when replacing Helvetica with Arial).



 I DO understand the following:



 1- that per the current specs, item 7.9.9 for font-weight has a “TODO
 relative font weights” message.

 2 - that per the current build, the font classes generated from
 Helvetica.xml and HelveticaBold.xml are used for 400 and 700 respectively

 3 - that per the fuzzy replacement, 700 is used for 900-600 and 400 is used
 for 500-100(probably).



 So my questions still stand

 1 - is there a simpler way to use / access / apply a darker 500 or 600
 weight Helvetica and if so, what’s the best process to handle it given the
 codebase?

 2 - should I instead render a “Helvetica500.xml” and generate the
 appropriate font class; obviously since that’s not yet been done with the
 existing fop codebase, it is probably a lot more work than needed.

 3 - Any other option I should pursue?



 If there is a process started to handle item 7.9.9, I would be happy to
 pitch in and 

RE: Font Weight

2011-03-09 Thread Eric Douglas
I tested all the renderers.  The TIFFRenderer created an image file and
I didn't like it.  The PSRenderer didn't like my TTFs.
The PDFRenderer works for generating PDF documents and sending output
indirectly to the printer.  I actually use embedded code and pass a
PDFRenderer to the FOUserAgent then get the output in PDF format from
the transform in a stream and pass it into the load of PDDocument in the
pdfbox project and use the java print job to print it.  That has printed
everything I've attempted to every printer we have.
I'm also now using the PNGRenderer to get the output as images of pages
to load into a custom preview window.  This is working great.  My
preview window allows me to transform the document on the server and
stream the output images to the client to display so I don't have to
generate a transformer or renderer on the client machine and it's pretty
fast (way faster than the FOP PreviewPanel).  The PNGRenderer of course
extends the Java2DRenderer.
 



From: Glenn Adams [mailto:gl...@skynav.com] 
Sent: Wednesday, March 09, 2011 2:37 PM
To: Marquart, Joshua D
Cc: fop-users@xmlgraphics.apache.org
Subject: Re: Font Weight


I agree it there are differences between Java2DRenderer and PsRenderer
that could account for this. Differences in anti-aliasing may also be at
work here. 

I'm afraid I have exclusively used the PDFRenderer to date, so I can't
offer more help on this difference. Perhaps another party may have
something more to offer.

G.


On Wed, Mar 9, 2011 at 12:06 PM, Marquart, Joshua D
joshua.marqu...@firstdata.com wrote:


I was just doing research on this topic, came back here to
supplement my message with info, and saw you already beat me to it.

 

Helpful method: getFontInfo().dumpAllTripletsToSystemOut()

 

So... yes, I do not have fonts installed for font weights of
300, 500, etc. and that would account for resolving to 400/700.

 

The problem I'm seeing is when generating a PostScript and a
Tiff from the same xsl-fo file.

The text generated in the Tiff (for the 400 weight) appears much
lighter than identical text in the PostScript and is likely due to using
the Java2DRenderer vs. the PsRenderer.

 

Oddly, when I set the font to Arial in the xsl-fo:

- the font in the resulting PostScript appears Times Roman

- the font in the resulting Tiff is identical to the font used
in the Tiff when Helvetica was specified.

 

Other than hunting down, installing and registering a weight 500
or so font for Helvetica or Arial (where might I find one?  No idea.),
are there other options that might I employ to lessen the lightness of
the 400-weight ?

 

Thanks,

 

-Josh

 

From: Glenn Adams [mailto:gl...@skynav.com] 
Sent: Wednesday, March 09, 2011 12:02 PM
To: Marquart, Joshua D
Cc: fop-users@xmlgraphics.apache.org
Subject: Re: Font Weight

 

Josh,

 

What you have not said yet is whether you actually have (on your
system) a font with the desired weight or not. Specifically, do you
actually have installed multiple font instances with the distinct
weights you wish to reference? If you do not, then it doesn't do much
good to discuss referring to them.

 

On the other hand, if you do have distinct faces with weights
300, 500, 600, 800, 900, etc., installed, then it is merely a matter of
ensuring that the reference in your FO file correctly maps to the
associated font instance. That can be handled in different ways.

 

So please answer whether you do have the fonts installed in the
first place with these weights.

 

G.

On Wed, Mar 9, 2011 at 9:50 AM, Marquart, Joshua D
joshua.marqu...@firstdata.com wrote:

FOP does not synthesize fonts with different weights. You need
to supply the fonts with the weights you specify in FO content.

 

I understand Fop doesn't synthesize the weights.  I understand
that it has two specific built-in weights (700 and 400) that are being
used to replace other weights per the following:

 

When I set-up using a Java2DRenderer and specify the following
FO content snippets:

 

fo:table-cell font-size=10pt
font-family=Helveticafo:block line-height=13pt

fo:block white-space-collapse=true

fo:inline font-weight=900900 Weight /fo:inline

...

fo:inline font-weight=800800 Weight /fo:inline

...

fo:inline font-weight=700700 Weight /fo:inline

...

fo:inline font-weight=600600 Weight /fo:inline

...

fo:inline font-weight=500500 Weight /fo:inline

...

fo:inline font-weight=400400 Weight /fo:inline

...

fo:inline font-weight=300300 Weight /fo:inline


Re: Complex Script, BIDI text supported?

2011-03-09 Thread Glenn Adams
It appears the problem is due to a bug related to the use of
block-container, which I will look into. However, if you remove
block-container, and put the writing-mode and (default) font-family on
fo:page-sequence, it should produce correct results. See attached for what
I'm getting (using the current GITHUB repo) with a modified FO.

I would advise you use the GIT repository for now, because it is kept up to
date with my working copy. I submit a patch irregularly for integration into
the SVN Temp_ComplexScripts branch.

G.

On Wed, Mar 9, 2011 at 12:21 PM, Matthias Reischenbacher 
matthias8...@gmx.at wrote:


 Glenn,

 here it goes:
 Fo file:  http://old.nabble.com/file/p31109566/hebrew_test.xml
 hebrew_test.xml
 PDF file:  http://old.nabble.com/file/p31109566/hebrew_test.pdf
 hebrew_test.pdf

 Should I try building your code on git hub? I've never used git therefore I
 first went with the apache SVN branch.

 Thanks  Regards,
 Matthias


 Glenn Adams-2 wrote:
 
  Matthias,
 
  Thanks for the report. Could you send me the FO input file and PDF output
  file? I am actively testing and fixing the Bidi and Script support, with
  real-time updates occurring at git://github.com/skynavga/fop.git.
 
  Regards,
  Glenn
 
  On Wed, Mar 9, 2011 at 11:28 AM, Matthias Reischenbacher 
  matthias8...@gmx.at wrote:
 
 
  Glenn,
 
  I tried your work today of the complex script branch. I managed to
  generate
  a PDF file with Hebrew text using Arial Unicode MS font and writing-mode
  set
  to rl-tb. The Hebrew text is displayed fine but english characters are
  also
  mirrored. Do I have to set an additional xsl-fo attribute in order to
  correctly display english characters or is the BIDI text algorithm not
  yet
  implemented?
 
  Thanks for your help,
  Matthias Reischenbacher
  --
  View this message in context:
 
 http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109094.html
  Sent from the FOP - Users mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
  For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 
 
 
 

 --
 View this message in context:
 http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109566.html
 Sent from the FOP - Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


?xml version=1.0 encoding=UTF-8?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
fo:simple-page-master master-name=simple page-height=5in page-width=5in
  fo:region-body/
/fo:simple-page-master
  /fo:layout-master-set
  fo:page-sequence master-reference=simple writing-mode=rl-tb font-family=Arial Unicode MS
fo:flow flow-name=xsl-region-body
  fo:blockחוברת הוראות בטיחות זו מתמקדת בכמה מהמצבים העקרוניים שעשויים להתרחש בעת הפעלת המכונה ותחזוקתה./fo:block
  fo:blockTest/fo:block
/fo:flow
  /fo:page-sequence
/fo:root


test.pdf
Description: Adobe PDF document

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Re: Complex Script, BIDI text supported?

2011-03-09 Thread Matthias Reischenbacher

Ok, thanks a lot for your help!
Matthias


Glenn Adams-2 wrote:
 
 It appears the problem is due to a bug related to the use of
 block-container, which I will look into. However, if you remove
 block-container, and put the writing-mode and (default) font-family on
 fo:page-sequence, it should produce correct results. See attached for what
 I'm getting (using the current GITHUB repo) with a modified FO.
 
 I would advise you use the GIT repository for now, because it is kept up
 to
 date with my working copy. I submit a patch irregularly for integration
 into
 the SVN Temp_ComplexScripts branch.
 
 G.
 
 On Wed, Mar 9, 2011 at 12:21 PM, Matthias Reischenbacher 
 matthias8...@gmx.at wrote:
 

 Glenn,

 here it goes:
 Fo file:  http://old.nabble.com/file/p31109566/hebrew_test.xml
 hebrew_test.xml
 PDF file:  http://old.nabble.com/file/p31109566/hebrew_test.pdf
 hebrew_test.pdf

 Should I try building your code on git hub? I've never used git therefore
 I
 first went with the apache SVN branch.

 Thanks  Regards,
 Matthias


 Glenn Adams-2 wrote:
 
  Matthias,
 
  Thanks for the report. Could you send me the FO input file and PDF
 output
  file? I am actively testing and fixing the Bidi and Script support,
 with
  real-time updates occurring at git://github.com/skynavga/fop.git.
 
  Regards,
  Glenn
 
  On Wed, Mar 9, 2011 at 11:28 AM, Matthias Reischenbacher 
  matthias8...@gmx.at wrote:
 
 
  Glenn,
 
  I tried your work today of the complex script branch. I managed to
  generate
  a PDF file with Hebrew text using Arial Unicode MS font and
 writing-mode
  set
  to rl-tb. The Hebrew text is displayed fine but english characters are
  also
  mirrored. Do I have to set an additional xsl-fo attribute in order to
  correctly display english characters or is the BIDI text algorithm not
  yet
  implemented?
 
  Thanks for your help,
  Matthias Reischenbacher
  --
  View this message in context:
 
 http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109094.html
  Sent from the FOP - Users mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
  For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 
 
 
 

 --
 View this message in context:
 http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109566.html
 Sent from the FOP - Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


 
 ?xml version=1.0 encoding=UTF-8?
 fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
   fo:layout-master-set
 fo:simple-page-master master-name=simple page-height=5in
 page-width=5in
   fo:region-body/
 /fo:simple-page-master
   /fo:layout-master-set
   fo:page-sequence master-reference=simple writing-mode=rl-tb
 font-family=Arial Unicode MS
 fo:flow flow-name=xsl-region-body
   fo:blockחוברת הוראות בטיחות זו מתמקדת בכמה מהמצבים העקרוניים
 שעשויים להתרחש בעת הפעלת המכונה ותחזוקתה./fo:block
   fo:blockTest/fo:block
 /fo:flow
   /fo:page-sequence
 /fo:root
 
  
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 

-- 
View this message in context: 
http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31110436.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: Font Weight

2011-03-09 Thread Marquart, Joshua D
The process that we have to take user-generated input and end up with a
G4 TIFF file.

 

The current process is like this:

 

1 - We've got a front-end system that generates HTML from XSLT with a
flag for input purposes (input form fields are generated), or output
style.

2 - Generated html is passed through a transformer with html_to_fo.xsl
applied to create XSL-FO data.

3a - Today, we take the resulting XSL-FO data and use FOP to generate a
PostScript file, which is sent to a legacy third party library that
transforms the PostScript into a beautiful near-identical G4 TIFF.

 

For technical reasons, we have to stop using the third party library
which is both EOL and creates issues (the library does not ignore a
console shutdown signal and kills the service).

 

3b - Tomorrow, I'd like to just take the resulting XSL-FO data and
generate the G4 TIFF files using FOP (hence my TIFF-focused Buzilla
contributions 49695, 49696 and 50657) .

 

At the moment, I'm just straight generating the TIFF from the XSL-FO
data.  It mostly looks like the source, but for some reason the lesser
fonts are a lot lighter.

 

It's my understating that Fop is output-only when it comes to
PostScript, correct?

 

For comparison purposes, I'm generating the PostScript and Tiff files as
flat files.  

Then I 

1 - compare them side-by-side on the screen

2 - throw them both at a printer (and make sure the Tiff is sent through
PhotoShop and not shrunk to fit).

 

The printouts line up physically, but the font for any 10pt in the Tiff
is much lighter (likely due to aliasing) than that produced with the
PostScript, or even that produced by a Tiff that has undergone the
process described in 3a above.

 

With the Oddly comment quoted below, apparently the PostScript
deferred to any,normal,400 and any,normal,700 when confronted with
Arial,normal,400, which is not a big deal because my eventual goal is
removing the PostScript.

 

-Josh

 

From: Eric Douglas [mailto:edoug...@blockhouse.com] 
Sent: Wednesday, March 09, 2011 2:18 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Font Weight

 

1. If it's actually printing the wrong font that's a different issue.
We'd have to see your font code for that.  That would be everything in
the font tags in the xconf file if you're using one, or your font
loading method if you're using embedded code, plus the text in the fo
which references the font triplet values.

2. What do you mean by lightness?  Are you using the PSRenderer and/or
TIFFRenderer to send output directly to a printer, to the same printer,
back to back?  Are you somehow using both renderers to generate image
files to compare, or comparing something printed to something on the
screen?  Did you use the PSRenderer to send output directly to a printer
and the TIFFRenderer to create an image file then send that image file
to the printer?  It sounds like we need more details on what you're
trying to do.  It sounds like you may be comparing apples to oranges.

 

 



From: Marquart, Joshua D [mailto:joshua.marqu...@firstdata.com] 
Sent: Wednesday, March 09, 2011 2:07 PM
To: Glenn Adams
Cc: fop-users@xmlgraphics.apache.org
Subject: RE: Font Weight

I was just doing research on this topic, came back here to supplement my
message with info, and saw you already beat me to it.

 

Helpful method: getFontInfo().dumpAllTripletsToSystemOut()

 

So... yes, I do not have fonts installed for font weights of 300, 500,
etc. and that would account for resolving to 400/700.

 

The problem I'm seeing is when generating a PostScript and a Tiff from
the same xsl-fo file.

The text generated in the Tiff (for the 400 weight) appears much lighter
than identical text in the PostScript and is likely due to using the
Java2DRenderer vs. the PsRenderer.

 

Oddly, when I set the font to Arial in the xsl-fo:

- the font in the resulting PostScript appears Times Roman

- the font in the resulting Tiff is identical to the font used in the
Tiff when Helvetica was specified.

 

Other than hunting down, installing and registering a weight 500 or so
font for Helvetica or Arial (where might I find one?  No idea.), are
there other options that might I employ to lessen the lightness of the
400-weight ?

 

Thanks,

 

-Josh

 

From: Glenn Adams [mailto:gl...@skynav.com] 
Sent: Wednesday, March 09, 2011 12:02 PM
To: Marquart, Joshua D
Cc: fop-users@xmlgraphics.apache.org
Subject: Re: Font Weight

 

Josh,

 

What you have not said yet is whether you actually have (on your system)
a font with the desired weight or not. Specifically, do you actually
have installed multiple font instances with the distinct weights you
wish to reference? If you do not, then it doesn't do much good to
discuss referring to them.

 

On the other hand, if you do have distinct faces with weights 300, 500,
600, 800, 900, etc., installed, then it is merely a matter of ensuring
that the reference in your FO file correctly maps to the associated font

Re: Complex Script, BIDI text supported?

2011-03-09 Thread Glenn Adams
I have a fix for the block-container issue as well, which I will commit
shortly to my GIT repo. The problem was that earlier (pre complex script)
code apparently assumed that right-to-left writing mode was handled by
mirroring the CTM around the y axis, so it was setting the CTM incorrectly
for the viewport area generated by block-container. In fact there is no
relationship between WM and reference orientation (and thus CTM on viewport
area).

I'll let you know when I've made the commit.

G.

On Wed, Mar 9, 2011 at 2:10 PM, Matthias Reischenbacher matthias8...@gmx.at
 wrote:


 Ok, thanks a lot for your help!
 Matthias


 Glenn Adams-2 wrote:
 
  It appears the problem is due to a bug related to the use of
  block-container, which I will look into. However, if you remove
  block-container, and put the writing-mode and (default) font-family on
  fo:page-sequence, it should produce correct results. See attached for
 what
  I'm getting (using the current GITHUB repo) with a modified FO.
 
  I would advise you use the GIT repository for now, because it is kept up
  to
  date with my working copy. I submit a patch irregularly for integration
  into
  the SVN Temp_ComplexScripts branch.
 
  G.
 
  On Wed, Mar 9, 2011 at 12:21 PM, Matthias Reischenbacher 
  matthias8...@gmx.at wrote:
 
 
  Glenn,
 
  here it goes:
  Fo file:  http://old.nabble.com/file/p31109566/hebrew_test.xml
  hebrew_test.xml
  PDF file:  http://old.nabble.com/file/p31109566/hebrew_test.pdf
  hebrew_test.pdf
 
  Should I try building your code on git hub? I've never used git
 therefore
  I
  first went with the apache SVN branch.
 
  Thanks  Regards,
  Matthias
 
 
  Glenn Adams-2 wrote:
  
   Matthias,
  
   Thanks for the report. Could you send me the FO input file and PDF
  output
   file? I am actively testing and fixing the Bidi and Script support,
  with
   real-time updates occurring at git://github.com/skynavga/fop.git.
  
   Regards,
   Glenn
  
   On Wed, Mar 9, 2011 at 11:28 AM, Matthias Reischenbacher 
   matthias8...@gmx.at wrote:
  
  
   Glenn,
  
   I tried your work today of the complex script branch. I managed to
   generate
   a PDF file with Hebrew text using Arial Unicode MS font and
  writing-mode
   set
   to rl-tb. The Hebrew text is displayed fine but english characters
 are
   also
   mirrored. Do I have to set an additional xsl-fo attribute in order to
   correctly display english characters or is the BIDI text algorithm
 not
   yet
   implemented?
  
   Thanks for your help,
   Matthias Reischenbacher
   --
   View this message in context:
  
 
 http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109094.html
   Sent from the FOP - Users mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
   For additional commands, e-mail:
 fop-users-h...@xmlgraphics.apache.org
  
  
  
  
 
  --
  View this message in context:
 
 http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109566.html
  Sent from the FOP - Users mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
  For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 
 
 
  ?xml version=1.0 encoding=UTF-8?
  fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
fo:layout-master-set
  fo:simple-page-master master-name=simple page-height=5in
  page-width=5in
fo:region-body/
  /fo:simple-page-master
/fo:layout-master-set
fo:page-sequence master-reference=simple writing-mode=rl-tb
  font-family=Arial Unicode MS
  fo:flow flow-name=xsl-region-body
fo:blockחוברת הוראות בטיחות זו מתמקדת בכמה מהמצבים העקרוניים
  שעשויים להתרחש בעת הפעלת המכונה ותחזוקתה./fo:block
fo:blockTest/fo:block
  /fo:flow
/fo:page-sequence
  /fo:root
 
 
 
  -
  To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
  For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 

 --
 View this message in context:
 http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31110436.html
 Sent from the FOP - Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org