You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Manuel Strehl <ma...@stud.uni-regensburg.de> on 2005/11/16 14:29:15 UTC

Compiled FOP versions

Hi there.

I didn't find any post in the last months concerning my point. If it was 
discussed earlier, I'd like to apologize.

My Problem: My provider doesn't offer a Java VM on the servers. So I'm 
looking for another possibility to run FOP. I found out (at Wikipedia) 
that you can compile Java written programs to machine code (e.g., with 
the Gnu CJ). Well, actually I'm still using Windows and I have no clue 
where to compile it for Linux.

I am looking for:
- already compiled versions of FOP (for Linux; SuSe, I think)
- any tips or hints how I could use FOP on a server without having a 
Java VM.

Does anyone have an idea?

Best Regards
Manuel

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


Re: FOP font width for custom font (Arial)

Posted by Manuel Mall <mm...@arcus.com.au>.
On Fri, 18 Nov 2005 09:40 am, The Web Maestro wrote:
> On Nov 17, 2005, at 5:22 PM, Manuel Mall wrote
>
> > I just did my own test and the results are intriguing (using the
> > latest version of FOP). There is certainly a big difference between
> > Word and FOP.
> >
> > It appears that FOP ignores the font-weight="bold". That is the
> > text is rendered identically for font-weight="bold" and
> > font-weight="normal".
>
> This may be due to a lack of a font-triplet for BOLD, although you're
> using Arial (aren't you?) so IMO it should Just Work(tm)
>
You were correct - my font registration was missing the bold triplet.

But adding this didn't fix the problem. Still can't get bold output.

Have to run and will investigate further later today.

BTW, our XML Renderer doesn't register user fonts which makes it hard to 
check the area tree. I have fixed it in my copy of FOP and may commit 
that later.

Moved this thread to fop-dev as well.

> > Secondly it appears to be rendered in nearly the same size as Word
> > renders at font size 14.
> >
> > This is when the font is embedded into the PDF.
>
> This may be the problem. It may not be embedding the 'bold' version
> of the font for some reason.
>
> > Converting my FO example to HTML/CSS both IE and FireFox render it
> > identically and consistent with Word.
> >
> > This seems to need some further investigation...
>
> Regards,
>
> Web Maestro Clay

Manuel

Re: FOP font width for custom font (Arial)

Posted by Manuel Mall <mm...@arcus.com.au>.
On Sat, 19 Nov 2005 08:28 pm, Mike Trotman wrote:
> There is one other thing to check for - that your printed PDF is not
> being 'scaled to fit', use draft quality etc.
>  - because I forgot once and wasted a lot of time.

Mike, thank you!!!

That was exactly the problem why my PDFs printed in an apparent bigger 
font size than the Word sample.

As far as I can tell the print rendering of both Word and FOP trunk 
generated PDFs is identical when using the same font, font size, 
weight, no kerning, no justification, NO PRINT SCALING, etc....

Manuel
>
> Mike
>
> The Web Maestro wrote:
> > On Nov 17, 2005, at 5:22 PM, Manuel Mall wrote
> >
> >> I just did my own test and the results are intriguing (using the
> >> latest version of FOP). There is certainly a big difference
> >> between Word and FOP.
> >>
> >> It appears that FOP ignores the font-weight="bold". That is the
> >> text is rendered identically for font-weight="bold" and
> >> font-weight="normal".
> >
> > This may be due to a lack of a font-triplet for BOLD, although
> > you're using Arial (aren't you?) so IMO it should Just Work(tm)
> >
> >> Secondly it appears to be rendered in nearly the same size as Word
> >> renders at font size 14.
> >>
> >> This is when the font is embedded into the PDF.
> >
> > This may be the problem. It may not be embedding the 'bold' version
> > of the font for some reason.
> >
> >> Converting my FO example to HTML/CSS both IE and FireFox render it
> >> identically and consistent with Word.
> >>
> >> This seems to need some further investigation...
> >
> > Regards,
> >
> > Web Maestro Clay

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


Re: FOP font width for custom font (Arial)

Posted by Mike Trotman <mi...@datalucid.com>.
There is one other thing to check for - that your printed PDF is not 
being 'scaled to fit', use draft quality etc.
 - because I forgot once and wasted a lot of time.

Mike

The Web Maestro wrote:

> On Nov 17, 2005, at 5:22 PM, Manuel Mall wrote
>
>> I just did my own test and the results are intriguing (using the latest
>> version of FOP). There is certainly a big difference between Word and
>> FOP.
>>
>> It appears that FOP ignores the font-weight="bold". That is the text is
>> rendered identically for font-weight="bold" and font-weight="normal".
>
>
> This may be due to a lack of a font-triplet for BOLD, although you're 
> using Arial (aren't you?) so IMO it should Just Work(tm)
>
>> Secondly it appears to be rendered in nearly the same size as Word
>> renders at font size 14.
>>
>> This is when the font is embedded into the PDF.
>
>
> This may be the problem. It may not be embedding the 'bold' version of 
> the font for some reason.
>
>> Converting my FO example to HTML/CSS both IE and FireFox render it
>> identically and consistent with Word.
>>
>> This seems to need some further investigation...
>
>
> Regards,
>
> Web Maestro Clay


-- 
Datalucid Limited


Message Scanned by ClamAV on datalucid.com


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


Re: FOP font width for custom font (Arial)

Posted by The Web Maestro <th...@gmail.com>.
On Nov 17, 2005, at 5:22 PM, Manuel Mall wrote
> I just did my own test and the results are intriguing (using the latest
> version of FOP). There is certainly a big difference between Word and
> FOP.
>
> It appears that FOP ignores the font-weight="bold". That is the text is
> rendered identically for font-weight="bold" and font-weight="normal".

This may be due to a lack of a font-triplet for BOLD, although you're 
using Arial (aren't you?) so IMO it should Just Work(tm)

> Secondly it appears to be rendered in nearly the same size as Word
> renders at font size 14.
>
> This is when the font is embedded into the PDF.

This may be the problem. It may not be embedding the 'bold' version of 
the font for some reason.

> Converting my FO example to HTML/CSS both IE and FireFox render it
> identically and consistent with Word.
>
> This seems to need some further investigation...

Regards,

Web Maestro Clay
-- 
<th...@gmail.com> - <http://homepage.mac.com/webmaestro/>
My religion is simple. My religion is kindness.
- HH The 14th Dalai Lama of Tibet


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


Re: FOP font width for custom font (Arial)

Posted by Manuel Mall <mm...@arcus.com.au>.
On Fri, 18 Nov 2005 08:38 am, The Web Maestro wrote:
> On Nov 17, 2005, at 4:17 PM, Prakash R wrote:
> > Thanks Manuel. I understand the difference now. Let me rephrase my
> > question.
> >
> > I'm using Arial font in FOP and when I render it to PDF with a
> > specific font type and size (bold, size 12 pt) and I do the same
> > with Microsoft word and print both. It is exact same line and same
> > font etc. The Microsoft version of it is longer (when I overlay and
> > compare) than the FOP version even though both are using the same
> > fonts? Somehow the spacing of the characters/words seems to be
> > different in FOP than with word.
> >
> > Is this a known issue? Can this be corrected? This is causing some
> > inconsistency between 2 formats namely word and PDF. Please help.
> >
> > Thank you.
> > Prakash
>
> There are a few questions you might be able to answer and/or ask:
> - Does the Microsoft version use text-align="justify"?
> - Are the Character & Paragraph settings identical
>    (MS Word has are a lot of options: condensed/expanded, char width,
> line-spacing, etc.)
> - Are they generated on the same platform?
> - Do the characters look identical, just the spacing is different?
>
> Expecting FOP output to look identical to Microsoft is (IMO) asking a
> lot. For most uses, people aren't going to be comparing the two, so
> it isn't a problem. I suspect that if you really need the output to
> look identical, you might need to either start submitting patches to
> fix the problem or paying someone to submit patches. Either of which
> would be welcome (IMO)!
>

I just did my own test and the results are intriguing (using the latest 
version of FOP). There is certainly a big difference between Word and 
FOP.

It appears that FOP ignores the font-weight="bold". That is the text is 
rendered identically for font-weight="bold" and font-weight="normal".

Secondly it appears to be rendered in nearly the same size as Word 
renders at font size 14.

This is when the font is embedded into the PDF.

Converting my FO example to HTML/CSS both IE and FireFox render it 
identically and consistent with Word.

This seems to need some further investigation...

> Regards,
>
> Web Maestro Clay

Manuel

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


Re: FOP font width for custom font (Arial)

Posted by The Web Maestro <th...@gmail.com>.
On Nov 17, 2005, at 4:17 PM, Prakash R wrote:
> Thanks Manuel. I understand the difference now. Let me rephrase my 
> question.
>
> I'm using Arial font in FOP and when I render it to PDF with a 
> specific font type and size (bold, size 12 pt) and I do the same with 
> Microsoft word and print both. It is exact same line and same font 
> etc. The Microsoft version of it is longer (when I overlay and 
> compare) than the FOP version even though both are using the same 
> fonts? Somehow the spacing of the characters/words seems to be 
> different in FOP than with word.
>
> Is this a known issue? Can this be corrected? This is causing some 
> inconsistency between 2 formats namely word and PDF. Please help.
>
> Thank you.
> Prakash

There are a few questions you might be able to answer and/or ask:
- Does the Microsoft version use text-align="justify"?
- Are the Character & Paragraph settings identical
   (MS Word has are a lot of options: condensed/expanded, char width, 
line-spacing, etc.)
- Are they generated on the same platform?
- Do the characters look identical, just the spacing is different?

Expecting FOP output to look identical to Microsoft is (IMO) asking a 
lot. For most uses, people aren't going to be comparing the two, so it 
isn't a problem. I suspect that if you really need the output to look 
identical, you might need to either start submitting patches to fix the 
problem or paying someone to submit patches. Either of which would be 
welcome (IMO)!

Regards,

Web Maestro Clay
-- 
<th...@gmail.com> - <http://homepage.mac.com/webmaestro/>
My religion is simple. My religion is kindness.
- HH The 14th Dalai Lama of Tibet


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


Re: FOP font width for custom font (Arial)

Posted by Prakash R <ra...@yahoo.com>.
Thanks Manuel. I understand the difference now. Let me
rephrase my question.

I'm using Arial font in FOP and when I render it to
PDF with a specific font type and size (bold, size 12
pt) and I do the same with Microsoft word and print
both. It is exact same line and same font etc. The
Microsoft version of it is longer (when I overlay and
compare) than the FOP version even though both are
using the same fonts? Somehow the spacing of the
characters/words seems to be different in FOP than
with word. 

Is this a known issue? Can this be corrected? This is
causing some inconsistency between 2 formats namely
word and PDF. Please help.

Thank you.
Prakash

--- Manuel Mall <mm...@arcus.com.au> wrote:

> On Fri, 18 Nov 2005 04:46 am, Prakash R wrote:
> > I'm using Arial font with FOP. I installed the
> fonts
> > by following the step to install custom fonts from
> TTF
> > on the FOP website using the TTFReader and adding
> > entries in userconfig.xml.
> >
> > When I generate a PDF which uses the Arial font,
> the
> > width of characters are different for uppercase
> and
> > lowercase. The lowercase being lesser width. Is
> there
> > anyway I can set any property so that the
> lowercase
> > characters are also the same width as the
> uppercase
> > characters?
> >
> Arial is a so called proportional font. Not only
> have lowercase letters 
> different widths to uppercase letters but even
> within the same case 
> letters will have different widths, e.g. i will have
> a different width 
> to m and W is different in width to J.
> 
> If a fixed character width is important to your
> layout you need to use a 
> fixed width (= non proportional) font. For example
> Courier.
> 
> > Thank you.
> > Prakash
> >
> Manuel
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> 
> 


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


Re: FOP font width for custom font (Arial)

Posted by Manuel Mall <mm...@arcus.com.au>.
On Fri, 18 Nov 2005 04:46 am, Prakash R wrote:
> I'm using Arial font with FOP. I installed the fonts
> by following the step to install custom fonts from TTF
> on the FOP website using the TTFReader and adding
> entries in userconfig.xml.
>
> When I generate a PDF which uses the Arial font, the
> width of characters are different for uppercase and
> lowercase. The lowercase being lesser width. Is there
> anyway I can set any property so that the lowercase
> characters are also the same width as the uppercase
> characters?
>
Arial is a so called proportional font. Not only have lowercase letters 
different widths to uppercase letters but even within the same case 
letters will have different widths, e.g. i will have a different width 
to m and W is different in width to J.

If a fixed character width is important to your layout you need to use a 
fixed width (= non proportional) font. For example Courier.

> Thank you.
> Prakash
>
Manuel

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


FOP font width for custom font (Arial)

Posted by Prakash R <ra...@yahoo.com>.
I'm using Arial font with FOP. I installed the fonts
by following the step to install custom fonts from TTF
on the FOP website using the TTFReader and adding
entries in userconfig.xml.

When I generate a PDF which uses the Arial font, the
width of characters are different for uppercase and
lowercase. The lowercase being lesser width. Is there
anyway I can set any property so that the lowercase
characters are also the same width as the uppercase
characters?

Thank you.
Prakash

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


Re: Compiled FOP versions

Posted by Manuel Strehl <ma...@stud.uni-regensburg.de>.
Hi again.

Thanks for the reply.
My provider's got PHP and Perl running. But I only have 200MB of 
webspace and am not allowed to install things that need root rights.
I also looked up the JSE package at sun.com, and the complete pack is 
~150MB. Only the core files still need 100MB. That's a bit rough for 
only wanting to run the 7MB of FOP...

But best thanks anyway.

Manuel

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


Re: Compiled FOP versions

Posted by Glen Mazza <gm...@apache.org>.
Without servlets and JSPs, what will your provider allow you use to 
execute programs on the server--ASP, PHP, or cgi?  A pure HTTP server 
will not be able to activate programs, regardless of what you can 
compile FOP into.  Is the provider using IIS or Apache as the web server?

My thinking, along with Jeremias', is that it would be probably best to 
somehow distribute/install the Java VM with your application.  The JVM 
is, after all, already compiled into an executable that the server can 
run.  I can't see the reason why you would not be allowed to run the JVM 
executable but you would be allowed to run another compiled executable 
instead (what you are trying to do to FOP)--they would both be programs 
running on the server.

Glen

Manuel Strehl wrote:
> Hi there.
> 
> I didn't find any post in the last months concerning my point. If it was 
> discussed earlier, I'd like to apologize.
> 
> My Problem: My provider doesn't offer a Java VM on the servers. So I'm 
> looking for another possibility to run FOP. I found out (at Wikipedia) 
> that you can compile Java written programs to machine code (e.g., with 
> the Gnu CJ). Well, actually I'm still using Windows and I have no clue 
> where to compile it for Linux.
> 
> I am looking for:
> - already compiled versions of FOP (for Linux; SuSe, I think)
> - any tips or hints how I could use FOP on a server without having a 
> Java VM.
> 
> Does anyone have an idea?
> 
> Best Regards
> Manuel
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 

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


Re: Compiled FOP versions

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
You're pretty much out of luck at the moment. It is on my list to make
FOP compile with GCJ/Classpath but so far I've had no time to go after
it. At the moment a JVM is simply required.

What you can try, though, is install a JVM for that machine yourself.
But you have to figure out yourself if you're allowed to do that.

On 16.11.2005 14:29:15 Manuel Strehl wrote:
> Hi there.
> 
> I didn't find any post in the last months concerning my point. If it was 
> discussed earlier, I'd like to apologize.
> 
> My Problem: My provider doesn't offer a Java VM on the servers. So I'm 
> looking for another possibility to run FOP. I found out (at Wikipedia) 
> that you can compile Java written programs to machine code (e.g., with 
> the Gnu CJ). Well, actually I'm still using Windows and I have no clue 
> where to compile it for Linux.
> 
> I am looking for:
> - already compiled versions of FOP (for Linux; SuSe, I think)
> - any tips or hints how I could use FOP on a server without having a 
> Java VM.
> 
> Does anyone have an idea?


Jeremias Maerki


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