List Info

Thread: Stop PDF Summary...




Stop PDF Summary...
user name
2007-02-08 08:08:56
How do I turn off the summary that's being created above my
table of contents in each of the page-level PDFs?  It
appears to be generated by the PDF Outline XSLT in common
skins
(srcdocumentationskinscommonxsltfopdfoutline.xsl), but
I'm not positive.  

I've been away from Forrest for a while and some other
people have been maintaining the site; somewhere over the
last year this summary started to generate, but I have no
idea what they did to turn it on.

Thanks,
Greg

Re: Stop PDF Summary...
country flaguser name
United Kingdom
2007-02-09 14:44:20
greg.vacocox.net wrote:
> How do I turn off the summary that's being created
above my table of contents in each of the page-level PDFs? 
It appears to be generated by the PDF Outline XSLT in common
skins
(srcdocumentationskinscommonxsltfopdfoutline.xsl), but
I'm not positive.  

You are correct in that pdfoutline.xsl generates the
outline. This is 
called from the root document-2-fo.xsl.

Currently there is no configuration option for removing this
outline. 
Adding one in is an easy job, just look at the way
skinconf.xml values 
are used elsewhere in document-2-fo.xsl. Of course, you
could create 
your own skin and provide your own XSL that does not call
the outline. 
But providing a patch to make it configurable would be well
recieved here.

Ross

Re: Stop PDF Summary...
country flaguser name
Spain
2007-02-10 05:41:58
On Fri, 2007-02-09 at 20:44 +0000, Ross Gardler wrote:
> greg.vacocox.net wrote:
> > How do I turn off the summary that's being created
above my table of contents in each of the page-level PDFs? 
It appears to be generated by the PDF Outline XSLT in common
skins
(srcdocumentationskinscommonxsltfopdfoutline.xsl), but
I'm not positive.  
> 
> You are correct in that pdfoutline.xsl generates the
outline. This is 
> called from the root document-2-fo.xsl.
> 
> Currently there is no configuration option for removing
this outline. 
> Adding one in is an easy job, just look at the way
skinconf.xml values 
> are used elsewhere in document-2-fo.xsl. Of course, you
could create 
> your own skin and provide your own XSL that does not
call the outline. 
> But providing a patch to make it configurable would be
well recieved here.
> 

In the dispatcher there are a couple of fo contract that you
can edit.
This allows you to have different pdf outlines for your
project on a
structurer base.

https://svn.apache.org/repos/asf/forrest/trunk/whiteboard/
plugins/org.apache.forrest.themes.core/themes/common/fo/


...but the dispatcher still is in the whiteboard so we do
not yet
recommend the usage in production. However I am using it in
a couple
projects with great success.

salu2
-- 
Thorsten Scherler                                
thorsten.at.apache.org
Open Source Java & XML                consulting,
training and solutions


Re: Stop PDF Summary...
user name
2007-06-17 14:44:07
On Fr, 2007-02-09 at 20:44 +0000, Ross Gardler wrote:
> greg.vacocox.net wrote:
> > How do I turn off the summary that's being created
above my table of
> > contents in each of the page-level PDFs?  It
appears to be generated
> > by the PDF Outline XSLT in common skins
(srcdocumentationskins
> > commonxsltfopdfoutline.xsl), but I'm not
positive.  
> 
> You are correct in that pdfoutline.xsl generates the
outline. This is 
> called from the root document-2-fo.xsl.
> 
> Currently there is no configuration option for removing
this outline. 
> Adding one in is an easy job, just look at the way
skinconf.xml values 
> are used elsewhere in document-2-fo.xsl. Of course, you
could create 
> your own skin and provide your own XSL that does not
call the outline. 
> But providing a patch to make it configurable would be
well recieved here.

I also wanted to turn off the TOC, so I patched the 0.8
main/webapp/skins/common/xslt/fo/document-to-fo.xsl - see
attachement. I
don't know where "forrest seed" takes the
skinconf.xml from, so I didn't
patch anything related to that. Here's what I added to my
project's
skinconf.xml:
    ...
    <!--
      Disable the generation of the table of content on the
first page
      of the PDF. By default the TOC is generated.
    -->
    <disable-toc>true</disable-toc>
  </pdf>

There's one problem with the patch: if <disable-toc>
is not set in
skinconf.xml, then the TOC is disabled nevertheless. I'm not
sure why;
what is the xsl:variable "disable-toc" set to in
that case?

If <disable-toc> is present, then it works as
expected: only "true"
disables the TOC, any other string generates the TOC.

-- 
Bye, Patrick Ohly
--  
Patrick.Ohlygmx.de
http://www.estamos.de/

  
Re: Stop PDF Summary...
user name
2007-06-17 16:36:28
Patrick Ohly wrote:
> On Fr, 2007-02-09 at 20:44 +0000, Ross Gardler wrote:

>> Currently there is no configuration option for
removing this outline. 
>> Adding one in is an easy job, just look at the way
skinconf.xml values 
>> are used elsewhere in document-2-fo.xsl. Of course,
you could create 
>> your own skin and provide your own XSL that does
not call the outline. 
>> But providing a patch to make it configurable would
be well recieved here.
> 
> I also wanted to turn off the TOC, so I patched the
0.8
> main/webapp/skins/common/xslt/fo/document-to-fo.xsl -
see attachement.

Thank you for the contribution. Patches are easier to track
when they 
are applied to Jira issues [1]. Create new issues when
necessary and 
please indicate grant of license.

Brian

[1]
http://forrest.
apache.org/issues.html

Re: Stop PDF Summary...
user name
2007-06-18 03:09:45
On 17/06/07, Patrick Ohly <patrick.ohlygmx.de> wrote:
> On Fr, 2007-02-09 at 20:44 +0000, Ross Gardler wrote:
> > greg.vacocox.net wrote:
> > > How do I turn off the summary that's being
created above my table of
> > > contents in each of the page-level PDFs?  It
appears to be generated
> > > by the PDF Outline XSLT in common skins
(srcdocumentationskins
> > > commonxsltfopdfoutline.xsl), but I'm not
positive.
> >
> > You are correct in that pdfoutline.xsl generates
the outline. This is
> > called from the root document-2-fo.xsl.
> >
> > Currently there is no configuration option for
removing this outline.
> > Adding one in is an easy job, just look at the way
skinconf.xml values
> > are used elsewhere in document-2-fo.xsl. Of
course, you could create
> > your own skin and provide your own XSL that does
not call the outline.
> > But providing a patch to make it configurable
would be well recieved here.
>
> I also wanted to turn off the TOC, so I patched the
0.8
> main/webapp/skins/common/xslt/fo/document-to-fo.xsl -
see attachement. I
> don't know where "forrest seed" takes the
skinconf.xml from, so I didn't
> patch anything related to that. Here's what I added to
my project's
> skinconf.xml:
>     ...
>     <!--
>       Disable the generation of the table of content on
the first page
>       of the PDF. By default the TOC is generated.
>     -->
>     <disable-toc>true</disable-toc>
>   </pdf>
>
> There's one problem with the patch: if
<disable-toc> is not set in
> skinconf.xml, then the TOC is disabled nevertheless.
I'm not sure why;
> what is the xsl:variable "disable-toc" set to
in that case?
>
> If <disable-toc> is present, then it works as
expected: only "true"
> disables the TOC, any other string generates the TOC.

Thank you very much for your contribution, this is how
Forrest will
grow and survive, but it also means your upgrade path in the
future
will be greatly simplified.

Can you please submit patches via our issue tracker [1]. You
need to
be loggged in to create an issue (see top right of screen).
Things
tend to get lost in the mailing list whereas in the issue
tracker we
get nags to remind us to apply patches.

With respect to your question, if disable-toc is not present
in the
skinconf.xml file is it not set and so your test against it
will
always resolve to true:

<xsl:if test="$disable-toc != 'true' and
$toc-max-depth > 0">

The way around this is to add the disable-toc parameter to
the default skinconf.

Ross



[1] http://issue
s.apache.org/jira/browse/FOR

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )