AFP colour images

2010-08-05 Thread Peter Hancock
Hi,

I am having colour problems with AFP and wonder if the FOP community
can help me.

I have a fo:block with a non-white background- colour (an arbitrary
#AFA) and I have modified FOP  to overlay an image that is largely
composed of the same colour.  The image is defined within the
AFPPainter using
a  org.apache.xmlgraphics.java2d.Graphics2DImagePainter2D; the
Graphics2D drawing commands being defined in the pai
nt method.  This is then wrapped in a
org.apache.xmlgraphics.image.loader.impl.ImageGraphics2D and passed to
AFPPainter.drawImage.  This method is responsible for rendering the
image: A stack trace shows that a call
org.apache.xmlgraphics.image.loader.impl.ImageConverterG2DBitmap.convert
is responsible for generating a BufferedImage.  FOP then uses
AFPImageHandlerRenderedImage to handle the image: the bytes of the
buffered image are directly written to the AFP and the image is tagged
as an FS11 IOCA.

When I print the afp there is a visible difference in the blocks
background colour and the images background colour and so I would like
to know what sort of steps and considerations are required to resolve
this.  I am currenty unclear exactly how the coloured areas of block
like elements are represented in the AFP and how I can synchronize
this with image creation.  Whilst I research this further myself, it
would be great to have the  knowledge confirmed by other FOP
developers with experience here.

This issue has cropped whilst working on a FOP extension for drawing
rounded corners as my solution for generating them for AFP is to use
corner images.  I am not using GOCA due to print server support
issues.

I would be very grateful for any of your thoughts.

Thanks,

Pete


Re: Complex Script Support - Trac Site Access

2010-08-05 Thread Vincent Hennebert
Hi Glenn,

Thanks for the background information ;-)

From you first message I had the impression that you wanted to keep
using that tool for future documentation, which I don’t think is the way
to go. If only because we don’t have write access to that site and can’t
update your doc with our own comments and suggestions.

While your patch is being processed, it would be good to progressively
transfer what’s already there to the FOP wiki; And write new
documentation directly on the FOP wiki. There’s no rush in it, it’s
going to take some time to process your patch anyway.

You said you also used git; now that would be something useful to us if
we had access to it (or at least the history of commits). That would
allow us to follow the progression you undertook, which isn’t as easily
done with a patch.

Thanks,
Vincent


Glenn Adams wrote:
 on a personal note, perhaps I should add that I've been writing code for 40
 years, and am nearing 60 myself, so i'm not quite as nimble as some in
 making transitions, especially with dev tool chains... :)
 
 g.
 
 On Wed, Aug 4, 2010 at 6:56 PM, Glenn Adams gl...@skynav.com wrote:
 
 i am using a combination of tools from codesion on this project...
 


Re: Complex Script Support - Trac Site Access

2010-08-05 Thread Glenn Adams
On Thu, Aug 5, 2010 at 7:18 PM, Vincent Hennebert vhenneb...@gmail.comwrote:

 Hi Glenn,

 From you first message I had the impression that you wanted to keep
 using that tool for future documentation


as i've said, i intend to transition the documentation to the FOP wiki over
a period of time, so that it will all end up on the latter


 it’s going to take some time to process your patch anyway.


keep in mind that the current patch is a starting point in what i expect to
be a number of patches on top of it; in discussing this with Benson, we
thought that getting something working into peoples hands earlier was a good
policy (release early, release often!), even though it is not functionally
complete nor adequately tested;

in reviewing this initial patch, you may want to keep in mind that I view it
as a temporary milestone, subject to considerable change, optimization, etc,
before i will be ready to propose merging into the dev trunk; therefore, you
may wish to incrementally review it, and save the more in-depth review
effort for when i make such a proposal; that is, after all, my understanding
of the purpose of doing this on a temporary branch, to give it time to
mature;

i see that Pascal has already built it and successfully produce a correct
Arabic rendering, so that is one data point you might use;



 You said you also used git; now that would be something useful to us if
 we had access to it (or at least the history of commits). That would
 allow us to follow the progression you undertook, which isn’t as easily
 done with a patch.


let me investigate this, if i can't easily do it on codesion, i'll push a
remote to github or another site with anonymous access

g.


XSL Page Variable

2010-08-05 Thread Eric Douglas
If the shell of my XSL looks like this: 
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format
http://www.google.com/url?sa=Dq=http://www.w3.org/1999/XSL/Formatusg=
AFQjCNHZhPMfx2p6D5n2w5qLURB5k932Cw  
fo:layout-master-set 
fo:simple-page-master 
xsl:attribute name=master-nameSTANDARD_PAGE/xsl:attribute 
xsl:attribute name=margin-bottomxsl:value-of 
select=PAGE_DATA/MARGIN_BOTTOM//xsl:attribute 
fo:region-body 
/fo:region-body 
/fo:simple-page-master 
/fo:layout-master-set 
fo:page-sequence 
xsl:attribute name=master-referenceSTANDARD_PAGE/xsl:attribute 
fo:flow 
xsl:attribute name=flow-namexsl-region-body/xsl:attribute 
xsl:for-each select=PAGE_DATA 
fo:block 
xsl:attribute name=break-beforepage/xsl:attribute 
xsl:for-each select=* 
... 
/xsl:for-each 
/fo:block 
/xsl:for-each 
/fo:flow 
/fo:page-sequence 
/fo:root 
So I have all my data grouped by what to print on each page, under a 
PAGE_DATA tag in the XML. Now I'm trying to put a tag under the 
PAGE_DATA tag to specify different attributes for each page, such as 
the margin-bottom mentioned here. As it is written here, it is using 
the value of the MARGIN_BOTTOM tag for the margin-bottom attribute, 
but it's only taking the last tag in the XML and applying it to all 
pages. How do I change the attributes for each page? 
Is there a place where I can set a variable from the XML tag value 
which can be processed after the for-each statement and before the 
page attributes? 


Re: XSL Page Variable

2010-08-05 Thread Pascal Sancho
Hi Eric,

this list is about FOP development, not XSLT or XSL-FO questions.
That said:
 - all pages features are nested in the fo:root/fo:layout-master-set
element,
 - while content is nested in fo:root/fo:page-sequence.

Therefore you should process your XML in a 2 passes XSLT:
 - 1 template for page masters,
 - 1 template for content.

Pascal


Le 05/08/2010 14:26, Eric Douglas a écrit :

 If the shell of my XSL looks like this:
 fo:root xmlns:fo=_http://www.w3.org/1999/XSL/Format_
 http://www.google.com/url?sa=Dq=http://www.w3.org/1999/XSL/Formatusg=AFQjCNHZhPMfx2p6D5n2w5qLURB5k932Cw
 fo:layout-master-set
 fo:simple-page-master
 xsl:attribute name=master-nameSTANDARD_PAGE/xsl:attribute
 xsl:attribute name=margin-bottomxsl:value-of
 select=PAGE_DATA/MARGIN_BOTTOM//xsl:attribute
 fo:region-body
 /fo:region-body
 /fo:simple-page-master
 /fo:layout-master-set
 fo:page-sequence
 xsl:attribute name=master-referenceSTANDARD_PAGE/xsl:attribute
 fo:flow
 xsl:attribute name=flow-namexsl-region-body/xsl:attribute
 xsl:for-each select=PAGE_DATA
 fo:block
 xsl:attribute name=break-beforepage/xsl:attribute
 xsl:for-each select=*
 ...
 /xsl:for-each
 /fo:block
 /xsl:for-each
 /fo:flow
 /fo:page-sequence
 /fo:root
 So I have all my data grouped by what to print on each page, under a
 PAGE_DATA tag in the XML. Now I'm trying to put a tag under the
 PAGE_DATA tag to specify different attributes for each page, such as
 the margin-bottom mentioned here. As it is written here, it is using
 the value of the MARGIN_BOTTOM tag for the margin-bottom attribute,
 but it's only taking the last tag in the XML and applying it to all
 pages. How do I change the attributes for each page?
 Is there a place where I can set a variable from the XML tag value
 which can be processed after the for-each statement and before the
 page attributes?




RE: XSL Page Variable

2010-08-05 Thread Eric Douglas
Hi Pascal,
 
If I'm understanding you correctly I think this could work.  I realize it's for 
FOP development and it may not be an FOP issue, but it's not a pure XSLT issue. 
 The XSLT handles HTML style formatting.  The FOP is the paging formatter.  
This is a page issue.  As you say try 2 passes I'm thinking I just need to 
separate the tags, that I'm trying to break on PAGE_DATA which triggers the new 
page call to the simple-page-master, then I'm trying to find the page layout 
data under the PAGE_DATA.  I should be able to get the page layout data before 
I find the PAGE_DATA tag to start the new pages..



From: Pascal Sancho [mailto:pascal.san...@takoma.fr] 
Sent: Thursday, August 05, 2010 8:52 AM
To: fop-dev@xmlgraphics.apache.org
Subject: Re: XSL Page Variable


Hi Eric,

this list is about FOP development, not XSLT or XSL-FO questions.
That said:
 - all pages features are nested in the fo:root/fo:layout-master-set element,
 - while content is nested in fo:root/fo:page-sequence.

Therefore you should process your XML in a 2 passes XSLT:
 - 1 template for page masters,
 - 1 template for content.

Pascal


Le 05/08/2010 14:26, Eric Douglas a écrit : 

If the shell of my XSL looks like this: 
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format 
http://www.google.com/url?sa=Dq=http://www.w3.org/1999/XSL/Formatusg=AFQjCNHZhPMfx2p6D5n2w5qLURB5k932Cw
 
fo:layout-master-set
fo:simple-page-master
xsl:attribute name=master-nameSTANDARD_PAGE/xsl:attribute
xsl:attribute name=margin-bottomxsl:value-of
select=PAGE_DATA/MARGIN_BOTTOM//xsl:attribute
fo:region-body
/fo:region-body
/fo:simple-page-master
/fo:layout-master-set
fo:page-sequence
xsl:attribute name=master-referenceSTANDARD_PAGE/xsl:attribute
fo:flow
xsl:attribute name=flow-namexsl-region-body/xsl:attribute
xsl:for-each select=PAGE_DATA
fo:block
xsl:attribute name=break-beforepage/xsl:attribute
xsl:for-each select=*
...
/xsl:for-each
/fo:block
/xsl:for-each
/fo:flow
/fo:page-sequence
/fo:root 
So I have all my data grouped by what to print on each page, under a
PAGE_DATA tag in the XML. Now I'm trying to put a tag under the
PAGE_DATA tag to specify different attributes for each page, such as
the margin-bottom mentioned here. As it is written here, it is using
the value of the MARGIN_BOTTOM tag for the margin-bottom attribute,
but it's only taking the last tag in the XML and applying it to all
pages. How do I change the attributes for each page?
Is there a place where I can set a variable from the XML tag value
which can be processed after the for-each statement and before the
page attributes? 




Re: Complex Script Support - Trac Site Access

2010-08-05 Thread Glenn Adams
more

On Thu, Aug 5, 2010 at 8:20 PM, Glenn Adams gl...@skynav.com wrote:


 On Thu, Aug 5, 2010 at 7:18 PM, Vincent Hennebert vhenneb...@gmail.comwrote:

 Hi Glenn,

 From you first message I had the impression that you wanted to keep
 using that tool for future documentation


 as i've said, i intend to transition the documentation to the FOP wiki over
 a period of time, so that it will all end up on the latter


we've pretty much exhausted this thread, but perhaps it would be clearer to
you if you view the trac wiki site I am using as a working copy, sandbox
or as a staging area as I compose my ideas and documentation; i could have
merely done it on my local drive or on a private server, but i preferred
instead to make it visible early, even though it is in preliminary stage
which does not meet the standards I would expect for documentation that is
promoted to the FOP wiki; i very well may rip up, rewrite, replace,
restructure, etc., the content i am composing on my trac wiki before i feel
it is ready for the FOP wiki; as I say, i could be doing that privately, but
then interested viewers would not have early access to my preliminary work;
overall, it is to your and the communities benefit that i choose to expose
this preliminary work, with all its defects plainly visible;

g.


Eclipse Build - fail?

2010-08-05 Thread Eric Douglas
I have FOP source in an Eclipse Ant project.  I right click on the
build.xml file and select run as ant build.  This used to work.  Now I
get messages in the console and it tells me build successful but the jar
doesn't update.  What could I be missing?  The most significant change I
have that could have broken it is I installed the maven eclipse plugin.



Re: XSL Page Variable

2010-08-05 Thread Christopher R. Maden
Eric Douglas wrote:
 If I'm understanding you correctly I think this could work.  I
 realize it's for FOP development and it may not be an FOP issue, but
 it's not a pure XSLT issue.  The XSLT handles HTML style formatting.
 The FOP is the paging formatter.  This is a page issue.  As you say
 try 2 passes I'm thinking I just need to separate the tags, that
 I'm trying to break on PAGE_DATA which triggers the new page call to
 the simple-page-master, then I'm trying to find the page layout data
 under the PAGE_DATA.  I should be able to get the page layout data
 before I find the PAGE_DATA tag to start the new pages..

If you know what your FO markup should look like, and you don’t know how
to make XSLT do that, ask on the XSL list.[1]

If you don’t know what FO markup to make, you can ask on fop-users (not
fop-dev), but please focus on the FO markup itself, and leave the XSLT
out of it.

It looks here like you want to make multiple page-masters and multiple
page-sequences, since you want each page sequcne to have different geometry.

Please follow-up to either fop-users or xsl-list, but not fop-dev.

~Chris

[1] URL: http://www.mulberrytech.com/xsl/xsl-list/ 
-- 
Chris Maden, text nerd  URL: http://crism.maden.org/ 
“I like being free, and that makes me an idiot, I suppose.”
  — Stan Rogers, “The Idiot”
GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319