Re: linebreak fop0.94

2007-11-07 Thread Andreas Siepert
Isn't there another way? Like you suggested, I would have to write my fo 
stuff into a single line, otherwise there will be lots of additional 
linefeeds.


Andi

Manuel Mall schrieb:

On Wednesday 07 November 2007 22:03, Andreas Siepert wrote:
  

Hi,

after looking through the mailing list and other Websites I still
could not figure out, how to insert a linebreak within an fo:inline I
tried:
 #8195;
#xA;
#xD;
as well as fo:inline
/fo:inline
I also used the parameter white-space-collapse=false.

Some Infos for my setup:
-FOP 0.94
-XML is converted via XSL to XSL:FO and then to PDF

Can somebody give me another solution?



linefeed-treatment=preserve should do the trick. However the property 
must be specified on the enclosing block level element and not on the 
fo:inline.


Manuel
  

Thanks
Andi



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



  



--
Dipl.-Inf. Andreas Siepert
Entwickler

Bader  Jene Software-Ingenieurbüro GmbH
Schauenburgerstraße 116
24118 Kiel

Fon: + 49.431.5 60 66 41
Fax: + 49.431.5 60 66 44
Web: www.bader-jene.de

Ust-ID Nr: DE249078452
Amtsgericht Kiel, HRB 8298

Geschäftsführer:
Dipl.-Ing. (FH) Thomas Bader
Dipl.-Ing. (FH) Andreas Jene



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



Problem with experimental PDF in PDF from trunk

2007-11-07 Thread Benjamin Wohlwend

Hi,

I was delighted when I read about the experimental PDF-in-PDF support as we
experience a bit of a performance problem with embedding SVG. But
unfortunately, the embedded PDF is not visible. The border around it has the
right dimensions, but the content is not there.

The SVG/PDF which we embed is generated by ReportLab. I don't have access to
a PDF validator, so I'm not really sure if ReportLab generates valid PDF
output (I now that their SVG output is not always perfect, though) Here's an
example:

http://www.piquadrat.ch/pie.pdf

The FO: http://www.piquadrat.ch/fop.xml, and the resulting PDF:
http://www.piquadrat.ch/fo.pdf

FOP is from a SVN checkout I made yesterday. I put fop-pdf-images-1.0.jar
and PDFBox-0.7.4-dev.jar in lib/. When using the command line, no error
messages are displayed.

Kind regards,

Benjamin Wohlwend


-- 
View this message in context: 
http://www.nabble.com/Problem-with-experimental-PDF-in-PDF-from-trunk-tf4764384.html#a13626131
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Re: Automatic font detection and SVGs (or fonts and Courier New)

2007-11-07 Thread RPARREE

Hi,

Problem solved...

I found http://www.nabble.com/forum/ViewPost.jtp?post=13513575framed=y and
saw that this has been fixed in the trunk...I moved to the trunk anyway now
;)

I had to delete the font cache for it to work...

great!



RPARREE wrote:
 
 Hi,
 
  
 
 I am still very happy with the auto font detection. I do however seem to
 have a problem with fonts in SVG. (added as external-graphic with a @src).
 Some fonts seem to work but especially Courier New does not work. The same
 images used to work when I used the font metrics files. 
 
  
 
 Strangely enough I use font-family=Courier on my fo:blocks etc. Courier
 new is in my fonts directory on my machine. (It works, these blocks and
 inlines are in the proper courier format. (I do also have a Courier
 10,12,15
 (VGA res) in my font directory.
 
  
 
 So I guess two questions:
 
 * Is there an issue with fonts in SVG when using auto-detect?#
 * What should I use Courier or Courier new?
 
  
 
 Tx.,
 
  
 
 Raphael
 
 
  
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
View this message in context: 
http://www.nabble.com/Automatic-font-detection-and-SVGs-%28or-fonts-and-Courier-New%29-tf4763977.html#a13629147
Sent from the FOP - Users mailing list archive at Nabble.com.


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



linebreak fop0.94

2007-11-07 Thread Andreas Siepert

Hi,

after looking through the mailing list and other Websites I still could 
not figure out, how to insert a linebreak within an fo:inline

I tried:
#8195;
   #xA;
   #xD;
   as well as fo:inline
/fo:inline
I also used the parameter white-space-collapse=false.

Some Infos for my setup:
-FOP 0.94
-XML is converted via XSL to XSL:FO and then to PDF

Can somebody give me another solution?

Thanks
Andi

--
Dipl.-Inf. Andreas Siepert
Entwickler

Bader  Jene Software-Ingenieurbüro GmbH
Schauenburgerstraße 116
24118 Kiel

Fon: + 49.431.5 60 66 41
Fax: + 49.431.5 60 66 44
Web: www.bader-jene.de

Ust-ID Nr: DE249078452
Amtsgericht Kiel, HRB 8298

Geschäftsführer:
Dipl.-Ing. (FH) Thomas Bader
Dipl.-Ing. (FH) Andreas Jene



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



Re: linebreak fop0.94

2007-11-07 Thread Andreas Siepert
Hi Andreas,

thanks for your help.

The empty-fo:block variant doesn't work my way. I already considered it but
it does not only create a new line but also inserts an empty line. I rather
want to make some kind of HTML br replacement: one br - newline, n
brs in a row - n-1 empty lines.
I will try your first suggestion - it sounds pretty good if the processor
output can be manipulated that way.

Thanks again
Andi

On Wed, 7 Nov 2007 18:08:53 +0100, Andreas L Delmelle
[EMAIL PROTECTED] wrote:
 On Nov 7, 2007, at 18:02, Andreas L Delmelle wrote:
 
 On Nov 7, 2007, at 16:20, Andreas Siepert wrote:

 Hi

 Isn't there another way?

 Sorry, I don't think so...

 The only way to get a guaranteed linebreak is either:
 * start a new fo:block
 * specify linefeed-treatment='preserve' on the containing block,
 and use linefeed characters
 
 Apologies, since I overlooked one possibility (but I do not really
 consider that to be good practice): insert empty fo:blocks at the
 locations where you want the linebreaks to appear.
 fo:block is a valid child for an fo:inline... Cool, no? :-)
 
 So, this should work:
 
 fo:inlinefirst linefo:block /second line/fo:inline
 
 
 Cheers
 
 Andreas
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



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



Re: Problem with Times New Roman and fop 0.94

2007-11-07 Thread juanita

Since metrics-url must be removed, what happens when the fonts in pdf must be
in reference and
not embedded.Then the  will complain that nor embed-url neither metrics-url
attribute
exists.


Jeremias Maerki-2 wrote:
 
 Since you're on FOP 0.94, please try removing the metrics-url attributes
 from your  elements. The font metrics files shouldn't be necessary
 anymore for almost all cases since 0.94.
 
 Jeremias Maerki
 
 
 
 On 07.11.2007 11:20:58 juanita wrote:
 
 I am using fop 0.94 and I want to generate a pdf with Times New Roman. 
 In my configuration file I have:
 
font-triplet name=times style=normal weight=normal/
 
 
font-triplet name=times style=normal weight=bold/
 
 
 font-triplet name=times style=italic weight=normal/
 
 
 font-triplet name=times style=italic weight=bold/
 
 The metrics files (xml) are taken from the fop trunk and the ttf files
 are
 the ones I use to have for
 fop.
 However I am getting the following exception:
 java.lang.RuntimeException: Malformed width in metric file: null
 at org.apache.fop.fonts.LazyFont.load(LazyFont.java:130)
 at org.apache.fop.fonts.LazyFont.getAscender(LazyFont.java:20
 at org.apache.fop.fonts.Font.getAscender(Font.java:83)
 I think that this is caused when fop is trying to read the 'wdt'
 attribute
 from the xml file which indeed
 does not exist. This attribute existed in the previous metric xml file I
 had(for fop 0.93) however when I am using that xml file I have the
 following
 exception:
 java.lang.RuntimeException: Missing metrics-version attribute - please
 regenerate the font metrics file with a more recent version of FOP
 at org.apache.fop.fonts.LazyFont.load(LazyFont.java:130)
 
 Any clues?
 
 Thank you...
 -- 
 View this message in context:
 http://www.nabble.com/Problem-with-Times-New-Roman-and-fop-0.94-tf4763781.html#a13624523
 Sent from the FOP - Users mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-Times-New-Roman-and-fop-0.94-tf4763781.html#a13626362
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Re: linebreak fop0.94

2007-11-07 Thread Andreas L Delmelle

On Nov 7, 2007, at 21:27, Andreas Siepert wrote:

The empty-fo:block variant doesn't work my way. I already  
considered it but

it does not only create a new line but also inserts an empty line.


Really? Hadn't checked that, actually... If so, I'm not sure if that  
is correct behaviour, so we might have to look into that. :/



I rather
want to make some kind of HTML br replacement: one br -  
newline, n

brs in a row - n-1 empty lines.
I will try your first suggestion - it sounds pretty good if the  
processor

output can be manipulated that way.


Yep, it's definitely the way to go if what you need is what is  
described above.
The issue with empty fo:blocks is also one of performance, BTW. They  
only generate additional overhead, while the layout-algorithm has a  
ball with preserved linefeeds.


It might take some caution, though, since generally, unexpected  
linefeeds tend to pop up that survive the XSL transform. Be mindful  
about linefeeds coming in from XML source like:


someNode
someText
/someNode

The leading and trailing linefeeds will both be presented to FOP, and  
might thus cause mayhem if you use linefeed-treatment=preserve. In  
case you're not sure where the value of the input node comes from,  
use normalize-space() in the XSLT to strip those off.


For all else, I certainly do hope that you do not need hyphenation in  
this case, because currently this combination leads to all sorts of  
strangeness, like duplicated pieces of paragraphs...



Cheers

Andreas


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



Re: Problem with Times New Roman and fop 0.94

2007-11-07 Thread Jeremias Maerki
That particular case is currently not supported, I'm afraid.

Jeremias Maerki



On 07.11.2007 13:35:46 juanita wrote:
 
 Since metrics-url must be removed, what happens when the fonts in pdf must be
 in reference and
 not embedded.Then the  will complain that nor embed-url neither metrics-url
 attribute
 exists.
 
 
 Jeremias Maerki-2 wrote:
  
  Since you're on FOP 0.94, please try removing the metrics-url attributes
  from your  elements. The font metrics files shouldn't be necessary
  anymore for almost all cases since 0.94.
  
  Jeremias Maerki
  
  
  
  On 07.11.2007 11:20:58 juanita wrote:
  
  I am using fop 0.94 and I want to generate a pdf with Times New Roman. 
  In my configuration file I have:
  
 font-triplet name=times style=normal weight=normal/
  
  
 font-triplet name=times style=normal weight=bold/
  
  
  font-triplet name=times style=italic weight=normal/
  
  
  font-triplet name=times style=italic weight=bold/
  
  The metrics files (xml) are taken from the fop trunk and the ttf files
  are
  the ones I use to have for
  fop.
  However I am getting the following exception:
  java.lang.RuntimeException: Malformed width in metric file: null
  at org.apache.fop.fonts.LazyFont.load(LazyFont.java:130)
  at org.apache.fop.fonts.LazyFont.getAscender(LazyFont.java:20
  at org.apache.fop.fonts.Font.getAscender(Font.java:83)
  I think that this is caused when fop is trying to read the 'wdt'
  attribute
  from the xml file which indeed
  does not exist. This attribute existed in the previous metric xml file I
  had(for fop 0.93) however when I am using that xml file I have the
  following
  exception:
  java.lang.RuntimeException: Missing metrics-version attribute - please
  regenerate the font metrics file with a more recent version of FOP
  at org.apache.fop.fonts.LazyFont.load(LazyFont.java:130)
  
  Any clues?
  
  Thank you...
  -- 
  View this message in context:
  http://www.nabble.com/Problem-with-Times-New-Roman-and-fop-0.94-tf4763781.html#a13624523
  Sent from the FOP - Users mailing list archive at Nabble.com.
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
 -- 
 View this message in context: 
 http://www.nabble.com/Problem-with-Times-New-Roman-and-fop-0.94-tf4763781.html#a13626362
 Sent from the FOP - Users mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


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



Re: linebreak fop0.94

2007-11-07 Thread Manuel Mall
On Thursday 08 November 2007 05:49, Andreas L Delmelle wrote:
 On Nov 7, 2007, at 21:27, Andreas Siepert wrote:
  The empty-fo:block variant doesn't work my way. I already
  considered it but
  it does not only create a new line but also inserts an empty line.

 Really? Hadn't checked that, actually... If so, I'm not sure if that
 is correct behaviour, so we might have to look into that. :/

We actually have a testcase for this in our regression test suite 
(inline_block_nested_1.xml) and after using it to produce a PDF it 
looks fine and has no empty lines inserted.

The technique of replacing br / with fo:block / is also used in an 
html to fo stylesheet I am using (I think it came from Antennahouse 
originally).

Manuel
snip/

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



Re: Default font FOP and Adobe

2007-11-07 Thread juanita

Yes I do have control over the font family.
However I wanted to know what is happening if
the font family label stays empty.So it is replaced by default by Times New
Roman.
So when in the console I see something like Verdana not found, substituing
with
any, 200, ...) this any is Times New Roman?
However I can't find anywhere in the Apache FOP page that the default font
is
Times New Roman...



Jeremias Maerki-2 wrote:
 
 No, FOP uses Times. It has been so since I joined the project. Shrug.
 
 But you have control over the font-family property, right?
 
 Jeremias Maerki
 
 
 
 On 07.11.2007 15:50:22 juanita wrote:
 
 I have an .xsl file that creates a *.fo file and then there is the
 generation
 of pdf.
 When I use a name for the font that does not exist in the configuration
 file, the pdf is created with default font Times New Roman. Isn't
 Helvetica
 the default font for FOP?
 I am using fop 0.94.
 
 Thank you...
 -- 
 View this message in context:
 http://www.nabble.com/Default-font-FOP-and-Adobe-tf4765156.html#a13628554
 Sent from the FOP - Users mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Default-font-FOP-and-Adobe-tf4765156.html#a13642496
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Re: Problem with experimental PDF in PDF from trunk

2007-11-07 Thread Jeremias Maerki
Interesting. Seems to be a bug which didn't occur on my side because I'm
usually testing with PDF compression disabled. I'll look into it. Thanks.

As a temporary work-around, you can make sure the following is in your
config file:
[..]
renderer mime=application/pdf
  filterList
valuenull/value
  /filterList
[..]


Jeremias Maerki



On 07.11.2007 13:31:53 Benjamin Wohlwend wrote:
 
 Hi,
 
 I was delighted when I read about the experimental PDF-in-PDF support as we
 experience a bit of a performance problem with embedding SVG. But
 unfortunately, the embedded PDF is not visible. The border around it has the
 right dimensions, but the content is not there.
 
 The SVG/PDF which we embed is generated by ReportLab. I don't have access to
 a PDF validator, so I'm not really sure if ReportLab generates valid PDF
 output (I now that their SVG output is not always perfect, though) Here's an
 example:
 
 http://www.piquadrat.ch/pie.pdf
 
 The FO: http://www.piquadrat.ch/fop.xml, and the resulting PDF:
 http://www.piquadrat.ch/fo.pdf
 
 FOP is from a SVN checkout I made yesterday. I put fop-pdf-images-1.0.jar
 and PDFBox-0.7.4-dev.jar in lib/. When using the command line, no error
 messages are displayed.
 
 Kind regards,
 
 Benjamin Wohlwend
 
 
 -- 
 View this message in context: 
 http://www.nabble.com/Problem-with-experimental-PDF-in-PDF-from-trunk-tf4764384.html#a13626131
 Sent from the FOP - Users mailing list archive at Nabble.com.


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



Re: Default font FOP and Adobe

2007-11-07 Thread Jeremias Maerki
I'm sorry Juanita, but we can probably spend the whole day documenting
and someone might still find some little detail missing. Everyone can
easily find out what font is used for any by looking at the fonts list
in Acrobat Reader's Document Properties dialog.

I'm going to add this missing piece to our documentation right now. BTW,
any is not mapped to Times New Roman, but to Times Roman. I don't
know if there's a difference between the two. Probably not, nowadays,
since Adobe maps Times Roman to Times New Roman in recent versions
of Acrobat Reader. They also map Helvetica to Arial and there
definitely is a difference there.

Jeremias Maerki



On 08.11.2007 08:36:12 juanita wrote:
 
 Yes I do have control over the font family.
 However I wanted to know what is happening if
 the font family label stays empty.So it is replaced by default by Times New
 Roman.
 So when in the console I see something like Verdana not found, substituing
 with
 any, 200, ...) this any is Times New Roman?
 However I can't find anywhere in the Apache FOP page that the default font
 is
 Times New Roman...
 
 
 
 Jeremias Maerki-2 wrote:
  
  No, FOP uses Times. It has been so since I joined the project. Shrug.
  
  But you have control over the font-family property, right?
  
  Jeremias Maerki
  
  
  
  On 07.11.2007 15:50:22 juanita wrote:
  
  I have an .xsl file that creates a *.fo file and then there is the
  generation
  of pdf.
  When I use a name for the font that does not exist in the configuration
  file, the pdf is created with default font Times New Roman. Isn't
  Helvetica
  the default font for FOP?
  I am using fop 0.94.


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



Re: setting a pdf as the background of another pdf

2007-11-07 Thread Jeremias Maerki
This is certainly the right place to ask this question. It's not about
XSL-FO in general, but about FOP.

I suggest you look at the following Wiki page and go on from there:
http://wiki.apache.org/xmlgraphics-fop/HowTo/EmbeddedPdf

Caveat: The feature is still somewhat experimental.

The other option is to simply create the form content with FOP and then
use a PDF post-processor [1] to stamp the form and the content together.
That's how it's been done up until now.

[1] http://xmlgraphics.apache.org/fop/resources.html#products-pdf

Jeremias Maerki



On 07.11.2007 20:03:38 Saladin Sharif wrote:
 Hi,
 I have a general question.  I have a pdf file for an application form. 
 I don't know how this pdf was originally created, but it was given to
 us by the client.
 
 Anyway, I would like to use XML-FO (with FOP) to set this pdf
 application form as the background for my new pdf document, and then
 overlay ontop that background with text.  This way I can overlay the
 fields of the application form with data (i.e. populating the
 application form with data).  I would like to know if this is something
 that is even possible with XML-FO (using FOP).
 
 I was not sure if this way the right place to ask this question, or
 whether I should ask this question in the XML-FO mailing list.
 
 Please let me know.
 
 Thanks,
 -Saladin


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