Re: FOP 1.1 to 2.0 Migration Guidance?!?

2015-06-11 Thread Chris Bowditch

Hi Jesse,

The only difficult part of that code is the Font Base URL. Do you really 
need a font base URI that's different from the global base URI? Assuming 
you can just set Base URL instead, there is a sample on the embedding 
page that's quite similar to below, i.e.


DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
Configuration cfg = cfgBuilder.buildFromFile(new 
File("C:/Temp/mycfg.xml")); // swap the file here for fopConfig in your code
fopFactoryBuilder = new 
FopFactoryBuilder(baseURI).setConfiguration(cfg); // swap baseURI for 
your own base URI


If you do need a different font base URI to the global base URI then it 
might be possible with custom resolver for the Font Manager, but since 
I've not done that before I'm not 100% certain about that.


Thanks,

Chris

On 08/06/2015 15:40, Jess Holle wrote:

Okay, it's now clear that I could have just done:
   FopFactory  fopFactory = FopFactory.newInstance( baseURI );
That said, now I have code doing:
   FopFactory fopFactory = FopFactory.newInstance();
   String strFontbase = getFontbaseLocation();
   File fopConfig = getConfigFile();
   if (fopConfig.exists() && strFontbase != null){
 fopFactory.setFontBaseURL(strFontbase);
 fopFactory.setUserConfig(fopConfig);
   }
And once again, it is unclear how to convert this to the 2.0 APIs.

--
Jess Holle

On 6/8/2015 9:03 AM, Jess Holle wrote:

Okay, perhaps I over-reacted a bit as it seems one can do:
   FopFactoryBuilder  fopFactoryBuilder = new FopFactoryBuilder( baseURI );
   FopFactory  fopFactory = fopFactoryBuilder.build();
and then have the remainder of the API work much as it used to (apart 
from FOUserAgent lacking any API for setting the base URI).


Simple guidance to this effect would have been quite helpful, though!

On 6/8/2015 7:52 AM, Jess Holle wrote:
So I downloaded FOP 2.0 to use in place of 1.x for embedded use in 
creating PDFs from XSL-FO within Java server code.


Unfortunately:

 1. The extremely simple code using FOP 1.x does not compile with 2.0
  * No big deal but
 2. It is unclear how one should modify 1.x code to use 2.0 APIs
 3. There appears to be no migration guidance in the documentation
whatsoever
  * This is the real kicker -- given #2.

This issue starts with the very first line of FOP 1.x API calls:

FopFactory ff = org.apache.fop.apps.FopFactory.newInstance();

What's the replacement for this line?  It's completely unclear from 
the documentation.


Any assistance here would be greatly appreciated.

--
Jess Holle 





-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: floats

2015-06-11 Thread Michał Jaworski
can it be considered as a part of XSL 1.1 spec? You are right that 
wrapping is not necessary but still mirror (outer) placement  is an issue.


Michał Jaworski


W dniu 2015-06-11 o 08:43, Luis Bernardo pisze:


That is not really a float in the sense that the text does not need to 
wrap around it. And that in fact makes the implementation of the 
feature a lot simpler.


On 6/10/15 5:41 PM, Michał Jaworski wrote:

Example attached, one float always on the outer side.


W dniu 2015-06-10 o 17:19, Luis Bernardo pisze:


Can you show an example? Do you have two floats with text flowing in 
between or just one float that is always on the outer side of the page?


On 6/10/15 4:36 PM, Michał Jaworski wrote:

Hi,

mirror floats appear always on the outer side of the book page. We 
are using FOP to print truth books :) on the paper. In the simplest 
version floats are equal size and contains growing numbers of 
neighbouring paragraphs. It is used later in citations.


Part of books templates have mirror floats simply and we have to 
handle it somehow. Today we are using Tex in such a cases but after 
very good experiences with FO we want to get rid of Tex and use 
truly xml approach everywhere.


Unfortunately XSL 1.1 spec forgotten about it :(

Michał Jaworski

W dniu 2015-06-10 o 16:14, Luis Bernardo pisze:


No, and since that does not seem part of the XSL 1.1 spec it is 
highly unlikely that it will be implemented. What is the purpose 
of mirror floats? Are the two floats the same (meaning same 
content) or do they have at least the same exact size?


On 6/10/15 3:54 PM, Michał Jaworski wrote:

Hi,

I tested FOP 2.0 comparing results generated earlier using 
version 1.1. The content is an xml book having approx 300 B5 
pages with lot of tables and complex structures. Results are 
surprisingly positive. Great work!  I want to touch one topic 
known for years. Is there any way (or are you planning in an 
upcoming future) to achieve somehow mirror floats (on outer 
margins of the book) thus something like float="outside">used in xep?


Michał Jaworski

- 


To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: 
fop-users-h...@xmlgraphics.apache.org





-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: 
fop-users-h...@xmlgraphics.apache.org






-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org






-
To unsubscribe, e-mail:fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail:fop-users-h...@xmlgraphics.apache.org






Re: floats

2015-06-11 Thread Chris Bowditch
XSL 1.1 is finalized. There was a draft v2.0 XSL specification written 
but then the working group shutdown due to lack of interest. Its not up 
to the FOP community whether something is in or out of the XSL 
specification. All we can say is that this feature doesn't exist in the 
current specification.


FOP is an open source project, so if you want this feature you will need 
to develop an extension to do it, and submit a patch file for the 
committers to review.


Thanks,

Chris


On 11/06/2015 09:30, Michał Jaworski wrote:
can it be considered as a part of XSL 1.1 spec? You are right that 
wrapping is not necessary but still mirror (outer) placement  is an issue.


Michał Jaworski


W dniu 2015-06-11 o 08:43, Luis Bernardo pisze:


That is not really a float in the sense that the text does not need 
to wrap around it. And that in fact makes the implementation of the 
feature a lot simpler.


On 6/10/15 5:41 PM, Michał Jaworski wrote:

Example attached, one float always on the outer side.


W dniu 2015-06-10 o 17:19, Luis Bernardo pisze:


Can you show an example? Do you have two floats with text flowing 
in between or just one float that is always on the outer side of 
the page?


On 6/10/15 4:36 PM, Michał Jaworski wrote:

Hi,

mirror floats appear always on the outer side of the book page. We 
are using FOP to print truth books :) on the paper. In the 
simplest version floats are equal size and contains growing 
numbers of neighbouring paragraphs. It is used later in citations.


Part of books templates have mirror floats simply and we have to 
handle it somehow. Today we are using Tex in such a cases but 
after very good experiences with FO we want to get rid of Tex and 
use truly xml approach everywhere.


Unfortunately XSL 1.1 spec forgotten about it :(

Michał Jaworski

W dniu 2015-06-10 o 16:14, Luis Bernardo pisze:


No, and since that does not seem part of the XSL 1.1 spec it is 
highly unlikely that it will be implemented. What is the purpose 
of mirror floats? Are the two floats the same (meaning same 
content) or do they have at least the same exact size?


On 6/10/15 3:54 PM, Michał Jaworski wrote:

Hi,

I tested FOP 2.0 comparing results generated earlier using 
version 1.1. The content is an xml book having approx 300 B5 
pages with lot of tables and complex structures. Results are 
surprisingly positive. Great work!  I want to touch one topic 
known for years. Is there any way (or are you planning in an 
upcoming future) to achieve somehow mirror floats (on outer 
margins of the book) thus something like float="outside">used in xep?


Michał Jaworski

- 

To unsubscribe, e-mail: 
fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: 
fop-users-h...@xmlgraphics.apache.org





- 


To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: 
fop-users-h...@xmlgraphics.apache.org






-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: 
fop-users-h...@xmlgraphics.apache.org





-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org






-
To unsubscribe, e-mail:fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail:fop-users-h...@xmlgraphics.apache.org







-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Barcodes in fop 0.92 - Batik

2015-06-11 Thread becofuan
I only know barcode related resource. You can refer to  .net barcode
generation guide
  . I hope
it can help you with your work.



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Soft-page-break-tp5744p42372.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Collaboration Opportunity

2015-06-11 Thread Matteo Generali
Goodmorning,
I am the R&D manager for Doxee (www.doxee.com), a multi-national company
based in Modena  operating in the Customer Communication Management sector.
The company is in a phase of strong growth and is looking for java and FOP
usage/customization experts to be included in our development projects for
which I am conducting in person the first phase of scouting. We evaluate
open-ended contracts, project contracts and of professional services
contracts for one or more years.
Anybody wishing to participate in innovative projects can write me
mgeneralidoxee.com to arrange a non-binding interview.

Have a great day
Matteo


Re: fop and stAX

2015-06-11 Thread Andreas Delmelle
> On 05 Jun 2015, at 23:07, robyp7 .  wrote:
> 
> Hi to all,
> 
> Can your Fop use Stax(pull) to "handle" events instead SAX (push)?

Short answer: Yes and no. :)

Expanded: 
Yes, it would be possible, if  were to happen.
No, it is not possible, unless  were to happen.

That  is the same in both cases: a rather invasive refactoring of 
the basics of FOP's processing model, which is at this point largely SAX driven.

That said, an interesting question.
Architecturally, what FOP currently does (for most output formats) could be 
construed as push-pull-push, IIUC. The semantic FO events are "pushed" by the 
SAX handler, and keep building up until there is an 
endElement('page-sequence'... event. At that point, a proprietary DOM structure 
has built up in memory.  
From there on, you could say that the content of the page-sequence tree is 
"pulled" up (recursive iteration), which leads to the LayoutManager tree being 
constructed, which in turn produces a tree of areas that can be "pushed" as XML 
events to any consumer / renderer.

It is conceivable to switch to StAX for the first step, and "pull" the events 
from the input FO directly, or offer an interface for a consumer to pull the 
area events in, but neither are tasks I would take too lightly.


KR

Andreas
-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org