You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by André Malo <nd...@perlig.de> on 2003/05/09 00:10:44 UTC

stuck with PDF creation

Docs-folks,

PDF creation (for print and big ones like the CHM files) is an outstanding
issue, which I hoped to solve with the fop processor. After a lot of tests
and trials I think the results are not sufficient for us at the current
state of the software.

The processor supports just a small subset of the XSL-FO recommendation;
some of the missing things are just annonying and require manual workarounds
(e.g. no auto table layout), some things are not possible (handling orphans,
widows etc). Font handling seems also not sufficient to me.
(And I believe it would not be able to create a big PDF file, because of
"out of memory" or "burning CPU").

I'd suggest we take the other alternative, that was already proposed by
Joshua (?): tex. I'm not familiar with tex (just started to learn ;-), but
IIRC here are some people who are. If some of you could create a concept how
to represent our docs in tex (or latex macros), it would be fine. I can
easily contribute some XSLT, so that we can automate the way from xml to
pdftex.

That's the current state. Comments, opinions, suggestions etc are, of
course, desired.

nd
-- 
print "Just Another Perl Hacker";

# André Malo, <http://pub.perlig.de/> #

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: stuck with PDF creation

Posted by André Malo <nd...@perlig.de>.
* Jacek Prucia wrote:

> FOP has opinion of a "decent xml:fo engine". A lot of projects rely on it's
> capabilities (including DocBook XML). This is because from programmer
> perspective it allows (at least in theory) for simple and clean transition.
> Anyway, there's no point in using software that doesn't meet expectations,
> just because "it has cool concepts". Lets just fill some bug reports before we
> actually abandon the idea.

These are all known issues. No need to bother the fop folks with it. They
are currently redesigning and rewriting the whole software in order to
achieve a better (i.e. full) support of xsl-fo. We can easily try it again
later (but probably we won't, since we have a working system then).

It's a pitty, yes.

>> I'd suggest we take the other alternative, that was already proposed by
>> Joshua (?): tex. I'm not familiar with tex (just started to learn ;-), but
>> IIRC here are some people who are. If some of you could create a concept how
>> to represent our docs in tex (or latex macros), it would be fine. I can
>> easily contribute some XSLT, so that we can automate the way from xml to
>> pdftex.
> 
> LaTeX/TeX for document creation is sort of a cannon against fly.

Hehe, maybe. But it's known to work.

> It's big,
> pretty tricky to configure (even with texconfig) and takes a bit to learn.

Just downloaded the Miktex-package for win (took some days over ISDN :).

> On
> the other hand it's just the right tool for the job. You can achieve just
> about any possible efect you could imagine. So if majority of people will go
> for TeX/LaTeX I'll try to help as much as my free time permits.

Thanks.

nd
-- 
$_=q?tvc!uif)%*|#Bopuifs!A`#~tvc!Xibu)%*|qsjou#Kvtu!A`#~tvc!KBQI!)*|~
tvc!ifmm)%*|#Qfsm!A`#~tvc!jt)%*|(Ibdlfs(~  # What the hell is JAPH? ;
@_=split/\s\s+#/;$_=(join''=>map{chr(ord(  #             André Malo ;
$_)-1)}split//=>$_[0]).$_[1];s s.*s$_see;  #  http://www.perlig.de/ ;

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: stuck with PDF creation

Posted by Jacek Prucia <ja...@acn.waw.pl>.
On Fri, 9 May 2003 00:10:44 +0200
André Malo <nd...@perlig.de> wrote:

[...]
> PDF creation (for print and big ones like the CHM files) is an outstanding
> issue, which I hoped to solve with the fop processor. After a lot of tests
> and trials I think the results are not sufficient for us at the current
> state of the software.

Doh! That sucks...
 
> The processor supports just a small subset of the XSL-FO recommendation;
> some of the missing things are just annonying and require manual workarounds
> (e.g. no auto table layout), some things are not possible (handling orphans,
> widows etc). Font handling seems also not sufficient to me.
> (And I believe it would not be able to create a big PDF file, because of
> "out of memory" or "burning CPU").

FOP has opinion of a "decent xml:fo engine". A lot of projects rely on it's
capabilities (including DocBook XML). This is because from programmer
perspective it allows (at least in theory) for simple and clean transition.
Anyway, there's no point in using software that doesn't meet expectations,
just because "it has cool concepts". Lets just fill some bug reports before we
actually abandon the idea.

> I'd suggest we take the other alternative, that was already proposed by
> Joshua (?): tex. I'm not familiar with tex (just started to learn ;-), but
> IIRC here are some people who are. If some of you could create a concept how
> to represent our docs in tex (or latex macros), it would be fine. I can
> easily contribute some XSLT, so that we can automate the way from xml to
> pdftex.

LaTeX/TeX for document creation is sort of a cannon against fly. It's big,
pretty tricky to configure (even with texconfig) and takes a bit to learn. On
the other hand it's just the right tool for the job. You can achieve just
about any possible efect you could imagine. So if majority of people will go
for TeX/LaTeX I'll try to help as much as my free time permits.

regards,
Jacek Prucia


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: stuck with PDF creation

Posted by Joshua Slive <jo...@slive.ca>.

Ok.  I'll take a first stab at some xsl to convert to latex.  If anyone
else wants to do it, let me know so that we don't overlap.

Joshua.

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: stuck with PDF creation

Posted by Joshua Slive <jo...@slive.ca>.
On Sat, 10 May 2003, André Malo wrote:
> We would need at first someone, who can dissect the DTDs (or sample xml
> files) and make an outline, how this can be written in (La)Tex. Once we have
> this, xslt for autogeneration is easily written and we get a base to work on
> and develop further (fonts, encodings etc.). Though I'm not able to create
> such samples (currently ;-), I can imagine that it's not so difficult (looks
> like latex provides similar semantics).

That's not a big problem.  Anyone with basic latex (including me) could do
that.  Most things map quite cleanly.

Joshua.

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: stuck with PDF creation

Posted by André Malo <nd...@perlig.de>.
* Jacek Prucia wrote:

>> Although I don't think it was me who originally suggested this, I do have
>> considerable experience with latex.  It produces great-looking results,
>> but is a little bit of a bear to configure and use correctly.  (Packages
>> like MikTeX make this a little easier.)
> 
> Which reminds me, there are different TeX/LaTeX distributions out there. We
> schould make a doc about what set of packages we require for successful build.
> Or as an option we could stick to some distro (like TeX Live or something).

I think, it will be similar to the CHM creation. The source files will be
autogenerated. The "compiler" must be installed. To achieve the same results
on different systems, we probably should put the fonts and other special
files (hyph-patterns?) into CVS (build-tools).

>> The other thing that would
>> concern me is the multi-lingual issue.  I have no experience in using
>> latex with languages other than english.  I know it handles latin-based
>> languages well, but I have no idea about others.
> 
> Basically it boils down to 2 things:
> 
> 1. You make sure TeX/Latex understands your encoding, typically with:
> 
> \usepackage[X]{inputenc}
> 
> where X is a proper option (e.g I use option 'LATIN2' for inputenc). You might
> want to use:
> 
> \usepackage[X]{fontenc}
> 
> with some magic option, if LaTeX/TeX won't complain about character encodings,
> but PDF output seems to be scrambled.

I'm sure we can solve that problem. (Effectively, CHM creation and even PDF
via fop suffers from similar problems).

> 2. You make sure that hyphenation for your language is selected. You do
> this by hand (HYPHEN -> pdftex in texconfig), or by using special package that
> does this for you at runtime. For example polish package for LaTeX does this,
> not sure about other languages
> 
> Side Note:
> 
> Unless there's a TeX/LaTeX guru among us (I believe such a man is called
> TeXpert), we schould find one (local TUG might be a good source), and ask for
> help. For most people some things work out of the box, and because of that
> they don't mess much with software internals. We just might have to...

That is not the worst idea. Although I think, we should look first in our
circles here :)

We would need at first someone, who can dissect the DTDs (or sample xml
files) and make an outline, how this can be written in (La)Tex. Once we have
this, xslt for autogeneration is easily written and we get a base to work on
and develop further (fonts, encodings etc.). Though I'm not able to create
such samples (currently ;-), I can imagine that it's not so difficult (looks
like latex provides similar semantics).

nd
-- 
my @japh = (sub{q~Just~},sub{q~Another~},sub{q~Perl~},sub{q~Hacker~});
my $japh = q[sub japh { }]; print join       #########################
 [ $japh =~ /{(.)}/] -> [0] => map $_ -> ()  #            André Malo #
=> @japh;                                    # http://www.perlig.de/ #

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: stuck with PDF creation

Posted by Jacek Prucia <ja...@acn.waw.pl>.
On Thu, 8 May 2003 21:00:36 -0400 (Eastern Daylight Time)
Joshua Slive <jo...@slive.ca> wrote:

[...]
> Although I don't think it was me who originally suggested this, I do have
> considerable experience with latex.  It produces great-looking results,
> but is a little bit of a bear to configure and use correctly.  (Packages
> like MikTeX make this a little easier.)

Which reminds me, there are different TeX/LaTeX distributions out there. We
schould make a doc about what set of packages we require for successful build.
Or as an option we could stick to some distro (like TeX Live or something).

> The overall idea is very similar to html or docbook, but there are some
> substantial differences that could make transformation complicated.  In
> particular, tables are really nasty in latex.

...and powerful :)

> The other thing that would
> concern me is the multi-lingual issue.  I have no experience in using
> latex with languages other than english.  I know it handles latin-based
> languages well, but I have no idea about others.

Basically it boils down to 2 things:

1. You make sure TeX/Latex understands your encoding, typically with:

\usepackage[X]{inputenc}

where X is a proper option (e.g I use option 'LATIN2' for inputenc). You might
want to use:

\usepackage[X]{fontenc}

with some magic option, if LaTeX/TeX won't complain about character encodings,
but PDF output seems to be scrambled.

2. You make sure that hyphenation for your language is selected. You do
this by hand (HYPHEN -> pdftex in texconfig), or by using special package that
does this for you at runtime. For example polish package for LaTeX does this,
not sure about other languages

Side Note:

Unless there's a TeX/LaTeX guru among us (I believe such a man is called
TeXpert), we schould find one (local TUG might be a good source), and ask for
help. For most people some things work out of the box, and because of that
they don't mess much with software internals. We just might have to...

regards,
Jacek Prucia


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: stuck with PDF creation

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 9 May 2003, André Malo wrote:
> The processor supports just a small subset of the XSL-FO recommendation;
> some of the missing things are just annonying and require manual workarounds
> (e.g. no auto table layout), some things are not possible (handling orphans,
> widows etc). Font handling seems also not sufficient to me.
> (And I believe it would not be able to create a big PDF file, because of
> "out of memory" or "burning CPU").

One possibility would be to create a pdf for each page and then aggregate.

>
> I'd suggest we take the other alternative, that was already proposed by
> Joshua (?): tex. I'm not familiar with tex (just started to learn ;-), but
> IIRC here are some people who are. If some of you could create a concept how
> to represent our docs in tex (or latex macros), it would be fine. I can
> easily contribute some XSLT, so that we can automate the way from xml to
> pdftex.

Although I don't think it was me who originally suggested this, I do have
considerable experience with latex.  It produces great-looking results,
but is a little bit of a bear to configure and use correctly.  (Packages
like MikTeX make this a little easier.)

The overall idea is very similar to html or docbook, but there are some
substantial differences that could make transformation complicated.  In
particular, tables are really nasty in latex.  The other thing that would
concern me is the multi-lingual issue.  I have no experience in using
latex with languages other than english.  I know it handles latin-based
languages well, but I have no idea about others.

A quick google search shows a couple people have worked on this problem:
xhtml to latex:
http://www.cis.ohio-state.edu/~gurari/docs/mml-00/xhm2latex.html
docbook to latex:
http://db2latex.sourceforge.net/

If we decide to go this way, I will provide what help I can.

Joshua.

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org