FOP Version v0_20_5 linkproblem

2009-09-04 Thread JPee

Hi,

I'm working with FOP embedded in a CMS for generating PDFs. The version of
FOP is v0_20_5. The problem is the following one:

If I use a basic link and the external-destination is linked to a pdf, all /
(slashes) turn into \ (backslashes). Most readers correct this failure, but
not adobe reader which most people use. I tested this problem in the newest
version of fop and there it works fine.

Is there a workaround for v0_20_5?

example:

fo:basic-link
external-destination=http://.../.../test.pdf;test.pdffo:basic-link

in pdf the link is http:\\...\...\test.pdf, but only if the file ends with
.pdf

Greetings


-- 
View this message in context: 
http://www.nabble.com/FOP-Version-v0_20_5-linkproblem-tp25290507p25290507.html
Sent from the FOP - Dev mailing list archive at Nabble.com.



Re: Implementing Change bars

2009-09-04 Thread Vincent Hennebert
Hi Stephan,

Stephan Thesing wrote:
 Hello,
 
snip/
 My idea is now along the following lines:
  - Remember for each element during parsing the change bars it is
 influenced by.
  - After layout, go over all areas produced by those influenced elements
 and add the areas for the change bars (thus, only an area with
 proper
  border attributes).
 It all depends on how this is implemented, therefore I’m awaiting your
 patch. But that seems to imply a two-pass process that I’m not sure we
 want. Imagine a change-bar that starts on page 2 and ends on page 50. We
 don’t want to wait that the areas for page 50 have been created to add
 the change-bar areas on page 2.
 
 I don't pretend to really understand the layout in FOP yet, but my basic
 understanding was:
  - As soon as a page-sequence has been parsed, it is layouted, the 
  layout managers are created.
  - When a page has been filled (approx), little adaptations are done, 
  the area tree for that page is complete and can be rendered.

This doesn’t exactly happen like this, although that doesn’t change much
of what you would have to do.

FOP implements a total-fit algorithm. Basically, instead of creating one
page at a time, it optimises the layout over the whole page sequence. It
does so by playing with elastic spaces between blocks in order to
homogenise pages. Suppose that a big unbreakable block doesn’t fit on
page 10 and must be deferred to page 11. By slightly increasing vertical
spaces between earlier blocks, content can progressively be shifted to
the following page until page 10 is reached, and fill up that latter
instead of leaving it half empty.

So the actual layout of page 1 may actually not be known until the very
end of the page sequence has been reached.

I must actually refine my concern above: at the moment, a two-pass
process would degrade performance only if a change-bar encompasses
several page sequences, which I guess would rarely happen. Still, if
later on we want to implement a lower quality, lower resource demanding
layout process, we wouldn’t want such a two-pass process.

snip/

 BTW, as far as I understand FOP, the area tree is never used for RTF output, 
 but rather the event mechanism is used, that notifies the RTF backend for 
 start/end of fo elements, which are then directly transfered into RTF.
 Thus, the change bar stuff tied to the areas will not work for RTF and
 extra code has to be added to the RTF backend to handle the change bars.

If you don’t need change bars for RTF output, then don’t worry about it.
If that were depending only on me the RTF backend would have been
deprecated long time ago :-) It doesn’t fit well in the rest of FOP and
anyway is no longer so much useful now that ODF, among others, is
around.


Vincent


Re: TTF Fonts in FOP v0_20_5

2009-09-04 Thread J.Pietschmann

On 04.09.2009 10:55, JPee wrote:

I'm working with FOP embedded in a CMS and using verdana (referenced as
verdanattf.tff) and georgia (referenced as georgia.ttf), also with bold and
italic fonts of it.

When I generate a PDF and copy a word, everything i get is 
 and not the correct letters, searching in the document is because of
that problem also not possible.


FOP 0.20.5 doesn't generate CID maps which are necessary to copy or
search text associated with user defined fonts.


Is there a way how it works correctly with
true type fonts?


The PDF generated by FOP 0.20.5 allows copying and searching
only for texts rendered with built-in PDF fonts. Either you'll
have to use Times or Courier, or upgrade to FOP 0.95.

J.Pietschmann


Re: FOP Version v0_20_5 linkproblem

2009-09-04 Thread J.Pietschmann

On 04.09.2009 10:49, JPee wrote:

If I use a basic link and the external-destination is linked to a pdf, all /
(slashes) turn into \ (backslashes).


As a wild guess: if you generate the PDF with the backslashes on
Windows, try on a UNIX/LINUX system and check whether the problem
goes away.
Other than that, you'll either have to upgrade FOP to a more recent
version or hack the URL resolver from 0.20.5 yourself.

J.Pietschmann


Re: Implementing Change bars

2009-09-04 Thread Andreas Delmelle

On 03 Sep 2009, at 22:07, Stephan Thesing wrote:

Hi Stephan,

snip /

Seems reasonable, although... validateChildNode() is more meant to
take care of very specific cases, mentioned in the definition of the
content model. Now I'm thinking: a change-bar-* is a neutral item  
that

is basically allowed anywhere, except as a child/descendant of a very
limited set of FOs that cannot appear as descendants of an fo:flow or
fo:static-content.
The requirement of a flow/static-content ancestor is specific to the
change-bar-* nodes, not to their parent/ancestor, so I'm not entirely
sure whether FObj is the right place to enforce that rule...


Yes, that rule is enforced in the ChangeBar class' startNode(),  
which is the base class for the ChangeBarBegin and ChangeBarEnd  
classes.


But the validateChildNode() has to accept change-bar-begin and  
change-bar-end children for all nodes in order to allow them to  
occur at the allowed places.


For the answer to this, see the pointer I gave about  
'isNeutralItem()'. That's basically ALL that really needs to be  
modified in FObj AFAICT.



Regards,

Andreas Delmelle
mailto:andreas.delmelle.AT.telenet.be
jabber: mandr...@jabber.org
skype: adlm0608

---