[jira] [Created] (FOP-2531) FOP 2.0 logs additional "Rendered page" messages

2015-09-29 Thread MH (JIRA)
MH created FOP-2531:
---

 Summary: FOP 2.0 logs additional "Rendered page" messages
 Key: FOP-2531
 URL: https://issues.apache.org/jira/browse/FOP-2531
 Project: FOP
  Issue Type: Improvement
Affects Versions: 2.0
 Environment: Java 1.8.0_60 64 Bit
Reporter: MH
Priority: Minor


We notice hundreds of "Rendered page #..." messages in our log files since we 
upgraded from FOP 1.0 to FOP 2.0. Such messages also occured in earlier FOP 
versions, but we filter them out with a custom FOP EventListener. Debugging 
showed that our existing filter still works, i.e. there are "Rendered page #" 
events still comming and they are filtered out. But now there are such log 
messages with FOP 2.0 again.

It seems that FOP 2.0 logs these messages somewhere else in addition to the 
existing event messages. Can you tell us where this is and how we can 
prevent/avoid/filter them?



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


[jira] [Created] (FOP-2524) FOP 2.0: PNG renderer produces very bad quality

2015-09-10 Thread MH (JIRA)
MH created FOP-2524:
---

 Summary: FOP 2.0: PNG renderer produces very bad quality
 Key: FOP-2524
 URL: https://issues.apache.org/jira/browse/FOP-2524
 Project: FOP
  Issue Type: Bug
  Components: renderer/png
Affects Versions: 2.0
 Environment: Java 1.8.0_51, 64 Bit, Windows 7, Windows 2008 R2
Reporter: MH
Priority: Blocker


We upgraded from FOP 1.0 to FOP 2.0 (as we had to skip FOP 1.1 due to a blocker 
bug in 1.1). After converting all Java embedding code, we are now in test 
phase. Almost everything looks good, but our PNG rendered documents suddenly 
all look very blurry (see atachement). We had the same problem with FOP 1.0 but 
"solved" it by setting the target resolution to 288:

288

We still have this setting in the fop user config XML file, but it seems that 
it has no effect anymore!



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


[jira] [Updated] (FOP-2524) FOP 2.0: PNG renderer produces very bad quality

2015-09-10 Thread MH (JIRA)

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

MH updated FOP-2524:

Attachment: screenshot-FOP-PNG-Renderer.png

Screenshot from FOP rendered PNG document (that was very sharp with FOP 1.0).

> FOP 2.0: PNG renderer produces very bad quality
> ---
>
> Key: FOP-2524
> URL: https://issues.apache.org/jira/browse/FOP-2524
> Project: FOP
>  Issue Type: Bug
>  Components: renderer/png
>Affects Versions: 2.0
> Environment: Java 1.8.0_51, 64 Bit, Windows 7, Windows 2008 R2
>Reporter: MH
>Priority: Blocker
> Attachments: screenshot-FOP-PNG-Renderer.png
>
>
> We upgraded from FOP 1.0 to FOP 2.0 (as we had to skip FOP 1.1 due to a 
> blocker bug in 1.1). After converting all Java embedding code, we are now in 
> test phase. Almost everything looks good, but our PNG rendered documents 
> suddenly all look very blurry (see atachement). We had the same problem with 
> FOP 1.0 but "solved" it by setting the target resolution to 288:
> 288
> We still have this setting in the fop user config XML file, but it seems that 
> it has no effect anymore!



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


[jira] [Commented] (FOP-2524) FOP 2.0: PNG renderer produces very bad quality

2015-09-10 Thread MH (JIRA)

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

MH commented on FOP-2524:
-

I found the problem and a workaround: the FopFactoryBuilder does not seem to 
read (all) the values from the Configuration. During debugging, I noticed, that 
the Configuration object hat the correct target-resolution 288, but the 
FoUserAgent had the default 72 DPI. My workaround is, to read the 
target-resolution from the Configuration and set it explicitaly in the 
FoUserAgent:

--
/**
 * Setup FOP.
 *
 * @param defaultDir Default base directory. Required for remaining 
(default / FOP internal) URI resolvements. (e.g. ".", 
"K:\amcReports\xml\fonts").
 * @param currentDir Current base directory for custom URI resolver. (e.g. 
"H:\temp\iComps\amc\rep\150709155541BE13E0-F516-478C-AF77-5E23D7DCD594\1_4986\0_R_FrontPage2_10").
 * @throws Exception on error.
 * @since 6.2.0
 */
public final void setupFOP(final File defaultDir, final File currentDir) 
throws Exception {

URI defaultURI = null;
if (defaultDir != null) {
defaultURI = defaultDir.toURI();
}

URI currentURI = null;
if (currentDir != null) {
currentURI = currentDir.toURI();
if (uriResolver != null) {
uriResolver.setCurDir(currentDir);
}
}

if (fopConfig != null) {
if (uriResolver != null) {
fopFactoryBuilder = new FopFactoryBuilder(defaultURI, 
uriResolver);
} else {
fopFactoryBuilder = new FopFactoryBuilder(defaultURI);
}

fopFactoryBuilder.setConfiguration(fopConfig); //expected to also 
read target-resolution
fopFactoryBuilder.setBaseURI(currentURI); //since FOP 2.0
//builder.setStrictFOValidation(false);
fopFactory = fopFactoryBuilder.build();
} else {
fopFactory = FopFactory.newInstance(currentURI);
}
foUserAgent = fopFactory.newFOUserAgent();

//workaround to set configuration values explicitaly from configuration:

foUserAgent.setTargetResolution(fopConfig.getChild("target-resolution").getValueAsInteger());
}//setupFOP()
--

As the Configuration is set in the FopFactoryBuilder and the FopFactory is 
created from it and the FoUserAgent is created from this FopFactory, I expected 
that the FoUserAgent had the targetResolution from the configuration. But is 
not the case.


> FOP 2.0: PNG renderer produces very bad quality
> ---
>
> Key: FOP-2524
> URL: https://issues.apache.org/jira/browse/FOP-2524
> Project: FOP
>  Issue Type: Bug
>  Components: renderer/png
>Affects Versions: 2.0
> Environment: Java 1.8.0_51, 64 Bit, Windows 7, Windows 2008 R2
>Reporter: MH
>Priority: Blocker
> Attachments: screenshot-FOP-PNG-Renderer.png
>
>
> We upgraded from FOP 1.0 to FOP 2.0 (as we had to skip FOP 1.1 due to a 
> blocker bug in 1.1). After converting all Java embedding code, we are now in 
> test phase. Almost everything looks good, but our PNG rendered documents 
> suddenly all look very blurry (see atachement). We had the same problem with 
> FOP 1.0 but "solved" it by setting the target resolution to 288:
> 288
> We still have this setting in the fop user config XML file, but it seems that 
> it has no effect anymore!



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


[jira] [Updated] (FOP-2524) FOP 2.0: target-resolution not set in FoUserAgent

2015-09-10 Thread MH (JIRA)

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

MH updated FOP-2524:

Summary: FOP 2.0: target-resolution not set in FoUserAgent  (was: FOP 2.0: 
FoUserAgent does not get (all) Configuration values)

> FOP 2.0: target-resolution not set in FoUserAgent
> -
>
> Key: FOP-2524
> URL: https://issues.apache.org/jira/browse/FOP-2524
> Project: FOP
>  Issue Type: Bug
>  Components: renderer/png
>Affects Versions: 2.0
> Environment: Java 1.8.0_51, 64 Bit, Windows 7, Windows 2008 R2
>Reporter: MH
> Attachments: screenshot-FOP-PNG-Renderer.png
>
>
> We upgraded from FOP 1.0 to FOP 2.0 (as we had to skip FOP 1.1 due to a 
> blocker bug in 1.1). After converting all Java embedding code, we are now in 
> test phase. Almost everything looks good, but our PNG rendered documents 
> suddenly all look very blurry (see atachement). We had the same problem with 
> FOP 1.0 but "solved" it by setting the target resolution to 288:
> 288
> We still have this setting in the fop user config XML file, but it seems that 
> it has no effect anymore!



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


[jira] [Updated] (FOP-2524) FOP 2.0: PNG renderer produces very bad quality

2015-09-10 Thread MH (JIRA)

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

MH updated FOP-2524:

Priority: Major  (was: Blocker)

> FOP 2.0: PNG renderer produces very bad quality
> ---
>
> Key: FOP-2524
> URL: https://issues.apache.org/jira/browse/FOP-2524
> Project: FOP
>  Issue Type: Bug
>  Components: renderer/png
>Affects Versions: 2.0
> Environment: Java 1.8.0_51, 64 Bit, Windows 7, Windows 2008 R2
>Reporter: MH
> Attachments: screenshot-FOP-PNG-Renderer.png
>
>
> We upgraded from FOP 1.0 to FOP 2.0 (as we had to skip FOP 1.1 due to a 
> blocker bug in 1.1). After converting all Java embedding code, we are now in 
> test phase. Almost everything looks good, but our PNG rendered documents 
> suddenly all look very blurry (see atachement). We had the same problem with 
> FOP 1.0 but "solved" it by setting the target resolution to 288:
> 288
> We still have this setting in the fop user config XML file, but it seems that 
> it has no effect anymore!



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


[jira] [Comment Edited] (FOP-2524) FOP 2.0: target-resolution not set in FoUserAgent

2015-09-10 Thread MH (JIRA)

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

MH edited comment on FOP-2524 at 9/10/15 2:05 PM:
--

I found the problem and a workaround: the FopFactoryBuilder does not seem to 
read (all) the values from the Configuration. During debugging, I noticed, that 
the Configuration object had the correct target-resolution 288, but the 
FoUserAgent had the default 72 DPI. My workaround is, to read the 
target-resolution from the Configuration and set it explicitaly in the 
FoUserAgent:

--
/**
 * Setup FOP.
 *
 * @param defaultDir Default base directory. Required for remaining 
(default / FOP internal) URI resolvements. (e.g. ".", 
"K:\amcReports\xml\fonts").
 * @param currentDir Current base directory for custom URI resolver. (e.g. 
"H:\temp\iComps\amc\rep\150709155541BE13E0-F516-478C-AF77-5E23D7DCD594\1_4986\0_R_FrontPage2_10").
 * @throws Exception on error.
 * @since 6.2.0
 */
public final void setupFOP(final File defaultDir, final File currentDir) 
throws Exception {

URI defaultURI = null;
if (defaultDir != null) {
defaultURI = defaultDir.toURI();
}

URI currentURI = null;
if (currentDir != null) {
currentURI = currentDir.toURI();
if (uriResolver != null) {
uriResolver.setCurDir(currentDir);
}
}

if (fopConfig != null) {
if (uriResolver != null) {
fopFactoryBuilder = new FopFactoryBuilder(defaultURI, 
uriResolver);
} else {
fopFactoryBuilder = new FopFactoryBuilder(defaultURI);
}

fopFactoryBuilder.setConfiguration(fopConfig); //expected to also 
read target-resolution
fopFactoryBuilder.setBaseURI(currentURI); //since FOP 2.0
//builder.setStrictFOValidation(false);
fopFactory = fopFactoryBuilder.build();
} else {
fopFactory = FopFactory.newInstance(currentURI);
}
foUserAgent = fopFactory.newFOUserAgent();

//workaround to set configuration values explicitaly from configuration:

foUserAgent.setTargetResolution(fopConfig.getChild("target-resolution").getValueAsInteger());
}//setupFOP()
--

As the Configuration is set in the FopFactoryBuilder and the FopFactory is 
created from it and the FoUserAgent is created from this FopFactory, I expected 
that the FoUserAgent had the targetResolution from the configuration. But this 
is not the case.



was (Author: mhilpert):
I found the problem and a workaround: the FopFactoryBuilder does not seem to 
read (all) the values from the Configuration. During debugging, I noticed, that 
the Configuration object hat the correct target-resolution 288, but the 
FoUserAgent had the default 72 DPI. My workaround is, to read the 
target-resolution from the Configuration and set it explicitaly in the 
FoUserAgent:

--
/**
 * Setup FOP.
 *
 * @param defaultDir Default base directory. Required for remaining 
(default / FOP internal) URI resolvements. (e.g. ".", 
"K:\amcReports\xml\fonts").
 * @param currentDir Current base directory for custom URI resolver. (e.g. 
"H:\temp\iComps\amc\rep\150709155541BE13E0-F516-478C-AF77-5E23D7DCD594\1_4986\0_R_FrontPage2_10").
 * @throws Exception on error.
 * @since 6.2.0
 */
public final void setupFOP(final File defaultDir, final File currentDir) 
throws Exception {

URI defaultURI = null;
if (defaultDir != null) {
defaultURI = defaultDir.toURI();
}

URI currentURI = null;
if (currentDir != null) {
currentURI = currentDir.toURI();
if (uriResolver != null) {
uriResolver.setCurDir(currentDir);
}
}

if (fopConfig != null) {
if (uriResolver != null) {
fopFactoryBuilder = new FopFactoryBuilder(defaultURI, 
uriResolver);
} else {
fopFactoryBuilder = new FopFactoryBuilder(defaultURI);
}

fopFactoryBuilder.setConfiguration(fopConfig); //expected to also 
read target-resolution
fopFactoryBuilder.setBaseURI(currentURI); //since FOP 2.0
//builder.setStrictFOValidation(false);
fopFactory = fopFactoryBuilder.build();
} else {
fopFactory = FopFactory.newInstance(currentURI);
}
foUserAgent = fopFactory.newFOUserAgent();

//workaround to set configuration values explicitaly from configuration:

foUserAgent.setTargetResolution(fopConfig.getChild("target-resolution").getValueAsInteger());
}//setupFOP()
--

As the Configuration is set in the FopFactoryBuilder and the FopFactory is 
created from 

[jira] [Updated] (FOP-2524) FOP 2.0: FoUserAgent does not get (all) Configuration values

2015-09-10 Thread MH (JIRA)

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

MH updated FOP-2524:

Summary: FOP 2.0: FoUserAgent does not get (all) Configuration values  
(was: FOP 2.0: PNG renderer produces very bad quality)

> FOP 2.0: FoUserAgent does not get (all) Configuration values
> 
>
> Key: FOP-2524
> URL: https://issues.apache.org/jira/browse/FOP-2524
> Project: FOP
>  Issue Type: Bug
>  Components: renderer/png
>Affects Versions: 2.0
> Environment: Java 1.8.0_51, 64 Bit, Windows 7, Windows 2008 R2
>Reporter: MH
> Attachments: screenshot-FOP-PNG-Renderer.png
>
>
> We upgraded from FOP 1.0 to FOP 2.0 (as we had to skip FOP 1.1 due to a 
> blocker bug in 1.1). After converting all Java embedding code, we are now in 
> test phase. Almost everything looks good, but our PNG rendered documents 
> suddenly all look very blurry (see atachement). We had the same problem with 
> FOP 1.0 but "solved" it by setting the target resolution to 288:
> 288
> We still have this setting in the fop user config XML file, but it seems that 
> it has no effect anymore!



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


[jira] [Comment Edited] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-09 Thread MH (JIRA)

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

MH edited comment on FOP-2495 at 7/9/15 6:25 PM:
-

I understand your point. So if I would delete all the problems, what would be 
the result? The result would be: oh sure - and can you proof it?. So I added 
just the examples that were show stoppers because I had to try out and browse 
the internet to get bits of pieces to finally get it to run. So, as the topic 
is almost self explainable, the comments just show various examples what APIs 
need to be documented.


was (Author: mhilpert):
I understand your point. So if I would delete all the problems, what would be 
the result? The result would be: oh sure - and can you proof it?. So I added 
just the examples that were show stoppers because I had to try out and browse 
the internet to get bits of peaces to finally get it to run. So, as the topic 
is almost self explainable, the comments just show various examples what APIs 
need to be documented.

 Embedding: missing migration documentation from FOP 1.x
 ---

 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker
  Labels: documentation

 Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
 has solved this bug (tested with standalone FOP scripts).
 Now we would like to upgrade our Java code from FOP 1.0 to FOP 2.0. The 
 Upgrading page (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says 
 You should encounter very few issues in upgrading from FOP 1.0, except as 
 noted in the following:  The truth is completely different: starting by 
 replacing fop.jar, our code gets dozens of compiler errors! Many methods are 
 simply gone:
 FopFactory.newInstance()
 FoUserAgent.setBaseURL(String);
 FopFactory.getFontManager().setFontBaseURL(String)
 FopFactory.setURIResolver(URIResolver);
 etc.
 The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
 how to replace old methods.
 The FOP 2.0 embedding page 
 (https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
 examples to start from the ground. I can't find any migration help how to 
 replace old code. 
 E.g. how can I set the font base? 
 FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find 
 any equivalent code for FOP 2.0!
 This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
 from FOP 1.x Java API to FOP 2.0!
 Now I just can search and try and experiment if I get our old code somehow 
 running with all those undocumented API changes. Can you please state a 
 migration documentation for all methods (method signatures) that don't exist 
 anymore? We can't start coding all over again from scratch. Thank you very 
 much!



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


[jira] [Commented] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-09 Thread MH (JIRA)

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

MH commented on FOP-2495:
-

I understand your point. So if I would delete all the problems, what would be 
the result? The result would be: oh sure - and can you proof it?. So I added 
just the examples that were show stoppers because I had to try out and browse 
the internet to get bits of peaces to finally get it to run. So, as the topic 
is almost self explainable, the comments just show various examples what APIs 
need to be documented.

 Embedding: missing migration documentation from FOP 1.x
 ---

 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker
  Labels: documentation

 Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
 has solved this bug (tested with standalone FOP scripts).
 Now we would like to upgrade our Java code from FOP 1.0 to FOP 2.0. The 
 Upgrading page (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says 
 You should encounter very few issues in upgrading from FOP 1.0, except as 
 noted in the following:  The truth is completely different: starting by 
 replacing fop.jar, our code gets dozens of compiler errors! Many methods are 
 simply gone:
 FopFactory.newInstance()
 FoUserAgent.setBaseURL(String);
 FopFactory.getFontManager().setFontBaseURL(String)
 FopFactory.setURIResolver(URIResolver);
 etc.
 The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
 how to replace old methods.
 The FOP 2.0 embedding page 
 (https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
 examples to start from the ground. I can't find any migration help how to 
 replace old code. 
 E.g. how can I set the font base? 
 FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find 
 any equivalent code for FOP 2.0!
 This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
 from FOP 1.x Java API to FOP 2.0!
 Now I just can search and try and experiment if I get our old code somehow 
 running with all those undocumented API changes. Can you please state a 
 migration documentation for all methods (method signatures) that don't exist 
 anymore? We can't start coding all over again from scratch. Thank you very 
 much!



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


[jira] [Commented] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-09 Thread MH (JIRA)

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

MH commented on FOP-2495:
-

Next bug found: some SVGs produce errors with FOP 2.0 that work with FOP 1.0 
(see exception below). The path in the fo (e.g. images/TestLogo.dvg) somehow 
gets an invalid path (images\images\TestLogo.svg). We noticed this on SVGs 
generated with inkscape that has url() calls like this:

--
...
g id=Gruppe3  clip-path=url(#Clip0)
  g  id=g3096  clip-path=url(#Clip1)
g  id=Gruppe1  clip-path=url(#Clip2)
  path ...
...


Result:

-
Error while rendering page 1
java.lang.RuntimeException: SVG graphic could not be built. Reason: 
org.apache.batik.bridge.BridgeException: images\images\TestLogo.svg (Das System 
kann den angegebenen Pfad nicht finden)
at 
org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:76)
at 
org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
at com.sun.proxy.$Proxy4.svgNotBuilt(Unknown Source)
at 
org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:107)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingURI(AbstractIFPainter.java:292)
at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:173)
at 
org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1295)
at 
org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1282)
at 
org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:858)
at 
org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:832)
at 
org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:863)
at 
org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:715)
at 
org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:927)
at 
org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:690)
at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:572)
at 
org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
at 
org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
at 
org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
at 
org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
at 
org.apache.fop.render.AbstractPathOrientedRenderer.renderReferenceArea(AbstractPathOrientedRenderer.java:757)
at 
org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:600)
at 
org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
at 
org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
at 
org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
at 
org.apache.fop.render.AbstractRenderer.renderRegion(AbstractRenderer.java:343)
at 
org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:307)
at 
org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:738)
at 
org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:262)
at 
org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:243)
at 
org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java:586)
at 
org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:123)
at 
org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:315)
at 
org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:216)
at 
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:140)
at 

[jira] [Issue Comment Deleted] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-09 Thread MH (JIRA)

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

MH updated FOP-2495:

Comment: was deleted

(was: Next bug found: some SVGs produce errors with FOP 2.0 that work with FOP 
1.0 (see exception below). The path in the fo (e.g. images/TestLogo.dvg) 
somehow gets an invalid path (images\images\TestLogo.svg). We noticed this on 
SVGs generated with inkscape that has url() calls like this:

--
...
g id=Gruppe3  clip-path=url(#Clip0)
  g  id=g3096  clip-path=url(#Clip1)
g  id=Gruppe1  clip-path=url(#Clip2)
  path ...
...


Result:

-
Error while rendering page 1
java.lang.RuntimeException: SVG graphic could not be built. Reason: 
org.apache.batik.bridge.BridgeException: images\images\TestLogo.svg (Das System 
kann den angegebenen Pfad nicht finden)
at 
org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:76)
at 
org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
at com.sun.proxy.$Proxy4.svgNotBuilt(Unknown Source)
at 
org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:107)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingURI(AbstractIFPainter.java:292)
at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:173)
at 
org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1295)
at 
org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1282)
at 
org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:858)
at 
org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:832)
at 
org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:863)
at 
org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:715)
at 
org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:927)
at 
org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:690)
at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:572)
at 
org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
at 
org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
at 
org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
at 
org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
at 
org.apache.fop.render.AbstractPathOrientedRenderer.renderReferenceArea(AbstractPathOrientedRenderer.java:757)
at 
org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:600)
at 
org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
at 
org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
at 
org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
at 
org.apache.fop.render.AbstractRenderer.renderRegion(AbstractRenderer.java:343)
at 
org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:307)
at 
org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:738)
at 
org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:262)
at 
org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:243)
at 
org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java:586)
at 
org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:123)
at 
org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:315)
at 
org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:216)
at 
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:140)
at 
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)

[jira] [Commented] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-07 Thread MH (JIRA)

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

MH commented on FOP-2495:
-

Next problem: when I try to change the base URI:

builder.setBaseURI(uri);

I get this exception:


java.lang.IllegalStateException: The final FOP Factory configuration has 
already been built
at 
org.apache.fop.apps.FopFactoryBuilder$CompletedFopFactoryConfigBuilder.throwIllegalStateException(FopFactoryBuilder.java:515)
at 
org.apache.fop.apps.FopFactoryBuilder$CompletedFopFactoryConfigBuilder.setBaseURI(FopFactoryBuilder.java:528)
at 
org.apache.fop.apps.FopFactoryBuilder.setBaseURI(FopFactoryBuilder.java:182)
-


Very bad! That means I have to create everything from scratch for each 
document: (!!!):

---
 if (resolver != null) {
builder = new FopFactoryBuilder(fontBase, resolver);
} else {
builder = new FopFactoryBuilder(fontBase);
}
builder.setConfiguration(cfg);
builder.setBaseURI(fontBase); //since FOP 2.0
//builder.setStrictFOValidation(false);
fopFactory = builder.build();
-

In FOP 1.0, I was able to change the baseURI via

foUserAgent.setBaseURL();

for each document - but FOP 2.0 does nott have such a method anymore. :-(

 Embedding: missing migration documentation from FOP 1.x
 ---

 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker
  Labels: documentation

 Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
 has solved this bug (tested with standalone FOP scripts).
 Now we would like to upgrade our Java code from FOP 1.0 to FOP 2.0. The 
 Upgrading page (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says 
 You should encounter very few issues in upgrading from FOP 1.0, except as 
 noted in the following:  The truth is completely different: starting by 
 replacing fop.jar, our code gets dozens of compiler errors! Many methods are 
 simply gone:
 FopFactory.newInstance()
 FoUserAgent.setBaseURL(String);
 FopFactory.getFontManager().setFontBaseURL(String)
 FopFactory.setURIResolver(URIResolver);
 etc.
 The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
 how to replace old methods.
 The FOP 2.0 embedding page 
 (https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
 examples to start from the ground. I can't find any migration help how to 
 replace old code. 
 E.g. how can I set the font base? 
 FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find 
 any equivalent code for FOP 2.0!
 This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
 from FOP 1.x Java API to FOP 2.0!
 Now I just can search and try and experiment if I get our old code somehow 
 running with all those undocumented API changes. Can you please state a 
 migration documentation for all methods (method signatures) that don't exist 
 anymore? We can't start coding all over again from scratch. Thank you very 
 much!



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


[jira] [Commented] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-07 Thread MH (JIRA)

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

MH commented on FOP-2495:
-

Simon, I don't see in your code what you mean by inputstream.

 Embedding: missing migration documentation from FOP 1.x
 ---

 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker
  Labels: documentation

 Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
 has solved this bug (tested with standalone FOP scripts).
 Now we would like to upgrade our Java code from FOP 1.0 to FOP 2.0. The 
 Upgrading page (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says 
 You should encounter very few issues in upgrading from FOP 1.0, except as 
 noted in the following:  The truth is completely different: starting by 
 replacing fop.jar, our code gets dozens of compiler errors! Many methods are 
 simply gone:
 FopFactory.newInstance()
 FoUserAgent.setBaseURL(String);
 FopFactory.getFontManager().setFontBaseURL(String)
 FopFactory.setURIResolver(URIResolver);
 etc.
 The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
 how to replace old methods.
 The FOP 2.0 embedding page 
 (https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
 examples to start from the ground. I can't find any migration help how to 
 replace old code. 
 E.g. how can I set the font base? 
 FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find 
 any equivalent code for FOP 2.0!
 This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
 from FOP 1.x Java API to FOP 2.0!
 Now I just can search and try and experiment if I get our old code somehow 
 running with all those undocumented API changes. Can you please state a 
 migration documentation for all methods (method signatures) that don't exist 
 anymore? We can't start coding all over again from scratch. Thank you very 
 much!



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


[jira] [Commented] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-07 Thread MH (JIRA)

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

MH commented on FOP-2495:
-

... I don't know what you are refering to. The parth problem is with 
Windowsnetwork shares like \\PC1\ I set the correct URI (tested in 
Windows Explorer) file:PC1/.. but somehoe, FOP is changing this to an 
invalid path.


 Embedding: missing migration documentation from FOP 1.x
 ---

 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker
  Labels: documentation

 Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
 has solved this bug (tested with standalone FOP scripts).
 Now we would like to upgrade our Java code from FOP 1.0 to FOP 2.0. The 
 Upgrading page (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says 
 You should encounter very few issues in upgrading from FOP 1.0, except as 
 noted in the following:  The truth is completely different: starting by 
 replacing fop.jar, our code gets dozens of compiler errors! Many methods are 
 simply gone:
 FopFactory.newInstance()
 FoUserAgent.setBaseURL(String);
 FopFactory.getFontManager().setFontBaseURL(String)
 FopFactory.setURIResolver(URIResolver);
 etc.
 The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
 how to replace old methods.
 The FOP 2.0 embedding page 
 (https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
 examples to start from the ground. I can't find any migration help how to 
 replace old code. 
 E.g. how can I set the font base? 
 FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find 
 any equivalent code for FOP 2.0!
 This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
 from FOP 1.x Java API to FOP 2.0!
 Now I just can search and try and experiment if I get our old code somehow 
 running with all those undocumented API changes. Can you please state a 
 migration documentation for all methods (method signatures) that don't exist 
 anymore? We can't start coding all over again from scratch. Thank you very 
 much!



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


[jira] [Comment Edited] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-07 Thread MH (JIRA)

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

MH edited comment on FOP-2495 at 7/7/15 10:04 AM:
--

The missing foUserAgent.setBaseURL() (or setBaseURI()) is a major problem! Even 
calling it on the factory builder:

fopFactoryBuilder.setBaseURI(uriBase); //since FOP 2.0

is not enough: IllegalStateException: The final FOP Factory configuration has 
already been built

I have to setup complete FOP for each single document to get things working:

---
/**
 * Set current base directory.
 *
 * @param defaultBase URI to default base directory (e.g. ., 
file:/K:/reports/xml/fonts/)
 * @param currentBase URI to current working directory (e.g. 
file:///C:/Temp/).
 * @param resolver Optional custom resolver.
 * @throws Exception on error.
 */
public final void setupFOP(final URI defaultBase, final URI currentBase, 
final ResourceResolver resolver) throws Exception {
if (fopConfig != null) {
if (resolver != null) {
fopFactoryBuilder = new FopFactoryBuilder(defaultBase, 
resolver);
} else {
fopFactoryBuilder = new FopFactoryBuilder(defaultBase);
}

fopFactoryBuilder.setConfiguration(fopConfig);
fopFactoryBuilder.setBaseURI(currentBase); //since FOP 2.0
//builder.setStrictFOValidation(false);
fopFactory = fopFactoryBuilder.build();
} else {
fopFactory = FopFactory.newInstance(currentBase);
}
foUserAgent = fopFactory.newFOUserAgent();
}//setupFOP()
--

... only to replace FOP 1.0 foUserAgent.setBaseURL() ... just because someone 
thought that this is not really required ... :-(


was (Author: mhilpert):
The missing foUserAgent.setBaseURL() (or setBaseURI()) is a major problem! Even 
calling it on the factory builder:

fopFactoryBuilder.setBaseURI(uriBase); //since FOP 2.0

is not enough: IllegalStateException: The final FOP Factory configuration has 
already been built

I have to setup complete FOP for each single document to get things working:

---
/**
 * Set current base directory.
 *
 * @param defaultBase URI to default base directory (e.g. ., 
file:/K:/reports/xml/fonts/)
 * @param currentBase URI to current working directory (e.g. 
file:///C:/Temp/).
 * @param resolver Optional custom resolver.
 * @throws Exception on error.
 */
public final void setupFOP(final URI defaultBase, final URI currentBase, 
final ResourceResolver resolver) throws Exception {
if (fopConfig != null) {
if (resolver != null) {
fopFactoryBuilder = new FopFactoryBuilder(defaultBase, 
resolver);
} else {
fopFactoryBuilder = new FopFactoryBuilder(defaultBase);
}

fopFactoryBuilder.setConfiguration(fopConfig);
fopFactoryBuilder.setBaseURI(currentBase); //since FOP 2.0
//builder.setStrictFOValidation(false);
fopFactory = fopFactoryBuilder.build();
} else {
fopFactory = FopFactory.newInstance(currentBase);
}
foUserAgent = fopFactory.newFOUserAgent();
}//setupFOP()
--

only to replace FOP 1.0 foUserAgent.setBaseURL() ... :-(

 Embedding: missing migration documentation from FOP 1.x
 ---

 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker
  Labels: documentation

 Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
 has solved this bug (tested with standalone FOP scripts).
 Now we would like to upgrade our Java code from FOP 1.0 to FOP 2.0. The 
 Upgrading page (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says 
 You should encounter very few issues in upgrading from FOP 1.0, except as 
 noted in the following:  The truth is completely different: starting by 
 replacing fop.jar, our code gets dozens of compiler errors! Many methods are 
 simply gone:
 FopFactory.newInstance()
 FoUserAgent.setBaseURL(String);
 FopFactory.getFontManager().setFontBaseURL(String)
 FopFactory.setURIResolver(URIResolver);
 etc.
 The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
 how to replace old methods.
 The FOP 2.0 embedding page 
 (https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
 examples to start from the ground. I can't find any migration help how to 
 replace old code. 
 E.g. how can I set 

[jira] [Comment Edited] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-07 Thread MH (JIRA)

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

MH edited comment on FOP-2495 at 7/7/15 10:05 AM:
--

The missing foUserAgent.setBaseURL() (or setBaseURI()) is a major problem! Even 
calling it on the factory builder:

fopFactoryBuilder.setBaseURI(uriBase); //since FOP 2.0

is not enough: IllegalStateException: The final FOP Factory configuration has 
already been built

I have to setup complete FOP for each single document just to change the base 
URI  to get things working:

---
/**
 * Set current base directory.
 *
 * @param defaultBase URI to default base directory (e.g. ., 
file:/K:/reports/xml/fonts/)
 * @param currentBase URI to current working directory (e.g. 
file:///C:/Temp/).
 * @param resolver Optional custom resolver.
 * @throws Exception on error.
 */
public final void setupFOP(final URI defaultBase, final URI currentBase, 
final ResourceResolver resolver) throws Exception {
if (fopConfig != null) {
if (resolver != null) {
fopFactoryBuilder = new FopFactoryBuilder(defaultBase, 
resolver);
} else {
fopFactoryBuilder = new FopFactoryBuilder(defaultBase);
}

fopFactoryBuilder.setConfiguration(fopConfig);
fopFactoryBuilder.setBaseURI(currentBase); //since FOP 2.0
//builder.setStrictFOValidation(false);
fopFactory = fopFactoryBuilder.build();
} else {
fopFactory = FopFactory.newInstance(currentBase);
}
foUserAgent = fopFactory.newFOUserAgent();
}//setupFOP()
--

... only to replace FOP 1.0 foUserAgent.setBaseURL() ... just because someone 
thought that this is not really required ... :-(


was (Author: mhilpert):
The missing foUserAgent.setBaseURL() (or setBaseURI()) is a major problem! Even 
calling it on the factory builder:

fopFactoryBuilder.setBaseURI(uriBase); //since FOP 2.0

is not enough: IllegalStateException: The final FOP Factory configuration has 
already been built

I have to setup complete FOP for each single document to get things working:

---
/**
 * Set current base directory.
 *
 * @param defaultBase URI to default base directory (e.g. ., 
file:/K:/reports/xml/fonts/)
 * @param currentBase URI to current working directory (e.g. 
file:///C:/Temp/).
 * @param resolver Optional custom resolver.
 * @throws Exception on error.
 */
public final void setupFOP(final URI defaultBase, final URI currentBase, 
final ResourceResolver resolver) throws Exception {
if (fopConfig != null) {
if (resolver != null) {
fopFactoryBuilder = new FopFactoryBuilder(defaultBase, 
resolver);
} else {
fopFactoryBuilder = new FopFactoryBuilder(defaultBase);
}

fopFactoryBuilder.setConfiguration(fopConfig);
fopFactoryBuilder.setBaseURI(currentBase); //since FOP 2.0
//builder.setStrictFOValidation(false);
fopFactory = fopFactoryBuilder.build();
} else {
fopFactory = FopFactory.newInstance(currentBase);
}
foUserAgent = fopFactory.newFOUserAgent();
}//setupFOP()
--

... only to replace FOP 1.0 foUserAgent.setBaseURL() ... just because someone 
thought that this is not really required ... :-(

 Embedding: missing migration documentation from FOP 1.x
 ---

 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker
  Labels: documentation

 Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
 has solved this bug (tested with standalone FOP scripts).
 Now we would like to upgrade our Java code from FOP 1.0 to FOP 2.0. The 
 Upgrading page (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says 
 You should encounter very few issues in upgrading from FOP 1.0, except as 
 noted in the following:  The truth is completely different: starting by 
 replacing fop.jar, our code gets dozens of compiler errors! Many methods are 
 simply gone:
 FopFactory.newInstance()
 FoUserAgent.setBaseURL(String);
 FopFactory.getFontManager().setFontBaseURL(String)
 FopFactory.setURIResolver(URIResolver);
 etc.
 The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
 how to replace old methods.
 The FOP 2.0 embedding page 
 (https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
 examples to 

[jira] [Commented] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-07 Thread MH (JIRA)

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

MH commented on FOP-2495:
-

The missing foUserAgent.setBaseURL() (or setBaseURI()) is a major problem! Even 
calling it on the factory builder:

fopFactoryBuilder.setBaseURI(uriBase); //since FOP 2.0

is not enough: IllegalStateException: The final FOP Factory configuration has 
already been built

I have to setup complete FOP for each single document to get things working:

---
/**
 * Set current base directory.
 *
 * @param defaultBase URI to default base directory (e.g. ., 
file:/K:/reports/xml/fonts/)
 * @param currentBase URI to current working directory (e.g. 
file:///C:/Temp/).
 * @param resolver Optional custom resolver.
 * @throws Exception on error.
 */
public final void setupFOP(final URI defaultBase, final URI currentBase, 
final ResourceResolver resolver) throws Exception {
if (fopConfig != null) {
if (resolver != null) {
fopFactoryBuilder = new FopFactoryBuilder(defaultBase, 
resolver);
} else {
fopFactoryBuilder = new FopFactoryBuilder(defaultBase);
}

fopFactoryBuilder.setConfiguration(fopConfig);
fopFactoryBuilder.setBaseURI(currentBase); //since FOP 2.0
//builder.setStrictFOValidation(false);
fopFactory = fopFactoryBuilder.build();
} else {
fopFactory = FopFactory.newInstance(currentBase);
}
foUserAgent = fopFactory.newFOUserAgent();
}//setupFOP()
--

only to replace FOP 1.0 foUserAgent.setBaseURL() ... :-(

 Embedding: missing migration documentation from FOP 1.x
 ---

 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker
  Labels: documentation

 Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
 has solved this bug (tested with standalone FOP scripts).
 Now we would like to upgrade our Java code from FOP 1.0 to FOP 2.0. The 
 Upgrading page (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says 
 You should encounter very few issues in upgrading from FOP 1.0, except as 
 noted in the following:  The truth is completely different: starting by 
 replacing fop.jar, our code gets dozens of compiler errors! Many methods are 
 simply gone:
 FopFactory.newInstance()
 FoUserAgent.setBaseURL(String);
 FopFactory.getFontManager().setFontBaseURL(String)
 FopFactory.setURIResolver(URIResolver);
 etc.
 The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
 how to replace old methods.
 The FOP 2.0 embedding page 
 (https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
 examples to start from the ground. I can't find any migration help how to 
 replace old code. 
 E.g. how can I set the font base? 
 FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find 
 any equivalent code for FOP 2.0!
 This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
 from FOP 1.x Java API to FOP 2.0!
 Now I just can search and try and experiment if I get our old code somehow 
 running with all those undocumented API changes. Can you please state a 
 migration documentation for all methods (method signatures) that don't exist 
 anymore? We can't start coding all over again from scratch. Thank you very 
 much!



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


[jira] [Commented] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-06 Thread MH (JIRA)

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

MH commented on FOP-2495:
-

Thanks for the hint, but even though I had some progress (my resolver get's 
fired), only parts work again. Other parts still don't work:

EVen though I log out all calls of my resolver's getResource() URIs, and adjust 
them to the paths of our app, we still get file not found errors - e.g. in the 
IFConcatenator:


111303024 SEVERE  SVG error: Image not found: 
file:1_4986/3_R_Result_40/C_PerfFigSer_M.svg
java.io.FileNotFoundException: Image not found: 
file:1_4986/3_R_Result_40/C_PerfFigSer_M.svg
at 
org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.needSource(AbstractImageSessionContext.java:193)
at 
org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:123)
at 
org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:123)
at 
org.apache.fop.svg.AbstractFOPImageElementBridge.createImageGraphicsNode(AbstractFOPImageElementBridge.java:78)
at 
org.apache.batik.bridge.SVGImageElementBridge.buildImageGraphicsNode(Unknown 
Source)
at 
org.apache.batik.bridge.SVGImageElementBridge.createGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
at 
org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:103)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingDocument(AbstractIFPainter.java:319)
at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:232)
at 
org.apache.fop.render.intermediate.IFParser$Handler$ImageHandler.endElement(IFParser.java:796)
at 
org.apache.fop.render.intermediate.IFParser$Handler.endElement(IFParser.java:413)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
at org.apache.xerces.parsers.AbstractSAXParser.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.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
at org.apache.fop.render.intermediate.IFParser.parse(IFParser.java:108)
at 
org.apache.fop.render.intermediate.util.IFConcatenator.appendDocument(IFConcatenator.java:106)
-

It seems that the resolver is not fired through FI concatenation!?


We also get thousands of font errors:

 Font FrutigerIC,normal,400 not found. Substituting with any,normal,400.

even though I set a fixed (correct) font-base URI in the config.

 Embedding: missing migration documentation from FOP 1.x
 ---

 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker
  Labels: documentation

 Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
 has solved this bug (tested with standalone FOP scripts).
 Now we would like to upgrade our Java code from FOP 1.0 to FOP 2.0. The 
 Upgrading page (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says 
 You should encounter very few issues in upgrading from FOP 1.0, except as 
 noted in the following:  The truth is completely different: starting by 
 replacing fop.jar, our code gets dozens of compiler errors! Many methods are 
 simply gone:
 FopFactory.newInstance()
 FoUserAgent.setBaseURL(String);
 FopFactory.getFontManager().setFontBaseURL(String)
 FopFactory.setURIResolver(URIResolver);
 etc.
 The javadocs from 1.1 to 2.0 simple 

[jira] [Comment Edited] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-06 Thread MH (JIRA)

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

MH edited comment on FOP-2495 at 7/6/15 1:14 PM:
-

Thanks for the hint, but even though I had some progress (my resolver get's 
fired), only parts work again. Other parts still don't work:

EVen though I log out all calls of my resolver's getResource() URIs, and adjust 
them to the paths of our app, we still get file not found errors - e.g. in the 
IFConcatenator:


111303024 SEVERE  SVG error: Image not found: 
file:1_4986/3_R_Result_40/C_PerfFigSer_M.svg
java.io.FileNotFoundException: Image not found: 
file:1_4986/3_R_Result_40/C_PerfFigSer_M.svg
at 
org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.needSource(AbstractImageSessionContext.java:193)
at 
org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:123)
at 
org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:123)
at 
org.apache.fop.svg.AbstractFOPImageElementBridge.createImageGraphicsNode(AbstractFOPImageElementBridge.java:78)
at 
org.apache.batik.bridge.SVGImageElementBridge.buildImageGraphicsNode(Unknown 
Source)
at 
org.apache.batik.bridge.SVGImageElementBridge.createGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
at 
org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:103)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingDocument(AbstractIFPainter.java:319)
at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:232)
at 
org.apache.fop.render.intermediate.IFParser$Handler$ImageHandler.endElement(IFParser.java:796)
at 
org.apache.fop.render.intermediate.IFParser$Handler.endElement(IFParser.java:413)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
at org.apache.xerces.parsers.AbstractSAXParser.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.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
at org.apache.fop.render.intermediate.IFParser.parse(IFParser.java:108)
at 
org.apache.fop.render.intermediate.util.IFConcatenator.appendDocument(IFConcatenator.java:106)
-

It seems that the resolver is not fired through FI concatenation!? It worked in 
FOP 1.0.
I worked around it by adding an additional XMLHandler to replace paths in the 
IF-XML-FIles. :-(

###

We also get thousands of font errors:

 Font FrutigerIC,normal,400 not found. Substituting with any,normal,400.

even though I set a fixed (correct) font-base URI in the config. I can't find 
anything wrong or different on the Apache Font pages for FOP 2.0 compared to 
FOP 1.1. Except setting an explizit absolut path (URI) for font-base. But FOP 
2.0 still doesn't find the fonts.
What else changed in FOP 2.0 concerning the FONT resolvement?


was (Author: mhilpert):
Thanks for the hint, but even though I had some progress (my resolver get's 
fired), only parts work again. Other parts still don't work:

EVen though I log out all calls of my resolver's getResource() URIs, and adjust 
them to the paths of our app, we still get file not found errors - e.g. in the 
IFConcatenator:


111303024 SEVERE  SVG error: Image not found: 
file:1_4986/3_R_Result_40/C_PerfFigSer_M.svg
java.io.FileNotFoundException: Image not found: 
file:1_4986/3_R_Result_40/C_PerfFigSer_M.svg
at 
org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.needSource(AbstractImageSessionContext.java:193)
at 

[jira] [Commented] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-06 Thread MH (JIRA)

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

MH commented on FOP-2495:
-

For the last font Problem I also found a very ugly workaround: I had to read 
the configuration , get the value of font-base and set it during the 
FopFactoryBuilder construction:

--
/**
 * Set up new FOP factory with a configuartion file.
 *
 * @param defaultBaseURI Base URI to read user config file (e.g. 
\\PC1\instDir\reports\xml\fonts).
 * @param userConfigFile (e.g. userconfig.xml)
 * @param resolver Custom resolver.
 * @param uri URI of current working path..
 * @throws Exception on error.
 */
public final void setUserConfigFile(final File defaultBaseURI, final File 
userConfigFile, final ResourceResolver resolver, final URI uri) throws 
Exception {
if (userConfigFile != null) {
DefaultConfigurationBuilder cfgBuilder = new 
DefaultConfigurationBuilder();
Configuration cfg = cfgBuilder.buildFromFile(userConfigFile);

//read font-base from configuration file:
URI fontBase = defaultBaseURI.toURI(); //default (e.g. 
file:PC1/instDir/reports/xml/fonts/) - network shares doesn't work!
Configuration[] cfgs = cfg.getChildren();
for (final Configuration c : cfgs) { //e.g. base, font-base, 
source-resolution, target-resolution, default-page-settings, renderers
if (font-base.equals(c.getName())) {
String v = c.getValue(); //has to be a URI!
fontBase = URI.create(v); //e.g. 
file:///K:/reports/xml/fonts/
break;
}
}

if (resolver != null) {
builder = new FopFactoryBuilder(fontBase, resolver);
} else {
builder = new FopFactoryBuilder(fontBase);
}
builder.setConfiguration(cfg);
builder.setBaseURI(uri); //since FOP 2.0
//builder.setStrictFOValidation(false);
fopFactory = builder.build();
} else {
fopFactory = FopFactory.newInstance(new File(.).toURI());
}

foUserAgent = fopFactory.newFOUserAgent();
}//setUserConfigFile()
---

This is so ugly, I wonder how FOP 2.0 has so many things made worse! But it's 
still not like FOP 1.0 - now we get lots of errors and warnings for some fonts, 
e.g.

--
...
lte50058.AFM: named character 'quoteright' has an incorrect code point: 146. 
Changed to 39
...
   java.lang.RuntimeException: SVG graphic could not be built. Reason: 
java.lang.RuntimeException: SVG error: The font PMN_Caecilia_45_Light.ttf is 
not embeddable due to a licensing restriction.
...
-

that we didn't get with FOP 1.0 (for the very same font files, of course).


 Embedding: missing migration documentation from FOP 1.x
 ---

 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker
  Labels: documentation

 Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
 has solved this bug (tested with standalone FOP scripts).
 Now we would like to upgrade our Java code from FOP 1.0 to FOP 2.0. The 
 Upgrading page (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says 
 You should encounter very few issues in upgrading from FOP 1.0, except as 
 noted in the following:  The truth is completely different: starting by 
 replacing fop.jar, our code gets dozens of compiler errors! Many methods are 
 simply gone:
 FopFactory.newInstance()
 FoUserAgent.setBaseURL(String);
 FopFactory.getFontManager().setFontBaseURL(String)
 FopFactory.setURIResolver(URIResolver);
 etc.
 The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
 how to replace old methods.
 The FOP 2.0 embedding page 
 (https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
 examples to start from the ground. I can't find any migration help how to 
 replace old code. 
 E.g. how can I set the font base? 
 FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find 
 any equivalent code for FOP 2.0!
 This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
 from FOP 1.x Java API to FOP 2.0!
 Now I just can search and try and experiment if I get our old code somehow 
 running with all those undocumented API changes. Can you please state a 
 migration documentation for all methods (method signatures) that don't exist 
 anymore? We can't start coding all over 

[jira] [Comment Edited] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-06 Thread MH (JIRA)

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

MH edited comment on FOP-2495 at 7/6/15 4:09 PM:
-

For the last font Problem I also found a very ugly workaround: I had to read 
the configuration , get the value of font-base and set it during the 
FopFactoryBuilder construction:

--
/**
 * Set up new FOP factory with a configuartion file.
 *
 * @param defaultBaseURI Base URI to read user config file (e.g. 
\\PC1\instDir\reports\xml\fonts).
 * @param userConfigFile (e.g. userconfig.xml)
 * @param resolver Custom resolver.
 * @param uri URI of current working path..
 * @throws Exception on error.
 */
public final void setUserConfigFile(final File defaultBaseURI, final File 
userConfigFile, final ResourceResolver resolver, final URI uri) throws 
Exception {
if (userConfigFile != null) {
DefaultConfigurationBuilder cfgBuilder = new 
DefaultConfigurationBuilder();
Configuration cfg = cfgBuilder.buildFromFile(userConfigFile);

//read font-base from configuration file:
URI fontBase = defaultBaseURI.toURI(); //default (e.g. 
file:PC1/instDir/reports/xml/fonts/) - network shares doesn't work!
Configuration[] cfgs = cfg.getChildren();
for (final Configuration c : cfgs) { //e.g. base, font-base, 
source-resolution, target-resolution, default-page-settings, renderers
if (font-base.equals(c.getName())) {
String v = c.getValue(); //has to be a URI!
fontBase = URI.create(v); //e.g. 
file:///K:/reports/xml/fonts/
break;
}
}

if (resolver != null) {
builder = new FopFactoryBuilder(fontBase, resolver);
} else {
builder = new FopFactoryBuilder(fontBase);
}
builder.setConfiguration(cfg);
builder.setBaseURI(uri); //since FOP 2.0
//builder.setStrictFOValidation(false);
fopFactory = builder.build();
} else {
fopFactory = FopFactory.newInstance(new File(.).toURI());
}

foUserAgent = fopFactory.newFOUserAgent();
}//setUserConfigFile()
---

This is so ugly, I wonder how FOP 2.0 has so many things made worse! But it's 
still not like FOP 1.0 - now we get lots of errors and warnings for some fonts, 
e.g.

--
...
lte50058.AFM: named character 'quoteright' has an incorrect code point: 146. 
Changed to 39
...
   java.lang.RuntimeException: SVG graphic could not be built. Reason: 
java.lang.RuntimeException: SVG error: The font PMN_Caecilia_45_Light.ttf is 
not embeddable due to a licensing restriction.
...
-

that we didn't get with FOP 1.0 (for the very same font files, of course). I 
also had to give up our windows networkshare names because FOP does vreak them 
up: even thoug

URI fontBase = defaultBaseURI.toURI(); 

creates the correct and valid URI file:PC1/instDir/reports, we get errors:


java.io.FileNotFoundException: \PC1\instDir\reports\xml\fonts\LTe50327.ttf 
(Das System kann den angegebenen Pfad nicht finden)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.init(FileInputStream.java:138)
at java.io.FileInputStream.init(FileInputStream.java:93)
at 
sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at 
sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at java.net.URL.openStream(URL.java:1038)
at 
org.apache.fop.apps.io.ResourceResolverFactory$NormalResourceResolver.getResource(ResourceResolverFactory.java:224)
-
 If we use Windows paths with local letters like K:/instDir/reports, 
everything works. But this makes path configuration worse, as a Windows Share 
directory can't be used anymore! As a workaround I have to copy the fonts 
directory to each app server to be correctly read with windows letters. Is this 
an open bug or is this another not supported anymore feature of FOP 2.0?





was (Author: mhilpert):
For the last font Problem I also found a very ugly workaround: I had to read 
the configuration , get the value of font-base and set it during the 
FopFactoryBuilder construction:

--
/**
 * Set up new FOP factory with a configuartion file.
 *
 * @param defaultBaseURI Base URI to read user config file (e.g. 
\\PC1\instDir\reports\xml\fonts).
 * @param userConfigFile (e.g. userconfig.xml)
 * @param resolver Custom resolver.
 * @param uri URI of current working path..
 * @throws Exception on 

[jira] [Comment Edited] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-03 Thread MH (JIRA)

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

MH edited comment on FOP-2495 at 7/3/15 2:45 PM:
-

E.g. URIResolver: FOP 1.0:

   FoUserAgent.setURIResolver(javax.xml.transform.URIResolver)

In FOP 2.0 (https://xmlgraphics.apache.org/fop/2.0/embedding.html): 

-
Set a URIResolver for custom URI resolution. By supplying a JAXP URIResolver 
you can add custom URI resolution functionality to FOP. For example:

// myResourceResolver is a org.apache.xmlgraphics.io.ResourceResolver
FopFactoryBuilder builder = new FopFactoryBuilder(baseURI, myResourceResolver);


... but FopFactoryBuilder does not accept  javax.xml.transform.URIResolver but 
requires a org.apache.xmlgraphics.io.ResourceResolver  that is an interface ... 
probably org.apache.fop.apps.io.InternalResourceResolver that has no API to use 
a javax.xml.transform.URIResolver

Can you please submit an example to set an URIResolver just like 

FoUserAgent.setURIResolver()

in FOP 1.0/1.1? Thank you!


was (Author: mhilpert):
E.g. URIResolver: FOP 1.0:

   FoUserAgent.setURIResolver(javax.xml.transform.URIResolver)

In FOP 2.0 (https://xmlgraphics.apache.org/fop/2.0/embedding.html): 

-
Set a URIResolver for custom URI resolution. By supplying a JAXP URIResolver 
you can add custom URI resolution functionality to FOP. For example:

// myResourceResolver is a org.apache.xmlgraphics.io.ResourceResolver
FopFactoryBuilder builder = new FopFactoryBuilder(baseURI, myResourceResolver);


... but FopFactoryBuilder does not accept  javax.xml.transform.URIResolver but 
requires a org.apache.xmlgraphics.io.ResourceResolver  that is an interface ... 
probably org.apache.fop.apps.io.InternalResourceResolver that has no API to use 
a javax.xml.transform.URIResolver

Oh boy ...

 Embedding: missing migration documentation from FOP 1.x
 ---

 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker
  Labels: documentation

 Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
 has solved this bug (tested with standalone FOP scripts).
 Now we would like to upgrade our Java code from FOP 1.0 to FOP 2.0. The 
 Upgrading page (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says 
 You should encounter very few issues in upgrading from FOP 1.0, except as 
 noted in the following:  The truth is completely different: starting by 
 replacing fop.jar, our code gets dozens of compiler errors! Many methods are 
 simply gone:
 FopFactory.newInstance()
 FoUserAgent.setBaseURL(String);
 FopFactory.getFontManager().setFontBaseURL(String)
 FopFactory.setURIResolver(URIResolver);
 etc.
 The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
 how to replace old methods.
 The FOP 2.0 embedding page 
 (https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
 examples to start from the ground. I can't find any migration help how to 
 replace old code. 
 E.g. how can I set the font base? 
 FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find 
 any equivalent code for FOP 2.0!
 This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
 from FOP 1.x Java API to FOP 2.0!
 Now I just can search and try and experiment if I get our old code somehow 
 running with all those undocumented API changes. Can you please state a 
 migration documentation for all methods (method signatures) that don't exist 
 anymore? We can't start coding all over again from scratch. Thank you very 
 much!



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


[jira] [Created] (FOP-2495) Missing migration documentation from FOP 1.x

2015-07-02 Thread MH (JIRA)
MH created FOP-2495:
---

 Summary: Missing migration documentation from FOP 1.x
 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker


Because of bug FOP-2177 wie couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
has solved this bug (tested with standalone FOP scripts).

Now we would like to upgrade from FOP 1.0 to FOP 2.0. The Upgrading page 
(https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says You should 
encounter very few issues in upgrading from FOP 1.0, except as noted in the 
following:  The truth is completely different: starting by replacing 
fop.jar, our code gets dozens of compiler errors! Many methods are simply gone:

FopFactory.newInstance()
FoUserAgent.setBaseURL(String);
FopFactory.getFontManager().setFontBaseURL(String)
FopFactory.setURIResolver(URIResolver);
etc.

The javadocs from 1.1 to 2.0 simple changed - now deprecated methods, no hints 
how to replace old methods.

The FOP 2.0 embedding page 
(https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
examples to start from the ground. I can't find any migration help how to 
replace old code. 

E.g. how can I set the font base? 
FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find any 
equivalent code for FOP 2.0!

This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
from FOP 1.x Java API to FOP 2.0!

Now I just can search and try and experiment if I get our old code somehow 
running with all those undocumented API changes. Can you please state a 
migration documentation for all methods (method signatures) that don't exist 
anymore? We can't start coding all over again from scratch. Thank you very much!







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


[jira] [Updated] (FOP-2495) Missing migration documentation from FOP 1.x

2015-07-02 Thread MH (JIRA)

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

MH updated FOP-2495:

Description: 
Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
has solved this bug (tested with standalone FOP scripts).

Now we would like to upgrade from FOP 1.0 to FOP 2.0. The Upgrading page 
(https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says You should 
encounter very few issues in upgrading from FOP 1.0, except as noted in the 
following:  The truth is completely different: starting by replacing 
fop.jar, our code gets dozens of compiler errors! Many methods are simply gone:

FopFactory.newInstance()
FoUserAgent.setBaseURL(String);
FopFactory.getFontManager().setFontBaseURL(String)
FopFactory.setURIResolver(URIResolver);
etc.

The javadocs from 1.1 to 2.0 simple changed - now deprecated methods, no hints 
how to replace old methods.

The FOP 2.0 embedding page 
(https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
examples to start from the ground. I can't find any migration help how to 
replace old code. 

E.g. how can I set the font base? 
FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find any 
equivalent code for FOP 2.0!

This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
from FOP 1.x Java API to FOP 2.0!

Now I just can search and try and experiment if I get our old code somehow 
running with all those undocumented API changes. Can you please state a 
migration documentation for all methods (method signatures) that don't exist 
anymore? We can't start coding all over again from scratch. Thank you very much!





  was:
Because of bug FOP-2177 wie couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
has solved this bug (tested with standalone FOP scripts).

Now we would like to upgrade from FOP 1.0 to FOP 2.0. The Upgrading page 
(https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says You should 
encounter very few issues in upgrading from FOP 1.0, except as noted in the 
following:  The truth is completely different: starting by replacing 
fop.jar, our code gets dozens of compiler errors! Many methods are simply gone:

FopFactory.newInstance()
FoUserAgent.setBaseURL(String);
FopFactory.getFontManager().setFontBaseURL(String)
FopFactory.setURIResolver(URIResolver);
etc.

The javadocs from 1.1 to 2.0 simple changed - now deprecated methods, no hints 
how to replace old methods.

The FOP 2.0 embedding page 
(https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
examples to start from the ground. I can't find any migration help how to 
replace old code. 

E.g. how can I set the font base? 
FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find any 
equivalent code for FOP 2.0!

This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
from FOP 1.x Java API to FOP 2.0!

Now I just can search and try and experiment if I get our old code somehow 
running with all those undocumented API changes. Can you please state a 
migration documentation for all methods (method signatures) that don't exist 
anymore? We can't start coding all over again from scratch. Thank you very much!






 Missing migration documentation from FOP 1.x
 

 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker
  Labels: documentation

 Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
 has solved this bug (tested with standalone FOP scripts).
 Now we would like to upgrade from FOP 1.0 to FOP 2.0. The Upgrading page 
 (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says You should 
 encounter very few issues in upgrading from FOP 1.0, except as noted in the 
 following:  The truth is completely different: starting by replacing 
 fop.jar, our code gets dozens of compiler errors! Many methods are simply 
 gone:
 FopFactory.newInstance()
 FoUserAgent.setBaseURL(String);
 FopFactory.getFontManager().setFontBaseURL(String)
 FopFactory.setURIResolver(URIResolver);
 etc.
 The javadocs from 1.1 to 2.0 simple changed - now deprecated methods, no 
 hints how to replace old methods.
 The FOP 2.0 embedding page 
 (https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
 examples to start from the ground. I can't find any migration help how to 
 replace old code. 
 E.g. how can I set the font base? 
 FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find 
 any equivalent code for FOP 2.0!
 This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
 from FOP 1.x Java API to FOP 2.0!
 Now I 

[jira] [Updated] (FOP-2495) Missing migration documentation from FOP 1.x

2015-07-02 Thread MH (JIRA)

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

MH updated FOP-2495:

Description: 
Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
has solved this bug (tested with standalone FOP scripts).

Now we would like to upgrade our Java code from FOP 1.0 to FOP 2.0. The 
Upgrading page (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says 
You should encounter very few issues in upgrading from FOP 1.0, except as 
noted in the following:  The truth is completely different: starting by 
replacing fop.jar, our code gets dozens of compiler errors! Many methods are 
simply gone:

FopFactory.newInstance()
FoUserAgent.setBaseURL(String);
FopFactory.getFontManager().setFontBaseURL(String)
FopFactory.setURIResolver(URIResolver);
etc.

The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
how to replace old methods.

The FOP 2.0 embedding page 
(https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
examples to start from the ground. I can't find any migration help how to 
replace old code. 

E.g. how can I set the font base? 
FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find any 
equivalent code for FOP 2.0!

This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
from FOP 1.x Java API to FOP 2.0!

Now I just can search and try and experiment if I get our old code somehow 
running with all those undocumented API changes. Can you please state a 
migration documentation for all methods (method signatures) that don't exist 
anymore? We can't start coding all over again from scratch. Thank you very much!





  was:
Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
has solved this bug (tested with standalone FOP scripts).

Now we would like to upgrade from FOP 1.0 to FOP 2.0. The Upgrading page 
(https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says You should 
encounter very few issues in upgrading from FOP 1.0, except as noted in the 
following:  The truth is completely different: starting by replacing 
fop.jar, our code gets dozens of compiler errors! Many methods are simply gone:

FopFactory.newInstance()
FoUserAgent.setBaseURL(String);
FopFactory.getFontManager().setFontBaseURL(String)
FopFactory.setURIResolver(URIResolver);
etc.

The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
how to replace old methods.

The FOP 2.0 embedding page 
(https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
examples to start from the ground. I can't find any migration help how to 
replace old code. 

E.g. how can I set the font base? 
FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find any 
equivalent code for FOP 2.0!

This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
from FOP 1.x Java API to FOP 2.0!

Now I just can search and try and experiment if I get our old code somehow 
running with all those undocumented API changes. Can you please state a 
migration documentation for all methods (method signatures) that don't exist 
anymore? We can't start coding all over again from scratch. Thank you very much!






 Missing migration documentation from FOP 1.x
 

 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker
  Labels: documentation

 Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
 has solved this bug (tested with standalone FOP scripts).
 Now we would like to upgrade our Java code from FOP 1.0 to FOP 2.0. The 
 Upgrading page (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says 
 You should encounter very few issues in upgrading from FOP 1.0, except as 
 noted in the following:  The truth is completely different: starting by 
 replacing fop.jar, our code gets dozens of compiler errors! Many methods are 
 simply gone:
 FopFactory.newInstance()
 FoUserAgent.setBaseURL(String);
 FopFactory.getFontManager().setFontBaseURL(String)
 FopFactory.setURIResolver(URIResolver);
 etc.
 The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
 how to replace old methods.
 The FOP 2.0 embedding page 
 (https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
 examples to start from the ground. I can't find any migration help how to 
 replace old code. 
 E.g. how can I set the font base? 
 FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find 
 any equivalent code for FOP 2.0!
 This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
 from FOP 1.x Java 

[jira] [Updated] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-02 Thread MH (JIRA)

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

MH updated FOP-2495:

Summary: Embedding: missing migration documentation from FOP 1.x  (was: 
Missing migration documentation from FOP 1.x)

 Embedding: missing migration documentation from FOP 1.x
 ---

 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker
  Labels: documentation

 Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
 has solved this bug (tested with standalone FOP scripts).
 Now we would like to upgrade our Java code from FOP 1.0 to FOP 2.0. The 
 Upgrading page (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says 
 You should encounter very few issues in upgrading from FOP 1.0, except as 
 noted in the following:  The truth is completely different: starting by 
 replacing fop.jar, our code gets dozens of compiler errors! Many methods are 
 simply gone:
 FopFactory.newInstance()
 FoUserAgent.setBaseURL(String);
 FopFactory.getFontManager().setFontBaseURL(String)
 FopFactory.setURIResolver(URIResolver);
 etc.
 The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
 how to replace old methods.
 The FOP 2.0 embedding page 
 (https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
 examples to start from the ground. I can't find any migration help how to 
 replace old code. 
 E.g. how can I set the font base? 
 FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find 
 any equivalent code for FOP 2.0!
 This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
 from FOP 1.x Java API to FOP 2.0!
 Now I just can search and try and experiment if I get our old code somehow 
 running with all those undocumented API changes. Can you please state a 
 migration documentation for all methods (method signatures) that don't exist 
 anymore? We can't start coding all over again from scratch. Thank you very 
 much!



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


[jira] [Updated] (FOP-2495) Missing migration documentation from FOP 1.x

2015-07-02 Thread MH (JIRA)

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

MH updated FOP-2495:

Description: 
Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
has solved this bug (tested with standalone FOP scripts).

Now we would like to upgrade from FOP 1.0 to FOP 2.0. The Upgrading page 
(https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says You should 
encounter very few issues in upgrading from FOP 1.0, except as noted in the 
following:  The truth is completely different: starting by replacing 
fop.jar, our code gets dozens of compiler errors! Many methods are simply gone:

FopFactory.newInstance()
FoUserAgent.setBaseURL(String);
FopFactory.getFontManager().setFontBaseURL(String)
FopFactory.setURIResolver(URIResolver);
etc.

The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
how to replace old methods.

The FOP 2.0 embedding page 
(https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
examples to start from the ground. I can't find any migration help how to 
replace old code. 

E.g. how can I set the font base? 
FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find any 
equivalent code for FOP 2.0!

This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
from FOP 1.x Java API to FOP 2.0!

Now I just can search and try and experiment if I get our old code somehow 
running with all those undocumented API changes. Can you please state a 
migration documentation for all methods (method signatures) that don't exist 
anymore? We can't start coding all over again from scratch. Thank you very much!





  was:
Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
has solved this bug (tested with standalone FOP scripts).

Now we would like to upgrade from FOP 1.0 to FOP 2.0. The Upgrading page 
(https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says You should 
encounter very few issues in upgrading from FOP 1.0, except as noted in the 
following:  The truth is completely different: starting by replacing 
fop.jar, our code gets dozens of compiler errors! Many methods are simply gone:

FopFactory.newInstance()
FoUserAgent.setBaseURL(String);
FopFactory.getFontManager().setFontBaseURL(String)
FopFactory.setURIResolver(URIResolver);
etc.

The javadocs from 1.1 to 2.0 simple changed - now deprecated methods, no hints 
how to replace old methods.

The FOP 2.0 embedding page 
(https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
examples to start from the ground. I can't find any migration help how to 
replace old code. 

E.g. how can I set the font base? 
FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find any 
equivalent code for FOP 2.0!

This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
from FOP 1.x Java API to FOP 2.0!

Now I just can search and try and experiment if I get our old code somehow 
running with all those undocumented API changes. Can you please state a 
migration documentation for all methods (method signatures) that don't exist 
anymore? We can't start coding all over again from scratch. Thank you very much!






 Missing migration documentation from FOP 1.x
 

 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker
  Labels: documentation

 Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
 has solved this bug (tested with standalone FOP scripts).
 Now we would like to upgrade from FOP 1.0 to FOP 2.0. The Upgrading page 
 (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says You should 
 encounter very few issues in upgrading from FOP 1.0, except as noted in the 
 following:  The truth is completely different: starting by replacing 
 fop.jar, our code gets dozens of compiler errors! Many methods are simply 
 gone:
 FopFactory.newInstance()
 FoUserAgent.setBaseURL(String);
 FopFactory.getFontManager().setFontBaseURL(String)
 FopFactory.setURIResolver(URIResolver);
 etc.
 The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
 how to replace old methods.
 The FOP 2.0 embedding page 
 (https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
 examples to start from the ground. I can't find any migration help how to 
 replace old code. 
 E.g. how can I set the font base? 
 FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find 
 any equivalent code for FOP 2.0!
 This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
 from FOP 1.x Java API to FOP 2.0!
 Now I just 

[jira] [Commented] (FOP-2495) Embedding: missing migration documentation from FOP 1.x

2015-07-02 Thread MH (JIRA)

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

MH commented on FOP-2495:
-

E.g. URIResolver: FOP 1.0:

   FoUserAgent.setURIResolver(javax.xml.transform.URIResolver)

In FOP 2.0 (https://xmlgraphics.apache.org/fop/2.0/embedding.html): 

-
Set a URIResolver for custom URI resolution. By supplying a JAXP URIResolver 
you can add custom URI resolution functionality to FOP. For example:

// myResourceResolver is a org.apache.xmlgraphics.io.ResourceResolver
FopFactoryBuilder builder = new FopFactoryBuilder(baseURI, myResourceResolver);


... but FopFactoryBuilder does not accept  javax.xml.transform.URIResolver but 
requires a org.apache.xmlgraphics.io.ResourceResolver  that is an interface ... 
probably org.apache.fop.apps.io.InternalResourceResolver that has no API to use 
a javax.xml.transform.URIResolver

Oh boy ...

 Embedding: missing migration documentation from FOP 1.x
 ---

 Key: FOP-2495
 URL: https://issues.apache.org/jira/browse/FOP-2495
 Project: FOP
  Issue Type: Bug
  Components: documentation
Affects Versions: 2.0
 Environment: WIndows, Java 8, FOP 1.0
Reporter: MH
Priority: Blocker
  Labels: documentation

 Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
 has solved this bug (tested with standalone FOP scripts).
 Now we would like to upgrade our Java code from FOP 1.0 to FOP 2.0. The 
 Upgrading page (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says 
 You should encounter very few issues in upgrading from FOP 1.0, except as 
 noted in the following:  The truth is completely different: starting by 
 replacing fop.jar, our code gets dozens of compiler errors! Many methods are 
 simply gone:
 FopFactory.newInstance()
 FoUserAgent.setBaseURL(String);
 FopFactory.getFontManager().setFontBaseURL(String)
 FopFactory.setURIResolver(URIResolver);
 etc.
 The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
 how to replace old methods.
 The FOP 2.0 embedding page 
 (https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
 examples to start from the ground. I can't find any migration help how to 
 replace old code. 
 E.g. how can I set the font base? 
 FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find 
 any equivalent code for FOP 2.0!
 This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
 from FOP 1.x Java API to FOP 2.0!
 Now I just can search and try and experiment if I get our old code somehow 
 running with all those undocumented API changes. Can you please state a 
 migration documentation for all methods (method signatures) that don't exist 
 anymore? We can't start coding all over again from scratch. Thank you very 
 much!



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


[jira] [Commented] (FOP-2177) [PATCH] If a right aligned image exceeds a table cells bounds, it will overflow in the wrong direction

2013-03-04 Thread MH (JIRA)

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

MH commented on FOP-2177:
-

@Glenn: here is an example:

--
?xml version=1.0 encoding=UTF-8?fo:root 
xmlns:fo=http://www.w3.org/1999/XSL/Format;fo:layout-master-setfo:simple-page-master
 master-name=normaleSeite
page-width=21cm 
page-height=29.7cm 
margin-top=1cm 
margin-bottom=2cm 
margin-left=2.5cm 
margin-right=2.5cmgt; 
fo:region-body margin-top=3cm/fo:region-before 
extent=3cm/fo:region-after 
extent=1.5cm//fo:simple-page-master/fo:layout-master-setfo:page-sequence
 master-reference=normaleSeitefo:flow flow-name=xsl-region-bodyfo:table 
width=80mm table-layout=fixedfo:table-column number-columns-repeated=3 
border=0.5pt solid black column-width=20mm/fo:table-bodyfo:table-row 
height=1cm border=0.5pt solid blackfo:table-cellfo:block 
text-align=rightb/fo:block/fo:table-cellfo:table-cellfo:block 
text-align=rightTEST_TETS_TEST/fo:block/fo:table-cellfo:table-cellfo:block
 
text-align=rightd/fo:block/fo:table-cell/fo:table-row/fo:table-body/fo:table/fo:flow/fo:page-sequence/fo:root


 [PATCH] If a right aligned image exceeds a table cells bounds, it will 
 overflow in the wrong direction
 --

 Key: FOP-2177
 URL: https://issues.apache.org/jira/browse/FOP-2177
 Project: Fop
  Issue Type: Bug
  Components: page-master/layout
Affects Versions: trunk
Reporter: Robert Meyer
Assignee: Robert Meyer
Priority: Minor
 Fix For: trunk

 Attachments: house_blank.gif, output-old.pdf, output-trunk.pdf, 
 patch.diff, test.fo




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (FOP-2177) [PATCH] If a right aligned image exceeds a table cells bounds, it will overflow in the wrong direction

2013-02-22 Thread MH (JIRA)

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

MH commented on FOP-2177:
-

Similar problem with text: if text is bigger than the cell, the text is written 
outside the right border of the cell - even though it's defined as right 
aligned. With FOP 1.0 the text is written outside the left border.

 [PATCH] If a right aligned image exceeds a table cells bounds, it will 
 overflow in the wrong direction
 --

 Key: FOP-2177
 URL: https://issues.apache.org/jira/browse/FOP-2177
 Project: Fop
  Issue Type: Bug
  Components: page-master/layout
Affects Versions: trunk
Reporter: Robert Meyer
Assignee: Robert Meyer
Priority: Minor
 Fix For: trunk

 Attachments: house_blank.gif, output-old.pdf, output-trunk.pdf, 
 patch.diff, test.fo




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Comment Edited] (FOP-2177) [PATCH] If a right aligned image exceeds a table cells bounds, it will overflow in the wrong direction

2013-02-22 Thread MH (JIRA)

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

MH edited comment on FOP-2177 at 2/22/13 1:56 PM:
--

Similar problem with text: if text is bigger than the cell, the text is written 
outside the right border of the cell - even though it's defined as right 
aligned. With FOP 1.0 the text is written outside the left border.

But this is a show stopper, so the priority (to force a new FOP release) should 
be higher.

  was (Author: mhilpert):
Similar problem with text: if text is bigger than the cell, the text is 
written outside the right border of the cell - even though it's defined as 
right aligned. With FOP 1.0 the text is written outside the left border.
  
 [PATCH] If a right aligned image exceeds a table cells bounds, it will 
 overflow in the wrong direction
 --

 Key: FOP-2177
 URL: https://issues.apache.org/jira/browse/FOP-2177
 Project: Fop
  Issue Type: Bug
  Components: page-master/layout
Affects Versions: trunk
Reporter: Robert Meyer
Assignee: Robert Meyer
Priority: Minor
 Fix For: trunk

 Attachments: house_blank.gif, output-old.pdf, output-trunk.pdf, 
 patch.diff, test.fo




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (FOP-2185) Set PDF version not only in config file but embedded via API.

2013-01-16 Thread MH (JIRA)
MH created FOP-2185:
---

 Summary: Set PDF version not only in config file but embedded via 
API.
 Key: FOP-2185
 URL: https://issues.apache.org/jira/browse/FOP-2185
 Project: Fop
  Issue Type: Improvement
  Components: general
Affects Versions: 1.1
 Environment: ORACLE Java 1.7.0_11, Apache FOP 1.1
Reporter: MH
Priority: Trivial


FOP 1.1 supports PDF Version in the user config file:

renderer mime=application/pdf
version1.5/version

It would be very helpful to also be able to overwrite this e.g. in the 
FopFactory or in the UserAgent (either explicit method or a RendererOption). 
This would offer misc PDF Versions dependen on Document creation parameters.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira