[jira] [Resolved] (FOP-3081) Text duplicated when using linefeed-treatment=preserve and changing page width

2022-07-12 Thread Simon Steiner (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-3081?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Steiner resolved FOP-3081.

Fix Version/s: trunk
   Resolution: Fixed

http://svn.apache.org/viewvc?view=revision=1902677

> Text duplicated when using linefeed-treatment=preserve and changing page width
> --
>
> Key: FOP-3081
> URL: https://issues.apache.org/jira/browse/FOP-3081
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Fix For: trunk
>
> Attachments: test.fo
>
>
> fop test.fo out.pdf
> Text should not be duplicated in the output



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (FOP-3081) Text duplicated when using linefeed-treatment=preserve and changing page width

2022-07-12 Thread Simon Steiner (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-3081?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Steiner updated FOP-3081:
---
Attachment: test.fo

> Text duplicated when using linefeed-treatment=preserve and changing page width
> --
>
> Key: FOP-3081
> URL: https://issues.apache.org/jira/browse/FOP-3081
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: test.fo
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (FOP-3081) Text duplicated when using linefeed-treatment=preserve and changing page width

2022-07-12 Thread Simon Steiner (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-3081?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Steiner updated FOP-3081:
---
Description: 
fop test.fo out.pdf
Text should not be duplicated in the output

> Text duplicated when using linefeed-treatment=preserve and changing page width
> --
>
> Key: FOP-3081
> URL: https://issues.apache.org/jira/browse/FOP-3081
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: test.fo
>
>
> fop test.fo out.pdf
> Text should not be duplicated in the output



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (FOP-3081) Text duplicated when using linefeed-treatment=preserve and changing page width

2022-07-12 Thread Simon Steiner (Jira)
Simon Steiner created FOP-3081:
--

 Summary: Text duplicated when using linefeed-treatment=preserve 
and changing page width
 Key: FOP-3081
 URL: https://issues.apache.org/jira/browse/FOP-3081
 Project: FOP
  Issue Type: Bug
Reporter: Simon Steiner
Assignee: Simon Steiner
 Attachments: test.fo





--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (FOP-2809) Excessive wrap when having linefeed-treatment="preserve" and inlines

2019-09-06 Thread simon steiner (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16924248#comment-16924248
 ] 

simon steiner commented on FOP-2809:


Can you attach as a patch file

> Excessive wrap when having linefeed-treatment="preserve" and inlines
> 
>
> Key: FOP-2809
> URL: https://issues.apache.org/jira/browse/FOP-2809
> Project: FOP
>  Issue Type: Bug
>  Components: layout/line
>Affects Versions: 2.3
>Reporter: Dan Caprioara
>Priority: Major
>
> The text should be presented on two lines (they are separated by line breaks 
> - not by wrapping - is plenty of space in the page):
> {quote}
> line1 line1 line1 line1 LINE1
> line2
> {quote}
> Instead it is  on three lines.
> {quote}
> line1 line1 line1 line1
> LINE1
> line2
> {quote}
> The snippet:
> {code:xml}
> 
> http://www.w3.org/1999/XSL/Format;
>   xmlns:fox="http://xmlgraphics.apache.org/fop/extensions; xml:lang="en-us">
>   
>  page-height="11in">
>   
> 
>   
>force-page-count="no-force"
> id="last-page-sequence" line-height-shift-adjustment="disregard-shifts">
> 
> 
>wrap-option="wrap">line1 line1 line1 line1 
> LINE1
> line2
> 
> 
>   
> 
> {code}
> If you add more words to the example, you will see that it always add a break 
> before the second-to-last word.
> If you remove the inline: {{line2}} and leave just the 
> {{line2}} text, this corrects the problem.  The same if you remove the tags 
> of any inline.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Commented] (FOP-2809) Excessive wrap when having linefeed-treatment="preserve" and inlines

2019-09-06 Thread Dan Caprioara (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16924243#comment-16924243
 ] 

Dan Caprioara commented on FOP-2809:


Possible fix in the LineLayoutManager. Add these methods:
{code:java}
  /**
 * 
 * The collectInlineKnuthElements method creates some paragraphs based on 
the assumption that 
 * the child layout managers (that can be one ore more TextLayoutManager or 
InlineLayoutManagers)
 * are returning a KnuthSequence for each line. By line is understood a 
sequence ending in a new line. 
 * In the Knuth terms, a forced line break is represented by an auxiliary 
box with a negative infinite penalty .
 * 
 * 
 * The assuption proved false when a block like:
 * 
 *  inline>
 *  alpha inline>beta/inline>
 *  inline>gamma/inline>
 *  /inline>
 * 
 * was broken into:
 * 
 *  inline>
 *  alpha 
 *  inline>beta/inline>
 *  inline>gamma/inline>
 *  /inline>
 * 
 * because the LineLayoutManager had a single child 
 * InlineLayoutManager, that concatenated all the subtree LM boxes into a 
single sequence.
 * The {@link LineLayoutManager#collectInlineKnuthElements(LayoutContext)} 
is looking for line breaks only at the end of sequences, and
 * misses the newlines from the middle of the preformatted text.
 * 
 * The solution is to pre-process each of the sequences and split it if 
it is the case.
 *   
 * 
 * 
 * @param inlineElements The list of sequences, each representing a line. 
Each of the sequence will be analysed and split into multiple ones if a hard 
line break is detected.
 * @return The list with the sequences.
 */
private List supplementalBreakOfSequences(List 
inlineElements) {
  List result = new ArrayList<>();
  
  for (KnuthSequence sequence : inlineElements) {
// The 'line' that may need to be split in multiple lines.
if (sequence.isInlineSequence()) {
  while(sequence.size() > 0) {
int idx = findNextLineBreakIndex(0, sequence);
if (idx != -1 && idx != sequence.size() - 1) {
  result.add(new InlineKnuthSequence(sequence.subList(0, idx + 1)));
  sequence = new InlineKnuthSequence(sequence.subList(idx + 1, 
sequence.size()));
} else {
  result.add(sequence);
  break;
}
  }
} else {
  result.add(sequence);  
}  
  }
  
  return result;
}

private int findNextLineBreakIndex(int start, KnuthSequence sequence) {
  int idx = -1;
  boolean previousIsBox = false;
  for (int i = 0; i < sequence.size() - 1; i++) {
ListElement current = (ListElement) sequence.get(i);
if (previousIsBox && current.isForcedBreak()) {
  idx = i;
  break;
}

previousIsBox = current.isBox()
&& !((KnuthElement) current).isAuxiliary()
&& ((KnuthElement) current).getWidth() != 0;
  }
  return idx;
}

{code}

Invoke the first one in the 
org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthElements(LayoutContext)
 method after the inlineElements checking:

{code:java}
  InlineLevelLayoutManager curLM;
while ((curLM = (InlineLevelLayoutManager) getChildLM()) != null) {
List inlineElements = curLM.getNextKnuthElements(inlineLC, 
effectiveAlignment);
if (inlineElements == null || inlineElements.size() == 0) {
/* curLM.getNextKnuthElements() returned null or an empty list;
 * this can happen if there is nothing more to layout,
 * so just iterate once more to see if there are other children 
*/
continue;
}

// PATCH START
inlineElements = supplementalBreakOfSequences(inlineElements);
    // PATCH END
{code}

> Excessive wrap when having linefeed-treatment="preserve" and inlines
> 
>
> Key: FOP-2809
> URL: https://issues.apache.org/jira/browse/FOP-2809
> Project: FOP
>  Issue Type: Bug
>  Components: layout/line
>Affects Versions: 2.3
>Reporter: Dan Caprioara
>Priority: Major
>
> The text should be presented on two lines (they are separated by line breaks 
> - not by wrapping - is plenty of space in the page):
> {quote}
> line1 line1 line1 line1 LINE1
> line2
> {quote}
> Instead it is  on three lines.
> {quote}
> line1 line1 line1 line1
> LINE1
> line2
> {quote}
> The snippet:
> {code:xml}
> 
> http://www.w3.

[jira] [Updated] (FOP-2809) Excessive wrap when having linefeed-treatment="preserve" and inlines

2018-08-06 Thread Dan Caprioara (JIRA)


 [ 
https://issues.apache.org/jira/browse/FOP-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Caprioara updated FOP-2809:
---
Description: 
The text should be presented on two lines (they are separated by line breaks - 
not by wrapping - is plenty of space in the page):
{quote}
line1 line1 line1 line1 LINE1
line2
{quote}
Instead it is  on three lines.
{quote}
line1 line1 line1 line1
LINE1
line2
{quote}

The snippet:

{code:xml}

http://www.w3.org/1999/XSL/Format;
  xmlns:fox="http://xmlgraphics.apache.org/fop/extensions; xml:lang="en-us">
  

  

  
  


  line1 line1 line1 line1 
LINE1
line2


  

{code}

If you add more words to the example, you will see that it always add a break 
before the second-to-last word.
If you remove the inline: {{line2}} and leave just the 
{{line2}} text, this corrects the problem.  The same if you remove the tags of 
any inline.

  was:
The text should be presented on two lines:
{quote}
line1 line1 line1 line1 LINE1
line2
{quote}
But is like this, on three lines.
{quote}
line1 line1 line1 line1
LINE1
line2
{quote}

The snippet:

{code:xml}

http://www.w3.org/1999/XSL/Format;
  xmlns:fox="http://xmlgraphics.apache.org/fop/extensions; xml:lang="en-us">
  

  

  
  


  line1 line1 line1 line1 
LINE1
line2


  

{code}

If you add words to the example, you will see that it always add a break before 
the second-to-last word.
If you remove the inline: {{line2}} and leave just the 
{{line2}} text, this corrects the problem.  The same if you remove the tags of 
any inline.


> Excessive wrap when having linefeed-treatment="preserve" and inlines
> 
>
> Key: FOP-2809
> URL: https://issues.apache.org/jira/browse/FOP-2809
> Project: FOP
>  Issue Type: Bug
>  Components: layout/line
>Affects Versions: 2.3
>Reporter: Dan Caprioara
>Priority: Major
>
> The text should be presented on two lines (they are separated by line breaks 
> - not by wrapping - is plenty of space in the page):
> {quote}
> line1 line1 line1 line1 LINE1
> line2
> {quote}
> Instead it is  on three lines.
> {quote}
> line1 line1 line1 line1
> LINE1
> line2
> {quote}
> The snippet:
> {code:xml}
> 
> http://www.w3.org/1999/XSL/Format;
>   xmlns:fox="http://xmlgraphics.apache.org/fop/extensions; xml:lang="en-us">
>   
>  page-height="11in">
>   
> 
>   
>force-page-count="no-force"
> id="last-page-sequence" line-height-shift-adjustment="disregard-shifts">
> 
> 
>wrap-option="wrap">line1 line1 line1 line1 
> LINE1
> line2
> 
> 
>   
> 
> {code}
> If you add more words to the example, you will see that it always add a break 
> before the second-to-last word.
> If you remove the inline: {{line2}} and leave just the 
> {{line2}} text, this corrects the problem.  The same if you remove the tags 
> of any inline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (FOP-2809) Excessive wrap when having linefeed-treatment="preserve" and inlines

2018-08-06 Thread Dan Caprioara (JIRA)
Dan Caprioara created FOP-2809:
--

 Summary: Excessive wrap when having linefeed-treatment="preserve" 
and inlines
 Key: FOP-2809
 URL: https://issues.apache.org/jira/browse/FOP-2809
 Project: FOP
  Issue Type: Bug
  Components: layout/line
Affects Versions: 2.3
Reporter: Dan Caprioara


The text should be presented on two lines:
{quote}
line1 line1 line1 line1 LINE1
line2
{quote}
But is like this, on three lines.
{quote}
line1 line1 line1 line1
LINE1
line2
{quote}

The snippet:

{code:xml}

http://www.w3.org/1999/XSL/Format;
  xmlns:fox="http://xmlgraphics.apache.org/fop/extensions; xml:lang="en-us">
  

  

  
  


  line1 line1 line1 line1 
LINE1
line2


  

{code}

If you add words to the example, you will see that it always add a break before 
the second-to-last word.
If you remove the inline: {{line2}} and leave just the 
{{line2}} text, this corrects the problem.  The same if you remove the tags of 
any inline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (FOP-2716) NPE when linefeed-treatment="preserve" and margins change

2017-06-20 Thread Stephen Hughes (JIRA)
Stephen Hughes created FOP-2716:
---

 Summary: NPE when linefeed-treatment="preserve" and margins change
 Key: FOP-2716
 URL: https://issues.apache.org/jira/browse/FOP-2716
 Project: FOP
  Issue Type: Bug
Affects Versions: 2.2
Reporter: Stephen Hughes
 Attachments: error.fo

A NullPointerException occurs when fop encounters a block with 
linefeed-treatment="preserve" and a linefeed occurs at a page boundary where 
the left and/or right margins change.

The exception can be reproduced with the attached file, running:
fop.bat error.fo -pdf error.pdf

Output is as follows:

Jun 16, 2017 8:45:33 AM org.apache.fop.cli.Main startFOP
SEVERE: Exception
org.apache.fop.apps.FOPException
java.lang.NullPointerException
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:296)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:116)
at org.apache.fop.cli.Main.startFOP(Main.java:186)
at org.apache.fop.cli.Main.main(Main.java:217)
Caused by: java.lang.NullPointerException
at 
org.apache.fop.layoutmgr.AbstractBreaker.getRestartAtLM(AbstractBreaker.java:529)
at 
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:436)
at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:112)
at 
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:141)
at 
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
at 
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:130)
at 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)
at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source)
at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown 
Source)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:293)
... 3 more

-

java.lang.NullPointerException
at 
org.apache.fop.layoutmgr.AbstractBreaker.getRestartAtLM(AbstractBreaker.java:529)
at 
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:436)
at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:112)
at 
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:141)
at 
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
at 
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:130)
at 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)
at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source)
at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown 
Source)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
at org.apache.fop.cli.InputHandler.transformTo(I

Re: fop 2.2 NullPointerException when linefeed-treatment="preserve" and margins change

2017-06-20 Thread Chris
Hi Stephen,

XSL-FO with changing IPDs between pages is known to have a few bugs. 
Please log a bug in JIRA making sure to attach the XSL-FO File that 
replicates the NPE.

Thanks,

Chris

On 16/06/2017 01:12, HUGHES Stephen (ATS) wrote:
>
> Hi all,
>
> I have encountered a NullPointerException when rendering an fo to pdf 
> using fop-2.2 on Windows 7 64-bit with JDK 1.8.0_74.  I've attached a 
> simple FO file that  reproduces the exception.  The command line I'm 
> running is simply:
>
> fop.bat error.fo -pdf error.pdf
>
> Output (with stack trace) is below.
>
> The exception seems to occur when fop encounters a block with 
> linefeed-treatment="preserve" and a linefeed occurs at a page boundary 
> where the left and/or right margins change.  In the attached example, 
> if I remove the block's linefeed-treatment="preserve" attribute, or 
> set margin-right="20mm" for page_rest (so it's the same as 
> page_first), the exception does not occur.  I’ve also found that 
> replacing the linefeed between the 3s and 4s with a space prevents the 
> exception, but the line of 1s is reprinted at the top of the second page.
>
> Thanks,
>
> Stephen
>
> Jun 16, 2017 8:45:33 AM org.apache.fop.cli.Main startFOP
>
> SEVERE: Exception
>
> org.apache.fop.apps.FOPException
>
> java.lang.NullPointerException
>
> at 
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:296)
>
> at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:116)
>
> at org.apache.fop.cli.Main.startFOP(Main.java:186)
>
> at org.apache.fop.cli.Main.main(Main.java:217)
>
> Caused by: java.lang.NullPointerException
>
> at 
> org.apache.fop.layoutmgr.AbstractBreaker.getRestartAtLM(AbstractBreaker.java:529)
>
> at 
> org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:436)
>
> at 
> org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:112)
>
> at 
> org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:141)
>
> at 
> org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
>
> at 
> org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:130)
>
> at 
> org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)
>
> at 
> org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
>
> at 
> org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
>
> at 
> org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
>
> at 
> org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source)
>
> at 
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown 
> Source)
>
> at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>  
> Source)
>
> at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
> Source)
>
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
> Source)
>
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
> Source)
>
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
> Source)
>
> at 
> org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
>
> at 
> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
>
> at 
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:293)
>
> ... 3 more
>
> -
>
> java.lang.NullPointerException
>
> at 
> org.apache.fop.layoutmgr.AbstractBreaker.getRestartAtLM(AbstractBreaker.java:529)
>
> at 
> org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:436)
>
> at 
> org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:112)
>
> at 
> org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:141)
>
> at 
> org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
>
> at 
> org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:130)
>
> at 
> org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)
>
> at 
> org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
>
> 

fop 2.2 NullPointerException when linefeed-treatment="preserve" and margins change

2017-06-15 Thread HUGHES Stephen (ATS)
Hi all,


I have encountered a NullPointerException when rendering an fo to pdf using 
fop-2.2 on Windows 7 64-bit with JDK 1.8.0_74.  I've attached a simple FO file 
that  reproduces the exception.  The command line I'm running is simply:
fop.bat error.fo -pdf error.pdf

Output (with stack trace) is below.

The exception seems to occur when fop encounters a block with 
linefeed-treatment="preserve" and a linefeed occurs at a page boundary where 
the left and/or right margins change.  In the attached example, if I remove the 
block's linefeed-treatment="preserve" attribute, or set margin-right="20mm" for 
page_rest (so it's the same as page_first), the exception does not occur.  I've 
also found that replacing the linefeed between the 3s and 4s with a space 
prevents the exception, but the line of 1s is reprinted at the top of the 
second page.



Thanks,

Stephen



Jun 16, 2017 8:45:33 AM org.apache.fop.cli.Main startFOP

SEVERE: Exception

org.apache.fop.apps.FOPException

java.lang.NullPointerException

at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:296)

at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:116)

at org.apache.fop.cli.Main.startFOP(Main.java:186)

at org.apache.fop.cli.Main.main(Main.java:217)

Caused by: java.lang.NullPointerException

at 
org.apache.fop.layoutmgr.AbstractBreaker.getRestartAtLM(AbstractBreaker.java:529)

at 
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:436)

at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:112)

at 
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:141)

at 
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)

at 
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:130)

at 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)

at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)

at 
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)

at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)

at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source)

at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)

at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)

at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown 
Source)

at 
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)

at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:293)

... 3 more



-



java.lang.NullPointerException

at 
org.apache.fop.layoutmgr.AbstractBreaker.getRestartAtLM(AbstractBreaker.java:529)

at 
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:436)

at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:112)

at 
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:141)

at 
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)

at 
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:130)

at 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)

at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)

at 
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)

at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)

at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source)

at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)

at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)

at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

at org.apache.xerces.jaxp.SAX

[jira] [Updated] (FOP-2671) float in conjunction with linefeed-treatment=preserve doubles text

2017-04-24 Thread Ernst Abbe (JIRA)

 [ 
https://issues.apache.org/jira/browse/FOP-2671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ernst Abbe updated FOP-2671:

Affects Version/s: 2.2

> float in conjunction with linefeed-treatment=preserve doubles text
> --
>
> Key: FOP-2671
> URL: https://issues.apache.org/jira/browse/FOP-2671
> Project: FOP
>  Issue Type: Bug
>  Components: fo/block
>Affects Versions: 2.1, 2.2
> Environment: CentOS Linux release 7.2.1511 (Core)
>Reporter: Ernst Abbe
>
> The text  {{xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx 
> xx xx yy}} in the example below is shown again under the image.
> {quote}
> 
> http://www.w3.org/1999/XSL/Format;>
> 
>  master-name="ADVERT-TOP">
>  region-name="PageTop"/>
> 
> 
> 
> 
> 
> 
> 
> 
>          height="10mm"/>
> 
> 
>  linefeed-treatment="preserve" border="0.1pt solid blue">xx xx xx xx xx xx xx 
> xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx yy
> oa ob oc od oe of og oh oi oj ok ol om on oo op oq or os ot ou ov ow ox oy
> oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo
> oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo
> oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo
> 
> 
> 
> 
> 
> 
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (FOP-2671) float in conjunction with linefeed-treatment=preserve doubles text

2017-04-24 Thread Ernst Abbe (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15981224#comment-15981224
 ] 

Ernst Abbe edited comment on FOP-2671 at 4/24/17 2:28 PM:
--

Still the same in version 2.2:
  
11 11 11 11 11 11 11 11 11 11.|PicturePicture|
22 22 22 22 22 22 22 22 22 22.|PicturePicture|
33 33 33 33 33..|PicturePicture|
44 44 44 44 44 44 44 44 44 44.|PicturePicture|
11 11 11 11 11 11 11 11 11 11 22 22 22
22 22 22 22 22 22 22 33 33 33 33 33
55 55 55 55 55 55 55 55 55 55 66 66
66 66 66
77 77 77 77 77 77 77 77 77 77 77 77 77
88 88 88 88 88 88 88 88
99 99 99 99 99 99 99 99 99 99 99 99
00 00 00 00 00


http://www.w3.org/1999/XSL/Format;>














11 11 11 11 11 11 11 11 11 11 22 22 22 22 22 22 22 22 22 22 33 33 33 33 33
44 44 44 44 44 44 44 44 44 44 55 55 55 55 55 55 55 55 55 55 66 66 66 66 66
77 77 77 77 77 77 77 77 77 77 77 77 77 88 88 88 88 88 88 88 88
99 99 99 99 99 99 99 99 99 99 99 99 00 00 00 00 00








was (Author: ernst):
Still the same in version 2.2:
   ___
11 11 11 11 11 11 11 11 11 11 |  |
22 22 22 22 22 22 22 22 22 22 |  |
33 33 33 33 33  |  |
44 44 44 44 44 44 44 44 44 44 |___|
11 11 11 11 11 11 11 11 11 11 22 22 22
22 22 22 22 22 22 22 33 33 33 33 33
55 55 55 55 55 55 55 55 55 55 66 66
66 66 66
77 77 77 77 77 77 77 77 77 77 77 77 77
88 88 88 88 88 88 88 88
99 99 99 99 99 99 99 99 99 99 99 99
00 00 00 00 00


http://www.w3.org/1999/XSL/Format;>














11 11 11 11 11 11 11 11 11 11 22 22 22 22 22 22 22 22 22 22 33 33 33 33 33
44 44 44 44 44 44 44 44 44 44 55 55 55 55 55 55 55 55 55 55 66 66 66 66 66
77 77 77 77 77 77 77 77 77 77 77 77 77 88 88 88 88 88 88 88 88
99 99 99 99 99 99 99 99 99 99 99 99 00 00 00 00 00







> float in conjunction with linefeed-treatment=preserve doubles text
> --
>
> Key: FOP-2671
> URL: https://issues.apache.org/jira/browse/FOP-2671
> Project: FOP
>  Issue Type: Bug
>  Components: fo/block
>Affects Versions: 2.1
> Environment: CentOS Linux release 7.2.1511 (Core)
>Reporter: Ernst Abbe
>
> The text  {{xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx 
> xx xx yy}} in the example below is shown again under the image.
> {quote}
> 
> http://www.w3.org/1999/XSL/Format;>
> 
>  master-name="ADVERT-TOP">
>  region-name="PageTop"/>
> 
> 
> 
> 
> 
> 
> 
> 
>      height="10mm"/>
> 
> 
>  linefeed-treatment="preserve" border="0.1pt solid blue">xx xx xx xx xx xx xx 
> xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx yy
> oa ob oc od oe of og oh oi oj ok ol om on oo op oq or os ot ou ov ow ox oy
> oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo
> oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo
> oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo
> 
> 
> 
> 
> 
> 
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (FOP-2671) float in conjunction with linefeed-treatment=preserve doubles text

2017-04-24 Thread Ernst Abbe (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15981224#comment-15981224
 ] 

Ernst Abbe commented on FOP-2671:
-

Still the same in version 2.2:
   ___
11 11 11 11 11 11 11 11 11 11 |  |
22 22 22 22 22 22 22 22 22 22 |  |
33 33 33 33 33  |  |
44 44 44 44 44 44 44 44 44 44 |___|
11 11 11 11 11 11 11 11 11 11 22 22 22
22 22 22 22 22 22 22 33 33 33 33 33
55 55 55 55 55 55 55 55 55 55 66 66
66 66 66
77 77 77 77 77 77 77 77 77 77 77 77 77
88 88 88 88 88 88 88 88
99 99 99 99 99 99 99 99 99 99 99 99
00 00 00 00 00


http://www.w3.org/1999/XSL/Format;>














11 11 11 11 11 11 11 11 11 11 22 22 22 22 22 22 22 22 22 22 33 33 33 33 33
44 44 44 44 44 44 44 44 44 44 55 55 55 55 55 55 55 55 55 55 66 66 66 66 66
77 77 77 77 77 77 77 77 77 77 77 77 77 88 88 88 88 88 88 88 88
99 99 99 99 99 99 99 99 99 99 99 99 00 00 00 00 00







> float in conjunction with linefeed-treatment=preserve doubles text
> --
>
> Key: FOP-2671
> URL: https://issues.apache.org/jira/browse/FOP-2671
> Project: FOP
>  Issue Type: Bug
>  Components: fo/block
>Affects Versions: 2.1
> Environment: CentOS Linux release 7.2.1511 (Core)
>Reporter: Ernst Abbe
>
> The text  {{xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx 
> xx xx yy}} in the example below is shown again under the image.
> {quote}
> 
> http://www.w3.org/1999/XSL/Format;>
> 
>  master-name="ADVERT-TOP">
>  region-name="PageTop"/>
> 
> 
> 
> 
> 
> 
> 
> 
>      height="10mm"/>
> 
> 
>  linefeed-treatment="preserve" border="0.1pt solid blue">xx xx xx xx xx xx xx 
> xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx yy
> oa ob oc od oe of og oh oi oj ok ol om on oo op oq or os ot ou ov ow ox oy
> oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo
> oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo
> oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo
> 
> 
> 
> 
> 
> 
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (FOP-2685) Exception in AbstractBreaker if linefeed-treatment=preserve, page break and different layouts for odd/even pages

2017-02-01 Thread JIRA
Markus Holländer created FOP-2685:
-

 Summary: Exception in AbstractBreaker if 
linefeed-treatment=preserve, page break and different layouts for odd/even pages
 Key: FOP-2685
 URL: https://issues.apache.org/jira/browse/FOP-2685
 Project: FOP
  Issue Type: Bug
  Components: fo/unqualified
Affects Versions: 2.1, 1.1
 Environment: VM with SUSE Linux Enterprise Server 12 (64 bit); 
jdk1.8.0_60 on production server (FOP 1.1), jdk1.8.0_121 on test server (FOP 
2.1)
Reporter: Markus Holländer
 Attachments: fail.fo, fop11_exception.log, fop12_exception.log

If there are different page masters for  odd and even pages (with different 
left/right margins), AND there is an fo:block with 
{{linefeed-treatment="preserve"}}, AND a linefeed coincides with a page break 
(i.e. in "line 1 \n line 2", line 2 doesn't fit on the same page), I get an 
exception and no PDF is produced.

Attached is the smallest .fo file with which I could reproduce the exception, 
as well as command line outputs for FOP 1.1 and 2.1.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (FOP-2671) float in conjunction with linefeed-treatment=preserve doubles text

2016-11-29 Thread Ernst Abbe (JIRA)
Ernst Abbe created FOP-2671:
---

 Summary: float in conjunction with linefeed-treatment=preserve 
doubles text
 Key: FOP-2671
 URL: https://issues.apache.org/jira/browse/FOP-2671
 Project: FOP
  Issue Type: Bug
  Components: fo/block
Affects Versions: 2.1
 Environment: CentOS Linux release 7.2.1511 (Core)
Reporter: Ernst Abbe


The text  {{xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx 
xx xx yy}} in the example below is shown again under the image.

{quote}

http://www.w3.org/1999/XSL/Format;>














xx xx xx xx xx xx xx xx 
xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx yy
oa ob oc od oe of og oh oi oj ok ol om on oo op oq or os ot ou ov ow ox oy
oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo
oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo
oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo






{quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


DO NOT REPLY [Bug 41652] linefeed-treatment=preserve not honored

2012-04-01 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=41652

Glenn Adams gl...@skynav.com changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #5 from Glenn Adams gl...@skynav.com 2012-04-01 06:55:47 UTC ---
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


DO NOT REPLY [Bug 42043] white-space-collapse=false linefeed-treatment=preserve does not preserve initial spaces.

2012-04-01 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=42043

Glenn Adams gl...@skynav.com changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #4 from Glenn Adams gl...@skynav.com 2012-04-01 13:49:01 UTC ---
batch transition to closed remaining pre-FOP1.0 resolved bugs

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


DO NOT REPLY [Bug 49411] using language attribute breaks linefeed-treatment=preserve rendered block

2012-04-01 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49411

Glenn Adams gl...@skynav.com changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #3 from Glenn Adams gl...@skynav.com 2012-04-01 13:54:51 UTC ---
batch transition to closed remaining pre-FOP1.0 resolved bugs

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


DO NOT REPLY [Bug 49411] using language attribute breaks linefeed-treatment=preserve rendered block

2010-06-19 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49411

--- Comment #2 from Andreas L. Delmelle adelme...@apache.org 2010-06-19 
14:08:27 EDT ---
(In reply to comment #1)
 I already solved this particular manifestation in my local sandbox, simply by
 doing something I initially expected would already help: invert the principal
 loop in LineLM.createLineBreaks().

Just adding this here for the sake of completeness: turns out that inverting
that loop had nothing to do with it. Current FOP Trunk does not exhibit the
described behavior, even with the loop inverted. 
The 'fix' is actually due to a change made last year to cater for changing IPD
between pages. There was a 'hyphenationPerformed' member added to
LineLayoutManager which effectively masks the problem in this case. This makes
sure that findHyphenationPoints is called only once per LineLM. In case of
preserved linefeeds, this results in only the first paragraph being hyphenated.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


DO NOT REPLY [Bug 49411] using language attribute breaks linefeed-treatment=preserve rendered block

2010-06-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49411

Andreas L. Delmelle adelme...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Component|fo tree |page-master/layout
   Platform|PC  |All
Version|0.95|1.0dev
 Resolution||DUPLICATE
 OS/Version|Windows XP  |All

--- Comment #1 from Andreas L. Delmelle adelme...@apache.org 2010-06-16 
14:20:08 EDT ---
(In reply to comment #0)
 
 Without the language=en  attribute the output is (as expected)
 First line
 Second line
 
 This seems to be independent of the chosen output format.

Apologies for the late reply...

The real issue seems to be the combination of hyphenation with preserved
linefeeds, which is a registered, as yet unsolved bug. See Bug #38264. 
I last had a look at that one over two years ago, but I think the basic story
as sketched in that report still holds: three paragraphs are generated by the
line-breaking algorithm (two genuine and an empty one), which are
post-processed to apply hyphenation, and this post-processing implicitly
assumes that a TextLM will always generate one and only one paragraph.

When you remove the language attribute, hyphenation is not triggered, so the
issue does not occur. If you really get hyphenation points and have more
preserved linefeeds, the effects are reinforced. In extreme cases, you hardly
recognize the original text.

So, I got that itch again, and dove into the code... 
I already solved this particular manifestation in my local sandbox, simply by
doing something I initially expected would already help: invert the principal
loop in LineLM.createLineBreaks(). 
Unless I am missing something, there really seems to be no benefit in that loop
going backward, unless of course one considers confusing people trying to
follow the flow to be beneficial... Errm... :-
This solves the issue, but only in this very confined testcase. The hyphenation
'updates' are still applied twice, but there really is no difference (= none of
the calculated hyphenation points are actually used, since both pieces of text
fit well within one line)

I am marking this one as duplicate. Please post any follow-up at #38264

*** This bug has been marked as a duplicate of bug 38264 ***

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


DO NOT REPLY [Bug 49411] New: using language attribute breaks linefeed-treatment=preserve rendered block

2010-06-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49411

   Summary: using language attribute breaks
linefeed-treatment=preserve rendered block
   Product: Fop
   Version: 0.95
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: fo tree
AssignedTo: fop-dev@xmlgraphics.apache.org
ReportedBy: ar...@pinguins.dyndns.org


The following code:

?xml version=1.0 encoding=iso-8859-1?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
fo:simple-page-master master-name=my-page
  fo:region-body margin=1in/
/fo:simple-page-master
  /fo:layout-master-set

  fo:page-sequence hyphenate=true language=en master-reference=my-page
fo:flow flow-name=xsl-region-body
fo:block linefeed-treatment=preserveFirst line
Second line/fo:block
/fo:flow
  /fo:page-sequence
/fo:root

results in an output of: 
FirstlineSecondline
FirstlineSecondline

Without the language=en  attribute the output is (as expected)
First line
Second line

This seems to be independent of the chosen output format.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


DO NOT REPLY [Bug 44328] - widows not respected when linefeed-treatment=preserve is set on an fo:block

2008-01-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=44328.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44328





--- Additional Comments From [EMAIL PROTECTED]  2008-01-30 09:04 ---
Created an attachment (id=21452)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=21452action=view)
XSL-FO file that displays the problem


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 42043] New: - white-space-collapse=false linefeed-treatment=preserve does not preserve initial spaces.

2007-04-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=42043.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42043

   Summary: white-space-collapse=false linefeed-
treatment=preserve does not preserve initial spaces.
   Product: Fop
   Version: all
  Platform: Other
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: general
AssignedTo: fop-dev@xmlgraphics.apache.org
ReportedBy: [EMAIL PROTECTED]


Using white-space-collapse=false and linefeed-treatment=preserve for
pre-formatted text does not work when spaces are present at the beginning of
lines. For example:

fo:b w-s-p=f l-t=pHello/fo:b is fine.
fo:b w-s-p=f l-t=p Hello/fo:b produces the same as the above.

Tested against trunk using awt and pdf.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 42043] - white-space-collapse=false linefeed-treatment=preserve does not preserve initial spaces.

2007-04-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=42043.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42043





--- Additional Comments From [EMAIL PROTECTED]  2007-04-04 02:05 ---
Created an attachment (id=19911)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=19911action=view)
FO file demonstrating the problem.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 42043] - white-space-collapse=false linefeed-treatment=preserve does not preserve initial spaces.

2007-04-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=42043.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42043





--- Additional Comments From [EMAIL PROTECTED]  2007-04-04 04:08 ---
Created an attachment (id=19913)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=19913action=view)
Doc update pointing to additional required attribute.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 41652] - linefeed-treatment=preserve not honored

2007-02-19 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=41652.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41652





--- Additional Comments From [EMAIL PROTECTED]  2007-02-19 08:05 ---
(In reply to comment #2)
 I see a possible fix in adding the following to 
 fop.layoutmgr.InlineKnuthSequence.endSequence():


On second thought, maybe it's better to do something similar in 
LineLayoutManager.collectInlineKnuthElements().

At line 746, an attempt is made to deal with the situation of blank lines (~ 
InlineKnuthSequence 
containing nothing but a forced break), but the added KnuthInlineBox of w=0 
still doesn't produce the 
expected result. It does work if you increase the width (to some value between 
1 and iLineWidth). 

Still, using an auxiliary KnuthGlue instead of a box also works, and somehow 
seems more appropriate.

Opinions anyone?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 38264] - linefeed-treatment=preserve hyphenate=true : INCORRECT + Duplicates the text!!!

2007-02-19 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=38264.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38264





--- Additional Comments From [EMAIL PROTECTED]  2007-02-19 08:09 ---
Also interesting to note: if one encloses the content of the second block in 
testcase 
'block_hyphenation_linefeed-preserve.xml' with an fo:inline, then 
LineLayoutManager.findHyphenationPoints() throws a NullPointerException (line 
1486), due to an 
Update being added earlier which has null for an inlineLM...

Looking closer, I'm wondering whether the strange effect of duplication may 
have something to with:
a) a block containing preserved linefeeds generates a Paragraph of Paragraphs
b) findOptimalBreakingPoints() is called in a loop that iterates /backwards/ 
over the sub-paragraphs, 
while 
c) findHyphenationPoints() iterates /forwards/ over each sub-paragraph 
individually

This opens up the possibility that findHyphenationPoints() adds Updates to the 
updateList with indices 
that refer to the last sub-paragraph, and those indices are later, in the outer 
loop, interpreted as 
positions in the first sub-paragraph --or worse, in the super-paragraph?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 41652] New: - linefeed-treatment=preserve not honored

2007-02-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=41652.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41652

   Summary: linefeed-treatment=preserve not honored
   Product: Fop
   Version: 0.93
  Platform: Other
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: fo tree
AssignedTo: fop-dev@xmlgraphics.apache.org
ReportedBy: [EMAIL PROTECTED]


In the actual peace of code


fo:block hyphenate=false font-family=monospace text-align=start
wrap-option=no-wrap font-size=8pt id=d0e3596 white-space-collapse=false
white-space-treatment=preserve linefeed-treatment=preserve
line-stacking-strategy=font-heightx


zzz/fo:block

the second (empty) line is swallowed

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 41652] - linefeed-treatment=preserve not honored

2007-02-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=41652.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41652





--- Additional Comments From [EMAIL PROTECTED]  2007-02-18 11:07 ---
Confirmed with FOP Trunk.

Interestingly, if you insert a space between the two consecutive linefeeds, you 
do get an empty line... 
leading me to think that the linefeed is preserved, but one ends up with a 
zero-height line.

A way to fix this may exactly be to insert such a space-character in the code 
somewhere, whenever there 
are two consecutive linefeeds.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 38264] - linefeed-treatment=preserve hyphenate=true : INCORRECT + Duplicates the text!!!

2006-01-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=38264.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38264





--- Additional Comments From [EMAIL PROTECTED]  2006-01-13 19:32 ---
Created an attachment (id=17419)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=17419action=view)
an FO file that demonstrates the problem.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 38264] - linefeed-treatment=preserve hyphenate=true : INCORRECT + Duplicates the text!!!

2006-01-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=38264.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38264





--- Additional Comments From [EMAIL PROTECTED]  2006-01-13 19:34 ---
Created an attachment (id=17420)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=17420action=view)
the PDF output of the hyphen2.fo


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 38264] - linefeed-treatment=preserve hyphenate=true : INCORRECT + Duplicates the text!!!

2006-01-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=38264.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38264





--- Additional Comments From [EMAIL PROTECTED]  2006-01-13 21:21 ---
This problem is also present in subversion HEAD, rev. 367760

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


Re: linefeed-treatment=preserve

2005-11-02 Thread Andreas L Delmelle

On Nov 2, 2005, at 01:39, Manuel Mall wrote:


On Wed, 2 Nov 2005 05:14 am, Simon Pepping wrote:


On Tue, Nov 01, 2005 at 06:54:08PM +0100, Andreas L Delmelle wrote:


On Nov 1, 2005, at 16:03, Manuel Mall wrote:


Is it a)
empty line
line 1
empty line



This one, IMO.



I agree, a)



Same as Simon, Joerg and Andreas I thought a) as well but am now
confused because both AntennaHouse and RenderX render:


FWIW: I'm sticking to my initial a).

Furthermore, I tried following the current whitespace removal  
algorithm (fo.flow.Block.handleWhiteSpace()) for this particular  
case, and IIC, it is handled pretty well --IOW: both linefeeds are  
properly presented to the layout-engine, but it's somewhere in layout  
that the decision is made to drop the trailing linefeed. Probably  
because the feasible break after 'line1' gets 'merged' with the  
forced line-break (or: what exactly does the algorithm do when it  
encounters a mere break-possibility immediately followed by a forced  
line-break?)



Cheers,

Andreas