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 Clay Leeds <cl...@medata.com> on 2003/08/04 20:38:21 UTC
fox: bookmark extensions problems
I'm having problems getting my Bookmarks to work. I've attempted to
follow the instructions here without success:
http://xml.apache.org/fop/extensions.html
Between the </fo:layout-master-set> and <fo:page-sequence
master-reference="repeating"> section, I've placed:
<fox:outline internal-destination="EOR">
<fox:label>Explanation of Review</fox:label>
<fox:outline internal-destination="ICD9">
<fox:label>ICD-9 Section</fox:label>
</fox:outline>
<fox:outline internal-destination="Details">
<fox:label>Details Section</fox:label>
<fox:outline internal-destination="Totals">
<fox:label>Totals Section</fox:label>
</fox:outline>
</fox:outline>
</fox:outline>
Then later, in my FO, I specify the id="EOR" (or whatever) for the
appropriate fo:block elements. The examples/fo/basic/pdfoutline.fo
works great. In fact, there are also basic-links in that file which
also go to the same place.
I can't see what I'm doing wrong. Am I missing something?
--
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: fox: bookmark extensions problems
Posted by Clay Leeds <cl...@medata.com>.
On Monday, August 4, 2003, at 12:57 PM, J.Pietschmann wrote:
> Clay Leeds wrote:
>>> Clay Leeds wrote:
>>>> I'm having problems getting my Bookmarks to work. I've attempted to
>>>> follow the instructions here without success:
> ...
>> Are you telling me that what's on the web site /extensions.html page
>> is for the re-design (aka HEAD)?
> No, it's for the regular release. I think you'll have to
> detail your problems a bit more. Just as a guess, I believe
> the outermost fox:outline should have a label too.
Thanks. The outermost fox:outline does include fox:label (darn!--FWIW,
that was just the type of help I was hoping would resolve this).
Hmmm... Maybe I'll make a *simple* FO file (instead of the 100+k FO
file I'm currently trying to "improve")... I'll write back if I find
anything...
--
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: fox: bookmark extensions problems
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Clay Leeds wrote:
>> Clay Leeds wrote:
>>> I'm having problems getting my Bookmarks to work. I've attempted to
>>> follow the instructions here without success:
...
> Are you telling me that what's on the web site /extensions.html page is
> for the re-design (aka HEAD)?
No, it's for the regular release. I think you'll have to
detail your problems a bit more. Just as a guess, I believe
the outermost fox:outline should have a label too.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: fox: bookmark extensions problems
Posted by Clay Leeds <cl...@medata.com>.
On Monday, August 4, 2003, at 12:15 PM, J.Pietschmann wrote:
> Clay Leeds wrote:
>> I'm having problems getting my Bookmarks to work. I've attempted to
>> follow the instructions here without success:
>
> The syntax has changed for HEAD. Look at the source.
Are you telling me that what's on the web site /extensions.html page is
for the re-design (aka HEAD)? That's strange, because the pdfoutput.fo
has examples written like this, and they work as described on that
page. I copied those examples, but it doesn't work for me.
BTW, apologies, since I neglected to include the FOP version/platform
fop-0.20.5/WinXP (although I'll also use this on Linux and Mac OS X).
As for "Look at the source." well... hehehe... That doesn't help me
much... It would be like telling an English speaker to figure out what
Dante meant in his Purgatorio (the original pre-Italian version).
--
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: fox: bookmark extensions problems
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Clay Leeds wrote:
> I'm having problems getting my Bookmarks to work. I've attempted to
> follow the instructions here without success:
The syntax has changed for HEAD. Look at the source.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: bookmark extensions problems
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Clay Leeds wrote:
> Is there a way to bookmark the top of a page (above or at the top of
> fo:region-before)? In particular, I'd like my first bookmark to go to
> the top of the first page. I tried assigning a block id to the first
> element in my fo:region-before, but (as I expected) it complained when
> there were multiple instances.
You could try a separate header for the first page, using an
appropriate page-sequence-master, with the same layout but the
added Id.
But I suspect the spec outlaws references to static content.
> Also, is there a way to make all bookmarks default to "expanded"
No, see
http://xml.apache.org/fop/faq.html#pdf-bookmark-display
> I've created a bookmark which contains a "Details" section that spans
> several pages. Unfortunately, clicking the "Details Section" bookmark
> brings me to the top of the *last* page of the Details section (actually
> it brings me to the top of the fo:region-before for the last page of
> Details).
Shrug. This is probably a consequence on how bookmark areas
are generated.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: bookmark extensions problems
Posted by Bernd Brandstetter <bb...@freenet.de>.
On Tuesday 05 August 2003 20:18, Clay Leeds wrote:
> Also, is there a way to make all bookmarks default to "expanded" I've
> tried the following, which, although not "expanded" gives better
> results (although "Totals Section" is still hidden):
Hi,
I recently made a patch to fop-0.20.5 which addresses this problem.
I've added a new attribute "initial-state" (expanded|collapsed) to
fox:outline. It defaults to collapsed to be backwards compatible.
I'll create a new bug report in Bugzilla and submit the patch. However,
since there won't be more releases from the Maintenance branch, you'll
have to apply and compile it yourself.
Regards,
Bernd
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: bookmark extensions problems
Posted by Clay Leeds <cl...@medata.com>.
I've got bookmarks working, but there are a couple of lingering,
annoying issues I've discovered...
Is there a way to bookmark the top of a page (above or at the top of
fo:region-before)? In particular, I'd like my first bookmark to go to
the top of the first page. I tried assigning a block id to the first
element in my fo:region-before, but (as I expected) it complained when
there were multiple instances. I also tried putting fo:block inside
fo:page-sequence-master..> but it completely ignored it (I actually
expected it to generate an error). As it is, I place it at the top of
the region-body, but clicking it does not bring you to the top of the
page.
Also, the first Bookmark ("Explanation of Review" in my 1st example
below) does not appear to be an actual bookmark. It is merely a
'container' for the items inside. It highlights in Acrobat--my
preferences for Acrobat indicate it should highlight where I am
dynamically when viewing. However, clicking it brings up the first item
it contains. In the case below, clicking "Explanation of Review" brings
you to the ICD9 Section:
<fox:outline internal-destination="EOR">
<fox:label>Explanation of Review</fox:label>
<fox:outline internal-destination="ICD9">
<fox:label>ICD-9 Section</fox:label>
</fox:outline>
<fox:outline internal-destination="Details">
<fox:label>Details Section</fox:label>
<fox:outline internal-destination="Totals">
<fox:label>Totals Section</fox:label>
</fox:outline>
</fox:outline>
</fox:outline>
NOTE: <fo:block id="EOR"> is at the top of the fo:region-body, so it
may be behaving as it should. However, clicking it again once something
else has been clicked has no effect.
Also, is there a way to make all bookmarks default to "expanded" I've
tried the following, which, although not "expanded" gives better
results (although "Totals Section" is still hidden):
<fox:outline internal-destination="EOR">
<fox:label>Explanation of Review</fox:label>
</fox:outline>
<fox:outline internal-destination="ICD9">
<fox:label>ICD-9 Section</fox:label>
</fox:outline>
<fox:outline internal-destination="Details">
<fox:label>Details Section</fox:label>
<fox:outline internal-destination="Totals">
<fox:label>Totals Section</fox:label>
</fox:outline>
</fox:outline>
Other notes (may be PDF-related or fox: related):
I've created a bookmark which contains a "Details" section that spans
several pages. Unfortunately, clicking the "Details Section" bookmark
brings me to the top of the *last* page of the Details section
(actually it brings me to the top of the fo:region-before for the last
page of Details). I would've assumed this is because Details is
something of a container for "Totals" which is the first item in the
container. However, that's not the case. I've changed it so "Totals
Section" is not indented under Details Section, and it doesn't help (it
still brings me to the top of the region-before of the last "page" of
Details):
<fox:outline internal-destination="EOR">
<fox:label>Explanation of Review</fox:label>
</fox:outline>
<fox:outline internal-destination="ICD9">
<fox:label>ICD-9 Section</fox:label>
</fox:outline>
<fox:outline internal-destination="Details">
<fox:label>Details Section</fox:label>
</fox:outline>
<fox:outline internal-destination="Totals">
<fox:label>Totals Section</fox:label>
</fox:outline>
My solution: insert the following above where the DETAILS template is
called:
<fo:block padding="0pt">
<fo:block id="EOR" padding="0pt" margin="0pt"
font-size="0pt"> </fo:block>
<xsl:apply-templates select="DETAILS"/>
</fo:block>
(previously I'd placed the id="EOR" call inside the containing
<fo:block padding="0pt"> as below)
<fo:block id="EOR" padding="0pt">
<xsl:apply-templates select="DETAILS"/>
</fo:block>
NOTE: I only need to insert an "empty" fo:block when I know it won't
fit on a page. It appears that the bookmark will take you to the *top
of the last page of that section*. At least that's how it works for me.
--
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: bookmark extensions problems
Posted by Clay Leeds <cl...@medata.com>.
On Tuesday, August 5, 2003, at 08:10 AM, Victor Mote wrote:
> Clay Leeds wrote:
>> That is correct. The fox: elements do not appear in the intermediate
>> .fo file I generated with xalan.
>
> That means it is not a FOP question, but an XSLT question instead. If
> you'll
> send me some XML/XSLT snippets offline, I'll help if I can, but I
> can't do
> that on this list.
I suspect you're correct that it was not a FOP question, but here's the
solution to the problem:
I'd written the fox: extension information in an xsl-fo file that was
included in another, and so the fox: portion wasn't called. Moving the
fox: stuff to the file which calls (via xsl:include) the other file
resolved the issue.
I have two versions of my XSL-FO file depending on output method:
xml_med7_default.fo (87,109 bytes)
- all markup to output beautiful documents with PRINT/AWT
- previously had fox: stuff in here, since that's where the fo:block id
calls go
xml_med7_default_pdf.fo (6,390 bytes)
- only page/region margins & extents markup
- <xsl:include href="xml_med7_default.fo"/>
- now includes the fox: stuff
FWIW, here's some background about why I have two files:
I've found that outputting xml_med7_default.fo to AWT (used by -print
and -awt) gives me 20-40% larger region-before & region-after sections.
As a result, when outputting to -pdf, my pages would have an extra
margin of 1-2cm+... So I created a "xml_med7_default_pdf.fo", into
which I <xsl:include href="xml_med7_default.fo"/>. the new file has
only the region-before/-after/-body stuff.
I hope this is helpful to everyone... BTW, is the fox: portion a bug?
;-p
--
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
RE: bookmark extensions problems
Posted by Victor Mote <vi...@outfitr.com>.
Clay Leeds wrote:
> That is correct. The fox: elements do not appear in the intermediate
> .fo file I generated with xalan.
That means it is not a FOP question, but an XSLT question instead. If you'll
send me some XML/XSLT snippets offline, I'll help if I can, but I can't do
that on this list.
Victor Mote
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: bookmark extensions problems
Posted by Clay Leeds <cl...@medata.com>.
Victor,
On Monday, August 4, 2003, at 04:08 PM, Victor Mote wrote:
> Clay Leeds wrote:
>
>> The PDF outline items do *not* appear to show up when I process with
>> xalan.bat. I am using the "binary" download 0.20.5 version. As I
>> mentioned before, the strange thing (at least I think it's strange) is
>> that the example/fo/basic/pdfoutput.fo processes normally and creates
>> bookmarks.
>
> Sorry, I'm even more confused than before. Are you saying that the fox:
> elements do not even appear in the fo file?
>
> Victor Mote
That is correct. The fox: elements do not appear in the intermediate
.fo file I generated with xalan.
> --
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
RE: bookmark extensions problems
Posted by Victor Mote <vi...@outfitr.com>.
Clay Leeds wrote:
> The PDF outline items do *not* appear to show up when I process with
> xalan.bat. I am using the "binary" download 0.20.5 version. As I
> mentioned before, the strange thing (at least I think it's strange) is
> that the example/fo/basic/pdfoutput.fo processes normally and creates
> bookmarks.
Sorry, I'm even more confused than before. Are you saying that the fox:
elements do not even appear in the fo file?
Victor Mote
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: bookmark extensions problems
Posted by Clay Leeds <cl...@medata.com>.
On Monday, August 4, 2003, at 03:33 PM, Victor Mote wrote:
> Clay Leeds wrote:
>
>> I'm having problems getting my Bookmarks to work. I've attempted to
>> follow the instructions here without success:
>
> Do the PDF outline items show up, and the links not work, or do the PDF
> outline items not show up at all?
The PDF outline items do *not* appear to show up when I process with
xalan.bat. I am using the "binary" download 0.20.5 version. As I
mentioned before, the strange thing (at least I think it's strange) is
that the example/fo/basic/pdfoutput.fo processes normally and creates
bookmarks.
--
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
RE: bookmark extensions problems
Posted by Victor Mote <vi...@outfitr.com>.
Clay Leeds wrote:
> I'm having problems getting my Bookmarks to work. I've attempted to
> follow the instructions here without success:
Do the PDF outline items show up, and the links not work, or do the PDF
outline items not show up at all?
Victor Mote
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org