[jira] [Commented] (FOP-2314) Caching xmlParserClassName in org.apache.fop.svg.SimpleSVGUserAgent

2013-11-18 Thread Gonzalo Vasquez (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13825287#comment-13825287
 ] 

Gonzalo Vasquez commented on FOP-2314:
--

Great! Hope to hear some more results from the tests soon!

Regarding the note: can you please provide some pointers to replacing the svg 
rectangles with fo based ones?

 Caching xmlParserClassName in org.apache.fop.svg.SimpleSVGUserAgent
 ---

 Key: FOP-2314
 URL: https://issues.apache.org/jira/browse/FOP-2314
 Project: Fop
  Issue Type: Improvement
  Components: svg
Affects Versions: trunk
 Environment: Tested on Mac OSX 10.9, Java SE 7 (1.7.0_04)
Reporter: Gonzalo Vasquez
Priority: Minor
  Labels: performance
 Attachments: SimpleSVGUserAgent.java.patch, sample.fo


 After having profiled an application I'm coding, and having detected hotspot 
 methods, I've come across with a few suggestions por performance improvement 
 which actually have worked in my environment.
 Changing the referenced method to the following code makes the small trick:
 From:
 public String getXMLParserClassName() {
 try {
 SAXParserFactory factory = SAXParserFactory.newInstance();
 return factory.newSAXParser().getXMLReader().getClass().getName();
 } catch (Exception e) {
 return null;
 }
 }
 To:
 private static final String xmlParserClassName;
 static {
 String result;
 try {
 SAXParserFactory factory = SAXParserFactory.newInstance();
 result = 
 factory.newSAXParser().getXMLReader().getClass().getName();
 } catch (Exception e) {
 result = null;
 }
 xmlParserClassName = result;
 }
 public String getXMLParserClassName() {
 return xmlParserClassName;
 }
 Could this be added as a patch to the trunk please?



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Updated] (FOP-2293) Whitespace management extension

2013-11-18 Thread Seifeddine Dridi (JIRA)

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

Seifeddine Dridi updated FOP-2293:
--

Attachment: FO_multi-switch_best-fit_ext_rev4.patch

Added a new patch which corrects some of the bugs that I have been to find. I 
also added some skeleton code for handling multiple alternatives per page. The 
latter case is quite tricky and difficult to incorporate into the Knuth 
framework.

Anyhow, the current code should be capable to handle multi-switch(s) having a 
single multi-case perfectly. With alignment properties and whatnot. So I think 
I'm going to call this version 1 and from here I'll try to move on into adding 
more features and test-cases.

 Whitespace management extension
 ---

 Key: FOP-2293
 URL: https://issues.apache.org/jira/browse/FOP-2293
 Project: Fop
  Issue Type: New Feature
  Components: general
Affects Versions: trunk
Reporter: Seifeddine Dridi
Priority: Minor
  Labels: XSL-FO
 Fix For: trunk

 Attachments: FO_multi-switch_best-fit_ext_rev2.patch, 
 FO_multi-switch_best-fit_ext_rev3.patch, 
 FO_multi-switch_best-fit_ext_rev4.patch, FO_multi-switch_test.fo, 
 FO_multi-switch_with_best-fit_extension.patch, bestfit.fo, doc.pdf, 
 multi-switch_bestfit.fo, multiple-feasible-nodes.fo, patch-rev1.1.patch, 
 patch-rev1.patch, patch-rev2.patch, patch.patch


 I have been working on an extension for whitespace management, similar to 
 what's described here: 
 http://wiki.apache.org/xmlgraphics-fop/WhitespaceManagement
 The logic of the extension is very simple: the user defines a set of 
 alternatives that he wishes to insert at the end of a page, then if there is 
 enough space left, FOP will pick the alternative that best matches the user's 
 selection criteria (first fit, smallest fit, biggest fit).
 This is my first work on FOP and it took me almost 2 months to reach this 
 stage in development. But it's not the end of course, so I'm relying on your 
 feedback to improve it.
 Thank you



--
This message was sent by Atlassian JIRA
(v6.1#6144)


Content overflows the viewport

2013-11-18 Thread Gonzalo Vasquez
I'm getting several warnings like these:

Nov 18, 2013 12:58:40 PM org.apache.fop.events.LoggingEventListener processEvent
Advertencia: Content overflows the viewport of an fo:block-container in 
inline-progression direction by 54 millipoints. Content will be clipped. 
(No context info available)

How can I properly identify the offending elements? Please consider that the FO 
is XSL generated.

Regards,

Gonzalo Vásquez Sáez
Gerente Investigación y Desarrollo (RD)
Altiuz Soluciones Tecnológicas de Negocios Ltda.
Av. Nueva Tajamar 555 Of. 802, Las Condes - CP 7550099
+56 2 335 2461
gvasq...@altiuz.cl
http://www.altiuz.cl
http://www.altiuzreports.com
  




Re: [PATCH] Re: Incorrect leaders at FOP example

2013-11-18 Thread Alexey Neyman
[Patch ping]

On Thursday, November 14, 2013 11:16:24 AM Alexey Neyman wrote:
 [CC'ed fop-dev - please review/commit the patch]
 
 Hi Ognjen,
 
 On Thursday, November 14, 2013 09:09:21 AM Ognjen Blagojevic wrote:
  Alexey,
  
  On 13.11.2013 21:46, Alexey Neyman wrote:
   On Wednesday, November 13, 2013 03:21:47 am Ognjen Blagojevic wrote:
   I need to create leaders for TOC. I started with researching FOP
   examples (examples/fo/basic/leaders.fo), but the generated PDF doesn't
   contain expected results.
  
  (...)
  
   Are my expectations too high?
   
   Hard to say, since you didn't attach neither sample FO code, nor the
   resulting PDF. Leaders work for me with 1.1 on multiple Java versions,
   1.6.x and 1.7.x.
  
  Thank you for taking look at this.
  
  I was testing with unmodified leader.fo example which is part of the FOP
  distro. Here is FO file based on that example, and the resulting PDF. I
  used FOP 1.1, Oracle JDK 1.7.0_40-b43 on Windows 7 64-bit (also other
  FOP versions and OSes, but the result is always the same).
 
 It seems the leader.fo example lacks the text-align-last=justify property
 on the enclosing block. Because of that, FOP assumes the same alignment
 (start) on the line containing the leader and does not extend the leader
 to the end boundary of the reference area. See the attached diff - this
 makes the leaders work fine.
 
 FOP developers, could someone review/commit the attached diff?
 
 Regards,
 Alexey.
 
   Here's an example fo:leader I am using:
 fo:leader padding-left=4pt padding-right=4pt
 
   leader-pattern=dots leader-pattern-width=3pt
   leader-alignment=reference-area
   keep-with-next.within-line=always/
  
  The only difference I notice to FO file I attached are attributes
  keep-with-next.within-line, padding-left and padding-right. Adding them
  to attached example does not solve the problem in the resulting PDF.
  
  -Ognjen



[jira] [Commented] (FOP-2260) [PATCH] Smart quotes broken in RTF if at start of text

2013-11-18 Thread Christopher Lowdon (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13825842#comment-13825842
 ] 

Christopher Lowdon commented on FOP-2260:
-

Sorry for the delay.  The following is a block of fo that when converted to rtf 
results in the RTF string: \rdblquote Hello World!\rdblquote

?xml version=1.0 encoding=UTF-8?fo:root 
xmlns:fo=http://www.w3.org/1999/XSL/Format; 
xmlns:html=http://www.w3.org/1999/xhtml; 
xmlns:HTMLPicture=java:com.cerner.markup.conversion.impl.HTMLPicture 
writing-mode=lr-tb hyphenate=false text-align=start role=html:html 
xml:lang=enfo:layout-master-setfo:simple-page-master page-width=auto 
page-height=auto margin-top=1in margin-bottom=1in margin-left=1in 
margin-right=1in master-name=all-pagesfo:region-body margin-top=1in 
margin-right=1in margin-bottom=1in margin-left=1in column-count=1 
column-gap=12pt/fo:region-before region-name=page-header extent=1in 
display-align=before/fo:region-after region-name=page-footer extent=1in 
display-align=after/fo:region-start extent=1in/fo:region-end 
extent=1in//fo:simple-page-master/fo:layout-master-setfo:page-sequence 
master-reference=all-pagesfo:titletest/fo:titlefo:static-content 
flow-name=page-headerfo:block font-size=small text-align=center 
space-before.conditionality=retain 
space-before=0.5in//fo:static-contentfo:static-content 
flow-name=page-footerfo:block font-size=small text-align=center 
space-after.conditionality=retain 
space-after=0.5in//fo:static-contentfo:flow 
flow-name=xsl-region-bodyfo:block role=html:bodyfo:block 
role=html:divHello 
World!/fo:block/fo:block/fo:flow/fo:page-sequence/fo:root

 [PATCH] Smart quotes broken in RTF if at start of text
 --

 Key: FOP-2260
 URL: https://issues.apache.org/jira/browse/FOP-2260
 Project: Fop
  Issue Type: Bug
  Components: rtf
Affects Versions: 1.1
Reporter: Christopher Lowdon
Priority: Minor
  Labels: patch
 Attachments: mypatch.diff


 When you have a quote at the start of your string, it is transformed into a 
 smart quote incorrectly.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Comment Edited] (FOP-2260) [PATCH] Smart quotes broken in RTF if at start of text

2013-11-18 Thread Christopher Lowdon (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13825842#comment-13825842
 ] 

Christopher Lowdon edited comment on FOP-2260 at 11/18/13 10:16 PM:


Sorry for the delay.  The following is a block of fo that when converted to rtf 
results in the RTF string: \rdblquote Hello World!\rdblquote

?xml version=1.0 encoding=UTF-8?fo:root 
xmlns:fo=http://www.w3.org/1999/XSL/Format; 
xmlns:html=http://www.w3.org/1999/xhtml; 
xmlns:HTMLPicture=java:com.cerner.markup.conversion.impl.HTMLPicture 
writing-mode=lr-tb hyphenate=false text-align=start role=html:html 
xml:lang=enfo:layout-master-setfo:simple-page-master page-width=auto 
page-height=auto margin-top=1in margin-bottom=1in margin-left=1in 
margin-right=1in master-name=all-pagesfo:region-body margin-top=1in 
margin-right=1in margin-bottom=1in margin-left=1in column-count=1 
column-gap=12pt/fo:region-before region-name=page-header extent=1in 
display-align=before/fo:region-after region-name=page-footer extent=1in 
display-align=after/fo:region-start extent=1in/fo:region-end 
extent=1in//fo:simple-page-master/fo:layout-master-setfo:page-sequence 
master-reference=all-pagesfo:titletest/fo:titlefo:static-content 
flow-name=page-headerfo:block font-size=small text-align=center 
space-before.conditionality=retain 
space-before=0.5in//fo:static-contentfo:static-content 
flow-name=page-footerfo:block font-size=small text-align=center 
space-after.conditionality=retain 
space-after=0.5in//fo:static-contentfo:flow 
flow-name=xsl-region-bodyfo:block role=html:bodyfo:block 
role=html:divHello 
World!/fo:block/fo:block/fo:flow/fo:page-sequence/fo:root

Looking at the RTF that is output, it appears that the font is sans-serif.  Is 
this along the lines of what you were looking for?


was (Author: clowdon):
Sorry for the delay.  The following is a block of fo that when converted to rtf 
results in the RTF string: \rdblquote Hello World!\rdblquote

?xml version=1.0 encoding=UTF-8?fo:root 
xmlns:fo=http://www.w3.org/1999/XSL/Format; 
xmlns:html=http://www.w3.org/1999/xhtml; 
xmlns:HTMLPicture=java:com.cerner.markup.conversion.impl.HTMLPicture 
writing-mode=lr-tb hyphenate=false text-align=start role=html:html 
xml:lang=enfo:layout-master-setfo:simple-page-master page-width=auto 
page-height=auto margin-top=1in margin-bottom=1in margin-left=1in 
margin-right=1in master-name=all-pagesfo:region-body margin-top=1in 
margin-right=1in margin-bottom=1in margin-left=1in column-count=1 
column-gap=12pt/fo:region-before region-name=page-header extent=1in 
display-align=before/fo:region-after region-name=page-footer extent=1in 
display-align=after/fo:region-start extent=1in/fo:region-end 
extent=1in//fo:simple-page-master/fo:layout-master-setfo:page-sequence 
master-reference=all-pagesfo:titletest/fo:titlefo:static-content 
flow-name=page-headerfo:block font-size=small text-align=center 
space-before.conditionality=retain 
space-before=0.5in//fo:static-contentfo:static-content 
flow-name=page-footerfo:block font-size=small text-align=center 
space-after.conditionality=retain 
space-after=0.5in//fo:static-contentfo:flow 
flow-name=xsl-region-bodyfo:block role=html:bodyfo:block 
role=html:divHello 
World!/fo:block/fo:block/fo:flow/fo:page-sequence/fo:root

 [PATCH] Smart quotes broken in RTF if at start of text
 --

 Key: FOP-2260
 URL: https://issues.apache.org/jira/browse/FOP-2260
 Project: Fop
  Issue Type: Bug
  Components: rtf
Affects Versions: 1.1
Reporter: Christopher Lowdon
Priority: Minor
  Labels: patch
 Attachments: mypatch.diff


 When you have a quote at the start of your string, it is transformed into a 
 smart quote incorrectly.



--
This message was sent by Atlassian JIRA
(v6.1#6144)