Unwanted padding when nesting block inside block-container

2010-08-30 Thread Ognjen Blagojevic

Hi,

I have very simple example where I nest block inside block-container. I 
set both paddings and margins to 0. I am confused since unexplained 
padding (left and right) appears inside block-container.


I would expect that borders are one next to another but this is not the 
case. Top and bottom borders are, but left and right are not.


Am I missing something really obvious?

Tested with fop 0.95 and 1.0, Windows XP SP3, Java 1.6.

Full example below:

=
?xml version=1.0 encoding=utf-8?
root xmlns=http://www.w3.org/1999/XSL/Format;

layout-master-set
  simple-page-master master-name=first page-height=29.7cm 
page-width=21cm margin=2.5cm

region-body/region-body
  /simple-page-master
/layout-master-set

 page-sequence master-reference=first
   flow flow-name=xsl-region-body

 block-container text-align=left border=0.2cm solid black
 width=10cm padding=0 margin=0

   block padding=0 margin=0 border=0.4cm solid red
 test text test text test text test text test text test
 test text test text test text test text test text test
 test text test text test text test text test text test
   /block

 /block-container

   /flow
 /page-sequence
/root
-


Regards,
Ognjen

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



RE: Unwanted padding when nesting block inside block-container

2010-08-30 Thread Eric Douglas
I don't know if it would help but I split that up.  I use padding-top,
padding-bottom, padding-left, padding-right.
I don't know how the borders would look since I never draw anything from
the block-container, and I tell it where to put all my output with
position=absolute, so if I want a border around something I use a
separate block tag with it's own container.
 

-Original Message-
From: Ognjen Blagojevic [mailto:ognjen.d.blagoje...@gmail.com] 
Sent: Monday, August 30, 2010 8:06 AM
To: fop-users@xmlgraphics.apache.org
Subject: Unwanted padding when nesting block inside block-container

Hi,

I have very simple example where I nest block inside block-container. I
set both paddings and margins to 0. I am confused since unexplained
padding (left and right) appears inside block-container.

I would expect that borders are one next to another but this is not the
case. Top and bottom borders are, but left and right are not.

Am I missing something really obvious?

Tested with fop 0.95 and 1.0, Windows XP SP3, Java 1.6.

Full example below:

=
?xml version=1.0 encoding=utf-8?
root xmlns=http://www.w3.org/1999/XSL/Format;

layout-master-set
   simple-page-master master-name=first page-height=29.7cm 
page-width=21cm margin=2.5cm
 region-body/region-body
   /simple-page-master
/layout-master-set

  page-sequence master-reference=first
flow flow-name=xsl-region-body

  block-container text-align=left border=0.2cm solid black
  width=10cm padding=0 margin=0

block padding=0 margin=0 border=0.4cm solid red
  test text test text test text test text test text test
  test text test text test text test text test text test
  test text test text test text test text test text test
/block

  /block-container

/flow
  /page-sequence
/root
-


Regards,
Ognjen

-
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: Orientation

2010-08-30 Thread Eric Douglas
I'm using the reference-orientation=90 as a workaround until I get time
to test to get the other way to work.
The 90 reference prints fine.  It just doesn't look right.  If I load it
into preview or PDF it's just portrait turned sideways, so they have to
turn their head or their screen to read it.
I'll have to look at the one program we have thus far using landscape
but I believe it came out correct to PDF with appearance of 11 width
but never printed right.  We had some users testing that program but it
wasn't actually implemented yet.  It will be soon so I will need to
figure out how this should really work.



From: Stuart Scott [mailto:stuart.sc...@countrywide.co.uk] 
Sent: Wednesday, August 25, 2010 7:00 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Orientation



Hi Eric

 

I tried mine with option 2 and the landscape page does indeed print out
portrait.  

 

So if you want a landscape page in the middle of portrait pages for
viewing only, option 2 is the better option.  If you want the same to
print only, option 1 is the best.  If you want both I think you have a
problem.

 

I am not sure if this would be considered a bug or something that could
be considered for a future FOP release.

 

Are you able to use two separate stylesheets, one using each option?

 

Kind regards

 

Stuart Scott

 



From: Eric Douglas [mailto:edoug...@blockhouse.com] 
Sent: 20 August 2010 16:13
To: fop-users@xmlgraphics.apache.org
Subject: RE: Orientation

 

That is the reference-orientation=90 option I tried.  That works well,
though I don't think users want to view it sideways.

There are 2 ways to print landscape, I've determined.  See attached.

The first one involves setting page-height=11 and page-width=8.5 and
reference-orientation=90.

The second one  involves setting page-height=8.5 and page-width=11 and
reference-orientation=0.

The issues with that:

1. The first method prints fine if I create a pageable object from the
FOP output (using embedded code with the output stream) and send it
straight to the printer using the Java PrintService with default
options, only assigning JobName.

The second method sent straight to the printer goes to tray 1 (manual
feed) instead of the default tray 3, asking for 8.50 x 11.00 paper,
and after putting the paper in it prints portrait.

2. I couldn't figure out how to get the second method working with mixed
output, getting one page to print portrait and the next to print
landscape.

 

The first method seems unusable if it can't turn sideways by default
when the users view the PDF, to read like the second one.

The second method seems unusable if I can't get it to come out on the
printer like the first one does.

 

 



From: Stuart Scott [mailto:stuart.sc...@countrywide.co.uk] 
Sent: Friday, August 20, 2010 9:55 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Orientation

Hi Eric

 

I am not sure I fully understand your issue, so can you take a look at
page 4 in the attached PDF.  Is that what you are after?

 

Kind regards

 

Stuart Scott

 



From: Eric Douglas [mailto:edoug...@blockhouse.com] 
Sent: 20 August 2010 14:00
To: fop-users@xmlgraphics.apache.org
Subject: Orientation

 

Maybe I was just thinking too far out of the box, but I was wondering if
it's possible to create output with different pages having different
orientation.

I tried just swapping the page-height and page-width attribute values
and had a couple of issues with it.  For a PDF, if I set the first page
to portrait and the second page to landscape it was making both pages
landscape.  On getting the output directly to the printer that was
somehow selecting the wrong tray.

I've tried setting the reference-orientation value to 90.  I haven't
gotten a test that worked with portrait and landscape in the same
output, but this works well for landscape directly to the printer.  The
problem with this value is when I create a PDF and try to view it, the
pages actually show as sideways.

On sending output directly to the printer I'm actually generating a
pageable object from the FOP output and using the
javax.print.PrintService class.  I was wondering if just setting the
javax.print.attribute.standard.PresentationDirection and/or
javax.print.attribute.standard.OrientationRequested value would work
best for printing landscape, though of course this would not allow
portrait and landscape pages in the same output.

The only other way I can think of to get portrait and landscape
orientation in the same output would be to create different xml files
for each and process them separately, though of course this would
require some method of combining the output to get one PDF, and it would
break xsl code like fo:page-number-citation ref-id=last-page.

For email disclaimer details please click or visit -
http://www.countrywideplc.co.uk/disclaimer 



Re: Unwanted padding when nesting block inside block-container

2010-08-30 Thread Ognjen Blagojevic

On 30.8.2010 14:15, Eric Douglas wrote:

I don't know if it would help but I split that up.  I use padding-top,
padding-bottom, padding-left, padding-right.


Thanks for the tip, but I still have the same problem. Tried randomly 
attributes I suspected (border-separation, border-spacing, break-before, 
break-after, space-before, space-after, space-start, space-end, left, 
clear) but nothing seems to help.


That freaky padding is still there.

Another strange thing is that the padding is the same size as border. If 
border is 10pt, padding is also 10pt, if border is 0, padding is also 0.


-Ognjen

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



RE: Unwanted padding when nesting block inside block-container

2010-08-30 Thread Eric Douglas
I don't actually use borders around what I draw in the block tag.
I sort of cheat.  I use absolute positioning for everything.  Since I
already know exactly where every block-container is going, I draw lines
around block objects using a different block within a different
block-container.  For a box around it I can use the border attribute,
and since the text/image I'm drawing inside is in it's own block I can
adjust the absolute positioning of it's block-container to start inside
the border of the block-container with the border attribute.  For
drawing lines around or between I can use a block-container with a
height/width of the border line and fill in with
background-color=black.  That may be a bit too complicated for how
most people use it.

Have you tried eliminating your block-container block combination by
putting the border only on block-containers or only on blocks?  You can
nest both. fo:block-containerfo:block-containerfo:block or
fo:block-containerfo:blockfo:block

-Original Message-
From: Ognjen Blagojevic [mailto:ognjen.d.blagoje...@gmail.com] 
Sent: Monday, August 30, 2010 9:28 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Unwanted padding when nesting block inside block-container

On 30.8.2010 14:15, Eric Douglas wrote:
 I don't know if it would help but I split that up.  I use padding-top,

 padding-bottom, padding-left, padding-right.

Thanks for the tip, but I still have the same problem. Tried randomly
attributes I suspected (border-separation, border-spacing, break-before,
break-after, space-before, space-after, space-start, space-end, left,
clear) but nothing seems to help.

That freaky padding is still there.

Another strange thing is that the padding is the same size as border. If
border is 10pt, padding is also 10pt, if border is 0, padding is also 0.

-Ognjen

-
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: Unwanted padding when nesting block inside block-container

2010-08-30 Thread Jeremias Maerki
You're seeing the effect of indent inheritance:
http://wiki.apache.org/xmlgraphics-fop/IndentInheritance

Yes, FOP's behaviour is correct with respect to the specification. Yes,
it's unexpected.

You have two options:

1. Enclose the contents of the block-container with an fo:block where
you set start-indent=0cm and end-indent=0cm.

2. Enabled the break-indent-inheritance configuration option.
http://xmlgraphics.apache.org/fop/1.0/configuration.html#general-elements

On 30.08.2010 14:05:51 Ognjen Blagojevic wrote:
 Hi,
 
 I have very simple example where I nest block inside block-container. I 
 set both paddings and margins to 0. I am confused since unexplained 
 padding (left and right) appears inside block-container.
 
 I would expect that borders are one next to another but this is not the 
 case. Top and bottom borders are, but left and right are not.
 
 Am I missing something really obvious?
 
 Tested with fop 0.95 and 1.0, Windows XP SP3, Java 1.6.
 
 Full example below:
 
 =
 ?xml version=1.0 encoding=utf-8?
 root xmlns=http://www.w3.org/1999/XSL/Format;
 
 layout-master-set
simple-page-master master-name=first page-height=29.7cm 
 page-width=21cm margin=2.5cm
  region-body/region-body
/simple-page-master
 /layout-master-set
 
   page-sequence master-reference=first
 flow flow-name=xsl-region-body
 
   block-container text-align=left border=0.2cm solid black
   width=10cm padding=0 margin=0
 
 block padding=0 margin=0 border=0.4cm solid red
   test text test text test text test text test text test
   test text test text test text test text test text test
   test text test text test text test text test text test
 /block
 
   /block-container
 
 /flow
   /page-sequence
 /root
 -
 
 
 Regards,
 Ognjen



Jeremias Maerki


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



Re: Memory Leak issue -- FOP

2010-08-30 Thread Hamed Mohammed
Hi,

This is how I am using FOP to process XSL.FO into PDF. I agree that
the issue is to do with too much of memory consumption. Is there a better
way to process this large FO file into PDF using FOP?

String xml = builder.getReport(); /// gets the XSL:FO file data approx 50mb

PdfStorage pdfHolder = pdfStorageFactory.createStorage(reportRequest,

contentType);

pdfMaker.generatePDF(pdfHolder, xml);  // Instance of PdfCreator injected
through Spring.


On Mon, Aug 30, 2010 at 1:07 AM, Dominik Stadler 
dominik.stad...@dynatrace.com wrote:


 Hi,

 Craig is right, it's it's not a memory leak, but rather memory kept
 active too long, i.e. after processing is done. I saw the same thing when I
 integrated FOP into an application over here.

 It is basically caused by the SAX implementation that you use as it caches
 the SAX-Handler, where the FOP-SAX-Handler keeps references to a lot of
 internal stuff. In my case it did this in a ThreadLocal, so with different
 threads using FOP I ended up having this memory kept in every thread, which
 accumulated to quite an amount of memory depending on the usage pattern.

 I tried various different ways to solve this, when using SAX/XML provided
 as part of Sun JDK 1.6 the following was removing this memory bloat:

Result result = new SAXResult(fop.getDefaultHandler());
SAXSource source = new SAXSource(inputSource);
// set our own XMLReader to prevent Sun XML from caching
 stuff in ThreadLocals which keeps FOP in memory
// we want to free up any FOP resources when not reporting
 and for this ThreadLocals is very bad, especially
// as we are called in different threads via REST and
 Scheduling thread pools!
source.setXMLReader(XMLReaderFactory.createXMLReader());

transformer.transform(source, result);

if (logger.isLoggable(Level.FINE)  fop.getResults() !=
 null) {
logger.info(Processing resulted in  +
 fop.getResults().getPageCount() +  pages.); //$NON-NLS-1$ //$NON-NLS-2$
}
}

 Maybe a similar thing solves this for you as well.

 Dominik.


 -Original Message-
 From: Craig Ringer [mailto:cr...@postnewspapers.com.au]
 Sent: Donnerstag, 26. August 2010 02:35
 To: fop-users@xmlgraphics.apache.org
  Cc: Hamed Mohammed
 Subject: Re: Memory Leak issue -- FOP

 On 26/08/2010 3:39 AM, Hamed Mohammed wrote:
  Hello Users:
  Any idea on how to solve the FOP memory leak issue. Below snap shots are
  taken from Eclipse Memory Analyzer of a IBM portable heap dump.

 What makes you think that's a memory leak?

 It's a large amount of memory consumption, sure. But is there any
 evidence it's growing over time? Or growing whenever a new document is
 processed, without shinking again when the document is finished?

 How do you know it's not your own code keeping references to the fop
 instances around? Can you produce a small, self-contained program that
 demonstrates the leak?

 If your real question is why is FOP using so much memory ... well, to
 answer that it'd be necessary to know more about your XSL-FO input and
 the associated resources like graphics.

 --
 Craig Ringer

 Tech-related writing at http://soapyfrogs.blogspot.com/

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






-- 
Thanks,
Hamed Mohammed,
Email: mohdhamedms...@gmail.com.


Re: Java Console error

2010-08-30 Thread Jeremias Maerki
FOP uses Java object serialization for the font cache. And the
serialVersionUID can change when the layout of that file changes (from
FOP version to FOP version) in which case FOP cannot read the font cache
file. It then just builds a new one. You're absolutely safe to ignore
that warning.

On 20.08.2010 20:42:38 Eric Douglas wrote:
 My workaround is to ignore this since my results still appear correct
 and users don't see this but what does this mean?  This message is
 showing up in my Java console, using the fop 0.95, when I send the
 output to the org.apache.fop.render.awt.viewer.PreviewPanel with
 embedded code running in webstart.
 (I can't use fop 1.0 because it had a problem which actually did affect
 the appearance of the output)
 
 org.apache.fop.fonts.FontCache loadFrom
 WARNING: I/O exception while reading font cache
 (org.apache.fop.fonts.FontCache; local class incompatible: stream
 classdesc serialVersionUID = 605232520271754719, local class
 serialVersionUID = 605232520271754718). Discarding font cache file.
 




Jeremias Maerki


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



Re: Generating PDFs from Java Beans

2010-08-30 Thread Jeremias Maerki
Examples can be found in the docs and the FOP distribution:
http://xmlgraphics.apache.org/fop/latest/embedding.html#examples

HTH

On 23.08.2010 11:05:38 Alexander Orlov wrote:
 Is there a best practice to generate PDFs out of Java Beans. Any hints are
 appreciated :)
 
 Cheers
 Alex




Jeremias Maerki


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



Re: PDF: Disable converting color to Device Gray

2010-08-30 Thread Jeremias Maerki
FOP doesn't have such an option. The PDF 1.4 spec says in chapter 6.2.1:
A gray level is equivalent to an RGB value with all three components
the same.

And therefore we render gray values in the DeviceGray color space. That
this doesn't work in your case is a bit surprising. But I've heard
something similar just two weeks ago from a company that does photo
books with FOP/Batik. But they had to do strange things like using CMYK
and adding Magenta in addition to the K=1.0 value. They still just get
an approximate black. I guess that's an issue of the printer they use. I
suspect your case may be similar: a printer issue.

I guess we could add such an option to disable that RGB to gray
replacement but I'm not sure if it would help. You can try to disable it
by changing org.apache.fop.pdf.PDFColor.java. Look for:

boolean same = false;
if (this.red == this.green  this.red == this.blue) {
same = true;
}

Comment out the if section and check if it helps. I suspect not.
Please keep me in the loop.

On 25.08.2010 11:10:46 Frangoo wrote:
 
 Hi users,
 
 I have a problem with a color space.
 I generate a PDF with FOP 1.0, and one page within is completely black.
 But FOP generates a PDF, where the black page is not black, but dark gray.
 With other XSL-FO engines I found out, that they have an option do select
 different color-changing-features. When I deselect all, I get a nice black -
 but if I enable DeviceGray, I get there also the dark gray color.
 
 After that I guess, that FOP is generating PDFs in general with that option
 Convert colors to DeviceGray.
 My two questions:
 1) Am I right?
 2) Where can I disable that / or get anther solution?
 
 Google  FOP-Pages didn't brought me any help.
 
 Thanks very much to everybody who writes back !!
 
 
 Regards,
 
 Frangoo
 -- 
 View this message in context: 
 http://old.nabble.com/PDF%3A-Disable-converting-color-to-%22Device-Gray%22-tp29530173p29530173.html
 Sent from the FOP - Users mailing list archive at Nabble.com.
 



Jeremias Maerki


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



Re: fo:marker bleeding issue [fop 0.95 FOP 1.0]

2010-08-30 Thread Jeremias Maerki
The hard truth is that someone has to implement table markers to achieve
that. And that's going to be tricky which is mostly the reason why it
hasn't been done, yet.

On 27.08.2010 19:31:44 bonekrusher wrote:
 
 Hi List,
 
 Can anyone provide some guidance on this issue?
 
 Thanks,
 
 
 bonekrusher wrote:
  
  Hi,
  
  In order to have table headers continued in my pdf output, I am using
  markers. Everything works fine until there is more then one line on the
  1st marker and there is a second marker. If the 1st marker is more than
  one line and I add a second marker, the marker bleeds into the table on
  the second page (see attached pdf). One solution to to increase the
  @margin-top on the region-body. The problem with that is  there are many
  times when the markers are not needed and there is a huge whitespace where
  the markers would go. For example, if the margin-top=1.0in, there would
  be a one inch whitespace if the markers are not called.
  
  See attached example fo and pdf. Page 2 of the pdf is where the problem
  occurs. I need the table to start below Table 3. Table Title Marker -
  Continued. 
  
  I am not sure how to resolve this. 
   http://old.nabble.com/file/p29532209/testMaint.fo testMaint.fo 
   http://old.nabble.com/file/p29532209/example.pdf example.pdf 
  
  Thanks for the help
  
 
 -- 
 View this message in context: 
 http://old.nabble.com/fo%3Amarker-bleeding-issue--fop-0.95---FOP-1.0--tp29532209p29555037.html
 Sent from the FOP - Users mailing list archive at Nabble.com.



Jeremias Maerki


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



Re: different footer dependent on current element

2010-08-30 Thread Jeremias Maerki
Not sure, but I think you look for fo:marker and fo:retrieve-marker.
There are examples for its usage in FOP's examples/fo/markers directory.
And on the web there should be various tutorials covering the feature.

HTH

On 25.08.2010 17:58:17 twfurst wrote:
 
 I have been working on building a manual out of numerous XML files over the
 past week. I have made a good deal of progress, I actually have the manual
 created, mostly.
 
 What I am having trouble figuring out is a way to change the footer for each
 procedure. I will attach the files here that I am using, but in essence,
 what I need is for the footer to display info held in attributes of each
 dmodule/identAndStausSection with the XML.
 
 If I use an xsl:for-each I get the value from every dmodule on every
 footer. I tried to use the current() function from xsl, but it tried to
 bring in the entire content of dmodule.
 
 This is frustrating me like crazy.
 
 Thanks for any help,
 
 Tom
 http://old.nabble.com/file/p29533921/XSL-PDF-XML.zip XSL-PDF-XML.zip 
 
 -- 
 View this message in context: 
 http://old.nabble.com/different-footer-dependent-on-current-element-tp29533921p29533921.html
 Sent from the FOP - Users mailing list archive at Nabble.com.
 



Jeremias Maerki


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



Re: Configuring 1.0 Fonts (PDF rendering)

2010-08-30 Thread Jeremias Maerki
Basically, you can leave everything as it is except remove the
metrics-url attribute from the font tag. The font-triplet is
probably still necessary to make sure the name Helvetica is redirected
to your embedded font instead of the implicit base 14 font.

http://xmlgraphics.apache.org/fop/latest/fonts.html#register

HTH

On 27.08.2010 15:07:55 Mario Madunic wrote:
 Well I'm having one hell of a time making heads or tails of how to
 config Helvetica as a font for FOP 1.0 PDF rendering. I was using 0.94
 and need to test 1.0 for production and would like to configure
 Helvetica for this. While using 0.94 I created metric files for Arial
 as I was unable to do so for Helvetica. Read somewhere (searching mailing
 lists and ) that this is not necessary anymore and want to move to the
 corporate font for manuals.
 
 So my question is how can I configure Helvetica in 1.0 for PDF rendering? Any 
 insight will be appreciated. 
 
 Marijan (Mario) Madunic
 Publishing Specialist
 New Flyer Industries



Jeremias Maerki


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



Re: How to include .fo file into another .fo

2010-08-30 Thread Jeremias Maerki
Two possibilities:

1. Use XSLT with its document() function.

http://www.w3.org/TR/xslt#document

2. If you have an XInclude-capable XML parser (or a SAX filter for
XInclude), you can use XInclude.

http://en.wikipedia.org/wiki/XInclude
http://www.w3.org/TR/xinclude/

HTH

On 27.08.2010 21:54:16 Shaki wrote:
 Hello, 
 
 is it possible to include one .fo file into another?
 Example: 
 I want to include file address.fo into template.fo
 
 address.fo:
 fo:blockName/fo:block
 fo:blockAddress/fo:block
 
 template.fo:
 fo:blockSome fo code before address part/fo:block
 Include address.fo
 fo:blockSome fo code after address part/fo:block
 
 result i want to get:
 fo:blockSome fo code before address part/fo:block
 fo:blockName/fo:block
 fo:blockAddress/fo:block
 fo:blockSome fo code after address part/fo:block
 
 Thanks for your help and suggestions
 Shaki



Jeremias Maerki


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



Re: fo:marker bleeding issue [fop 0.95 FOP 1.0]

2010-08-30 Thread bonekrusher

Hi Jeremias,

Thanks for following up. In your opinion, how hard would it be to either
create an extension (like what was used in 20.5) or implementing it in the
next release?

Thanks,

Phil



Jeremias Maerki-2 wrote:
 
 The hard truth is that someone has to implement table markers to achieve
 that. And that's going to be tricky which is mostly the reason why it
 hasn't been done, yet.
 
 On 27.08.2010 19:31:44 bonekrusher wrote:
 
 Hi List,
 
 Can anyone provide some guidance on this issue?
 
 Thanks,
 
 
 bonekrusher wrote:
  
  Hi,
  
  In order to have table headers continued in my pdf output, I am using
  markers. Everything works fine until there is more then one line on the
  1st marker and there is a second marker. If the 1st marker is more than
  one line and I add a second marker, the marker bleeds into the table on
  the second page (see attached pdf). One solution to to increase the
  @margin-top on the region-body. The problem with that is  there are
 many
  times when the markers are not needed and there is a huge whitespace
 where
  the markers would go. For example, if the margin-top=1.0in, there
 would
  be a one inch whitespace if the markers are not called.
  
  See attached example fo and pdf. Page 2 of the pdf is where the problem
  occurs. I need the table to start below Table 3. Table Title Marker -
  Continued. 
  
  I am not sure how to resolve this. 
   http://old.nabble.com/file/p29532209/testMaint.fo testMaint.fo 
   http://old.nabble.com/file/p29532209/example.pdf example.pdf 
  
  Thanks for the help
  
 
 -- 
 View this message in context:
 http://old.nabble.com/fo%3Amarker-bleeding-issue--fop-0.95---FOP-1.0--tp29532209p29555037.html
 Sent from the FOP - Users mailing list archive at Nabble.com.
 
 
 
 Jeremias Maerki
 
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/fo%3Amarker-bleeding-issue--fop-0.95---FOP-1.0--tp29532209p29573703.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



Re: Special characters in AWT preview and PDF renderers

2010-08-30 Thread Pascal Sancho
Hi,

'#' indicates that the glyph is not available in any font used by FOP.
Note that SVG uses the fonts installed in the system, while FOP needs
that used fonts are set in config file (if you use a non standard font).
So, you have to ensure that the fonts used in SVG are both declared in
your system AND in FOP config file.

Pascal

Le 16/08/2010 09:21, Antti Karanta a écrit :

   Hi!

I have an SVG image with greek symbols, e.g.

 text text-anchor=start x=3.13063 y=1.56532 style=fill:#00;  
 font-family:Swiss,Helvetica,sans-serif; font-size: 4.69595 
 HEEL φ
 /text

This renders fine in FOP AWT preview, but as # in PDF.

The pdf is fine, too, if I change (in the SVG) the first line above to:

 text text-anchor=start x=3.13063 y=1.56532 style=fill:#00;  
 font-size: 4.69595 

i.e. remove the font references.


I know the different renderers handle fonts differently, but this far I  
 have been able to use os fonts in pdf by having

fonts
  auto-detect/
/fonts

in my fop.xconf

However, in this case it does not seem to help.


Is there some other magic I need to do to make os fonts work ok inside  
 svg? Or am I missing something else?


Environment: fop 0.95 and 1.0, java 1.6.0_20, win xp sp 3




::Antti::


 -
 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: Special characters in AWT preview and PDF renderers

2010-08-30 Thread Eric Douglas
Special font characters are broken in FOP 1.0.
In 0.95 I referenced a unicode character which was not in my custom font and 
got a message in my Java Console about glyph not found.
I changed it to a unicode character which is in the font and I get that 
character with 0.95.  That same code in 1.0 is producing a # and not getting 
the glyph not found message.


-Original Message-
From: Pascal Sancho [mailto:pascal.san...@takoma.fr] 
Sent: Monday, August 30, 2010 11:31 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Special characters in AWT preview and PDF renderers

Hi,

'#' indicates that the glyph is not available in any font used by FOP.
Note that SVG uses the fonts installed in the system, while FOP needs that used 
fonts are set in config file (if you use a non standard font).
So, you have to ensure that the fonts used in SVG are both declared in your 
system AND in FOP config file.

Pascal

Le 16/08/2010 09:21, Antti Karanta a écrit :

   Hi!

I have an SVG image with greek symbols, e.g.

 text text-anchor=start x=3.13063 y=1.56532 style=fill:#00; 
 font-family:Swiss,Helvetica,sans-serif; font-size: 4.69595  HEEL φ 
 /text

This renders fine in FOP AWT preview, but as # in PDF.

The pdf is fine, too, if I change (in the SVG) the first line above to:

 text text-anchor=start x=3.13063 y=1.56532 style=fill:#00;
 font-size: 4.69595 

i.e. remove the font references.


I know the different renderers handle fonts differently, but this 
 far I have been able to use os fonts in pdf by having

fonts
  auto-detect/
/fonts

in my fop.xconf

However, in this case it does not seem to help.


Is there some other magic I need to do to make os fonts work ok 
 inside svg? Or am I missing something else?


Environment: fop 0.95 and 1.0, java 1.6.0_20, win xp sp 3




::Antti::


 -
 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: Special font chars

2010-08-30 Thread Pascal Sancho
Hi,
On my WinXP, the LTYPE.TTF (AKA Lucida Sans Typewriter) doesn't
contain the glyph for \u25A1.
You should try another font.
--
Pascal

Le 18/08/2010 21:04, Eric Douglas a écrit :

 I'm trying to print a character to a PDF as #x25A1; which is supposed
 to be a square and it's printing a # character instead.

 The 25A1 character should be in my font.  The PDF should be embedding
 LTYPE.TTF which comes with Windows XP..
 Am I missing something or is FOP 1.0 missing something?




RE: Special font chars

2010-08-30 Thread Eric Douglas
Our web designer says the Adobe font viewer product is showing that character 
in that font.
If the character is not in the font, what happened to the message in the 
console about not finding the glyph?



From: Pascal Sancho [mailto:pascal.san...@takoma.fr] 
Sent: Monday, August 30, 2010 11:37 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Special font chars


Hi,
On my WinXP, the LTYPE.TTF (AKA Lucida Sans Typewriter) doesn't contain the 
glyph for \u25A1.
You should try another font.
--
Pascal

Le 18/08/2010 21:04, Eric Douglas a écrit : 

I'm trying to print a character to a PDF as #x25A1; which is supposed 
to be a square and it's printing a # character instead.

The 25A1 character should be in my font.  The PDF should be embedding 
LTYPE.TTF which comes with Windows XP.. 
Am I missing something or is FOP 1.0 missing something? 




RE: Configuring 1.0 Fonts (PDF rendering)

2010-08-30 Thread Mario Madunic
Thanks Jeremias.

Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries

-Original Message-
From: Jeremias Maerki [mailto:d...@jeremias-maerki.ch] 
Sent: Monday, August 30, 2010 9:59 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Configuring 1.0 Fonts (PDF rendering)

Basically, you can leave everything as it is except remove the
metrics-url attribute from the font tag. The font-triplet is
probably still necessary to make sure the name Helvetica is redirected
to your embedded font instead of the implicit base 14 font.

http://xmlgraphics.apache.org/fop/latest/fonts.html#register

HTH

On 27.08.2010 15:07:55 Mario Madunic wrote:
 Well I'm having one hell of a time making heads or tails of how to
 config Helvetica as a font for FOP 1.0 PDF rendering. I was using 0.94
 and need to test 1.0 for production and would like to configure
 Helvetica for this. While using 0.94 I created metric files for Arial
 as I was unable to do so for Helvetica. Read somewhere (searching mailing
 lists and ) that this is not necessary anymore and want to move to the
 corporate font for manuals.
 
 So my question is how can I configure Helvetica in 1.0 for PDF rendering? Any 
 insight will be appreciated. 
 
 Marijan (Mario) Madunic
 Publishing Specialist
 New Flyer Industries



Jeremias Maerki


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



Please consider the environment before printing this e-mail.

CONFIDENTIALITY STATEMENT: This communication (and  any and all information or 
material transmitted with this communication) is confidential, may be 
privileged and is intended only for the use of the intended recipient. If you 
are not the intended recipient, any review, retransmission, circulation, 
distribution, reproduction, conversion to hard copy, copying or other use of 
this communication, information or material is strictly prohibited and may be 
illegal. If you received this communication in error or if it is forwarded to 
you without the express authorization of New Flyer, please notify us 
immediately by telephone or by return email and permanently delete the 
communication, information and material from any computer, disk drive, diskette 
or other storage device or media. Thank you.


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



Re: Greek text in the HelloWorld example causes Severe Exception

2010-08-30 Thread Nikolaos Paraschou
Unfortunately FOP insists to put a # in place of ί.

I can confirm that Arial.ttf contains a CMAP entry for all the required
characters. I opened Arial.ttf with Character Map (the Windows utility for
viewing fonts). There I inserted code 03af and it showed the character
ί.
The same applies for FreeSans.ttf.

myconfig2.xml contains exactly this code:

?xml version=1.0 encoding=utf-8?

fop version=1.0
  renderers
renderer mime=application/pdf
  fonts
font embed-url=file:///C:/Users/nikos/MyFonts/arial.ttf
  font-triplet name=arial style=normal weight=normal/
/font
  /fonts
/renderer
   /renderers
/fop

Since I explicitly tell FOP to use arial.ttf, why does it not use it? I also
tried this on a Mac OS X 10.6 using Arial with no success. I get the same
warning telling iotatonos couldn't be found in font 'Symbol'.

Maybe I am doing something else wrong?

Nikos



2010/8/30 Spyros Papantoniou spyros.papanton...@gmail.com

 Dont use Symbol!
 Its a mess it has only the 24 Greek letters not accents, not dialysis...

 Find a font that has full UTF-8 glyph set in Greek,
 like on the Mac Arial, Times New Roman, Helvetica all have it.
 I dont have Windoze to check which fonts have the full glyph set.

 FreeSans I discovered is no good either, nor DINRg

 Spyros



 On 30 Αυγ 2010, at 1:04 π.μ., Nikolaos Paraschou wrote:

  We made some progress I think. I converted name.xml, name2fo.xsl
  and myconfig2.xml from ANSI to UTF-8 (all three files begin with
  ?xml version=1.0 encoding=UTF-8? ) and then ran the command:
 
  fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
 
  which produced the following output:
 
  C:\Users\nikos\Desktopfop -c myconfig2.xml -xml name.xml -xsl
 name2fo.xsl -pdf
  name.pdf
  30 +Ϋή 2010 12:37:38 ΏΉ org.apache.fop.events.LoggingEventListener
 processEvent
  WARNING: Glyph - (0x3af, iotatonos) not available in font Symbol.
 
  The word inside name.xml is Νίκος. After the conversion the pdf
  displays Hello, Ν#κος! (with the name aligned a bit lower than
  Hello,). Obviously, FOP isn't looking for iotatonos inside Arial.ttf
  or Freesans.ttf (I've tried it with both fonts), but instead it is
  trying to find iotatonos inside font Symbol. Why is this happening?
 
  I opened Arial.ttf and FreeSans.ttf with Character Map. The
  description these two fonts have for the character  ί  is:
 
  U+03AF: Greek Small Letter Iota With Tonos
 
  So, FOP is looking for  ί  in Arial and FreeSans as iotatonos but
  it's not there with that descritpion. Maybe that's why it's looking in
  font Symbol later on (correct me if I am wrong). How could this
  problem be solved?
 
  Thank you again,
  Nikos
 
 
  2010/8/30 Spyros Papantoniou spyros.papanton...@gmail.com:
  The Invalid byte 2 of 2-byte UTF-8 se points to not proper UTF
 encoding somewhere.
  I tested FOP 0.95 and it works with Greek!
  Do not use FreeSans, as it does include Greek glyphs [I found out the
 hard way..]
  I use Arial.ttf on the Mac with success.
 
 
  Are all your files UTF8 and their header UTF-8?  like:
 
   ?xml version=1.0 encoding=UTF-8?
 
  Spyros Papantoniou, PhD
 
 
 
 
 
 
  On 30 Αυγ 2010, at 12:10 π.μ., Nikolaos Paraschou wrote:
 
  First of all, thank you for your reply Spyros.
 
  I created myconfig2.xml with exactly the following code:
 
  fop version=1.0
   renderers
 renderer mime=application/pdf
   fonts
 font   embed-url=file:///Users/nikos/MyFonts/FreeSans.ttf
   font-triplet name=FreeSans style=normal weight=normal/
 /font
   /fonts
 /renderer
/renderers
  /fop
 
  and then I run the command:
 
  fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
 
  which produced again a severe exception:
 
  C:\Users\nikos\Desktopfop -c myconfig2.xml -xml name.xml -xsl
 name2fo.xsl -pdf
  name.pdf
  29 +Ϋή 2010 11:57:59 ΉΉ org.apache.fop.cli.Main startFOP
  SEVERE: Exception
  javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte
 UTF-8 sequenc
  e.
 at
 org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
 at
 org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
 at org.apache.fop.cli.Main.startFOP(Main.java:174)
 at org.apache.fop.cli.Main.main(Main.java:205)
  Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of
 2-byte UT
  F-8 sequence.
 at
 org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
  pl.java:780)
 at
 org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
  l.java:756)
 at
 org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
  l.java:1284)
 at
 org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
  l.java:1262)
 at
 org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
 ... 3 more
 
  -
 
  ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
  

Re: Greek text in the HelloWorld example causes Severe Exception

2010-08-30 Thread Spyros Papantoniou
How does your xsl look like?
It works for me though...

this is how I call the Arial fonts and it works:

fo:static-content flow-name=header-first
  fo:block font-size=10pt font-family=Symbol   text-align=right 
space-after.optimum=13pt border-after-color=black 
border-after-style=solid border-after-width=0.1pt
fo:table space-after.optimum=4pt
  fo:table-column column-width=19cm/
  fo:table-body
fo:table-row
  fo:table-cell
fo:block font-size=8pt font-family=Arial   
text-align=right
 ΕδφΑ1: Αναφορά Πρωτοκόλλου μεταξύ xsl:value-of 
select=$frmDay/.xsl:value-of select=$frmMonth/.xsl:value-of 
select=$frmYear/ και xsl:value-of select=$toDay/.xsl:value-of 
select=$toMonth/.xsl:value-of select=$toYear/
/fo:block
  /fo:table-cell
/fo:table-row
  /fo:table-body
/fo:table

  /fo:block
/fo:static-content




On 30 Αυγ 2010, at 7:37 μ.μ., Nikolaos Paraschou wrote:

 Unfortunately FOP insists to put a # in place of ί.
 
 I can confirm that Arial.ttf contains a CMAP entry for all the required 
 characters. I opened Arial.ttf with Character Map (the Windows utility for 
 viewing fonts). There I inserted code 03af and it showed the character ί.
 The same applies for FreeSans.ttf.
 
 myconfig2.xml contains exactly this code:
 
 ?xml version=1.0 encoding=utf-8?
 
 fop version=1.0
   renderers
 renderer mime=application/pdf
   fonts
 font embed-url=file:///C:/Users/nikos/MyFonts/arial.ttf
   font-triplet name=arial style=normal weight=normal/
 /font
   /fonts
 /renderer
/renderers
 /fop
 
 Since I explicitly tell FOP to use arial.ttf, why does it not use it? I also 
 tried this on a Mac OS X 10.6 using Arial with no success. I get the same 
 warning telling iotatonos couldn't be found in font 'Symbol'.
 
 Maybe I am doing something else wrong?
 
 Nikos
 
 
 
 2010/8/30 Spyros Papantoniou spyros.papanton...@gmail.com
 Dont use Symbol!
 Its a mess it has only the 24 Greek letters not accents, not dialysis...
 
 Find a font that has full UTF-8 glyph set in Greek,
 like on the Mac Arial, Times New Roman, Helvetica all have it.
 I dont have Windoze to check which fonts have the full glyph set.
 
 FreeSans I discovered is no good either, nor DINRg
 
 Spyros
 
 
 
 On 30 Αυγ 2010, at 1:04 π.μ., Nikolaos Paraschou wrote:
 
  We made some progress I think. I converted name.xml, name2fo.xsl
  and myconfig2.xml from ANSI to UTF-8 (all three files begin with
  ?xml version=1.0 encoding=UTF-8? ) and then ran the command:
 
  fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
 
  which produced the following output:
 
  C:\Users\nikos\Desktopfop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl 
  -pdf
  name.pdf
  30 +Ϋή 2010 12:37:38 ΏΉ org.apache.fop.events.LoggingEventListener 
  processEvent
  WARNING: Glyph - (0x3af, iotatonos) not available in font Symbol.
 
  The word inside name.xml is Νίκος. After the conversion the pdf
  displays Hello, Ν#κος! (with the name aligned a bit lower than
  Hello,). Obviously, FOP isn't looking for iotatonos inside Arial.ttf
  or Freesans.ttf (I've tried it with both fonts), but instead it is
  trying to find iotatonos inside font Symbol. Why is this happening?
 
  I opened Arial.ttf and FreeSans.ttf with Character Map. The
  description these two fonts have for the character  ί  is:
 
  U+03AF: Greek Small Letter Iota With Tonos
 
  So, FOP is looking for  ί  in Arial and FreeSans as iotatonos but
  it's not there with that descritpion. Maybe that's why it's looking in
  font Symbol later on (correct me if I am wrong). How could this
  problem be solved?
 
  Thank you again,
  Nikos
 
 
  2010/8/30 Spyros Papantoniou spyros.papanton...@gmail.com:
  The Invalid byte 2 of 2-byte UTF-8 se points to not proper UTF encoding 
  somewhere.
  I tested FOP 0.95 and it works with Greek!
  Do not use FreeSans, as it does include Greek glyphs [I found out the hard 
  way..]
  I use Arial.ttf on the Mac with success.
 
 
  Are all your files UTF8 and their header UTF-8?  like:
 
   ?xml version=1.0 encoding=UTF-8?
 
  Spyros Papantoniou, PhD
 
 
 
 
 
 
  On 30 Αυγ 2010, at 12:10 π.μ., Nikolaos Paraschou wrote:
 
  First of all, thank you for your reply Spyros.
 
  I created myconfig2.xml with exactly the following code:
 
  fop version=1.0
   renderers
 renderer mime=application/pdf
   fonts
 font   embed-url=file:///Users/nikos/MyFonts/FreeSans.ttf
   font-triplet name=FreeSans style=normal weight=normal/
 /font
   /fonts
 /renderer
/renderers
  /fop
 
  and then I run the command:
 
  fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
 
  which produced again a severe exception:
 
  C:\Users\nikos\Desktopfop -c myconfig2.xml -xml name.xml -xsl 
  name2fo.xsl -pdf
  name.pdf
  29 +Ϋή 

Re: Greek text in the HelloWorld example causes Severe Exception

2010-08-30 Thread Spyros Papantoniou
Symbol has no tonos whatsoever, FOP will always replace the unfound character 
with #.
Symbol has only {ΑΒΓΔ.. Ω, αβγφ.. ω} this makes 48 Greek characters total.

You have to use a font like Arial.ttf that includes the complete 128 greek 
glyphs.


Spyros Papantoniou, PhD



On 30 Αυγ 2010, at 7:37 μ.μ., Nikolaos Paraschou wrote:

 Unfortunately FOP insists to put a # in place of ί.
 
 I can confirm that Arial.ttf contains a CMAP entry for all the required 
 characters. I opened Arial.ttf with Character Map (the Windows utility for 
 viewing fonts). There I inserted code 03af and it showed the character ί.
 The same applies for FreeSans.ttf.
 
 myconfig2.xml contains exactly this code:
 
 ?xml version=1.0 encoding=utf-8?
 
 fop version=1.0
   renderers
 renderer mime=application/pdf
   fonts
 font embed-url=file:///C:/Users/nikos/MyFonts/arial.ttf
   font-triplet name=arial style=normal weight=normal/
 /font
   /fonts
 /renderer
/renderers
 /fop
 
 Since I explicitly tell FOP to use arial.ttf, why does it not use it? I also 
 tried this on a Mac OS X 10.6 using Arial with no success. I get the same 
 warning telling iotatonos couldn't be found in font 'Symbol'.
 
 Maybe I am doing something else wrong?
 
 Nikos
 
 
 
 2010/8/30 Spyros Papantoniou spyros.papanton...@gmail.com
 Dont use Symbol!
 Its a mess it has only the 24 Greek letters not accents, not dialysis...
 
 Find a font that has full UTF-8 glyph set in Greek,
 like on the Mac Arial, Times New Roman, Helvetica all have it.
 I dont have Windoze to check which fonts have the full glyph set.
 
 FreeSans I discovered is no good either, nor DINRg
 
 Spyros
 
 
 
 On 30 Αυγ 2010, at 1:04 π.μ., Nikolaos Paraschou wrote:
 
  We made some progress I think. I converted name.xml, name2fo.xsl
  and myconfig2.xml from ANSI to UTF-8 (all three files begin with
  ?xml version=1.0 encoding=UTF-8? ) and then ran the command:
 
  fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
 
  which produced the following output:
 
  C:\Users\nikos\Desktopfop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl 
  -pdf
  name.pdf
  30 +Ϋή 2010 12:37:38 ΏΉ org.apache.fop.events.LoggingEventListener 
  processEvent
  WARNING: Glyph - (0x3af, iotatonos) not available in font Symbol.
 
  The word inside name.xml is Νίκος. After the conversion the pdf
  displays Hello, Ν#κος! (with the name aligned a bit lower than
  Hello,). Obviously, FOP isn't looking for iotatonos inside Arial.ttf
  or Freesans.ttf (I've tried it with both fonts), but instead it is
  trying to find iotatonos inside font Symbol. Why is this happening?
 
  I opened Arial.ttf and FreeSans.ttf with Character Map. The
  description these two fonts have for the character  ί  is:
 
  U+03AF: Greek Small Letter Iota With Tonos
 
  So, FOP is looking for  ί  in Arial and FreeSans as iotatonos but
  it's not there with that descritpion. Maybe that's why it's looking in
  font Symbol later on (correct me if I am wrong). How could this
  problem be solved?
 
  Thank you again,
  Nikos
 
 
  2010/8/30 Spyros Papantoniou spyros.papanton...@gmail.com:
  The Invalid byte 2 of 2-byte UTF-8 se points to not proper UTF encoding 
  somewhere.
  I tested FOP 0.95 and it works with Greek!
  Do not use FreeSans, as it does include Greek glyphs [I found out the hard 
  way..]
  I use Arial.ttf on the Mac with success.
 
 
  Are all your files UTF8 and their header UTF-8?  like:
 
   ?xml version=1.0 encoding=UTF-8?
 
  Spyros Papantoniou, PhD
 
 
 
 
 
 
  On 30 Αυγ 2010, at 12:10 π.μ., Nikolaos Paraschou wrote:
 
  First of all, thank you for your reply Spyros.
 
  I created myconfig2.xml with exactly the following code:
 
  fop version=1.0
   renderers
 renderer mime=application/pdf
   fonts
 font   embed-url=file:///Users/nikos/MyFonts/FreeSans.ttf
   font-triplet name=FreeSans style=normal weight=normal/
 /font
   /fonts
 /renderer
/renderers
  /fop
 
  and then I run the command:
 
  fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
 
  which produced again a severe exception:
 
  C:\Users\nikos\Desktopfop -c myconfig2.xml -xml name.xml -xsl 
  name2fo.xsl -pdf
  name.pdf
  29 +Ϋή 2010 11:57:59 ΉΉ org.apache.fop.cli.Main startFOP
  SEVERE: Exception
  javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 
  sequenc
  e.
 at 
  org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
 at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
 at org.apache.fop.cli.Main.startFOP(Main.java:174)
 at org.apache.fop.cli.Main.main(Main.java:205)
  Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of 
  2-byte UT
  F-8 sequence.
 at 
  org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
  pl.java:780)
 at 
  org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
  l.java:756)
 at 

Re: Greek text in the HelloWorld example causes Severe Exception

2010-08-30 Thread Spyros Papantoniou
Here is my command that works [fop 0.95!]:

SJPMac2:fop095$ ./fop -xml list.xml -xsl printPDF.xsl -c ./conf095/fop.xconf  
-pdf printList.pdf

you need an xsl as well...
the xml with Nikos does not knwo which font to use:
my xsl contains explicit calls to the xml:

...xsl snippet:

fo:block font-size=12pt font-family=Arial   text-align=right 
border-after-color=black border-after-style=solid 
border-after-width=0.1pt
  ΕΚ2: Αναφορά Πρωτοκόλλου μεταξύ  xsl:value-of 
select=$frmDay/.xsl:value-of select=$frmMonth/.xsl:value-of 
select=$frmYear/ και xsl:value-of select=$toDay/.xsl:value-of 
select=$toMonth/.xsl:value-of select=$toYear/ τέλος
  /fo:block
...end xsl snippet...

Spyros


On 30 Αυγ 2010, at 7:37 μ.μ., Nikolaos Paraschou wrote:

 Unfortunately FOP insists to put a # in place of ί.
 
 I can confirm that Arial.ttf contains a CMAP entry for all the required 
 characters. I opened Arial.ttf with Character Map (the Windows utility for 
 viewing fonts). There I inserted code 03af and it showed the character ί.
 The same applies for FreeSans.ttf.
 
 myconfig2.xml contains exactly this code:
 
 ?xml version=1.0 encoding=utf-8?
 
 fop version=1.0
   renderers
 renderer mime=application/pdf
   fonts
 font embed-url=file:///C:/Users/nikos/MyFonts/arial.ttf
   font-triplet name=arial style=normal weight=normal/
 /font
   /fonts
 /renderer
/renderers
 /fop
 
 Since I explicitly tell FOP to use arial.ttf, why does it not use it? I also 
 tried this on a Mac OS X 10.6 using Arial with no success. I get the same 
 warning telling iotatonos couldn't be found in font 'Symbol'.
 
 Maybe I am doing something else wrong?
 
 Nikos
 
 
 
 2010/8/30 Spyros Papantoniou spyros.papanton...@gmail.com
 Dont use Symbol!
 Its a mess it has only the 24 Greek letters not accents, not dialysis...
 
 Find a font that has full UTF-8 glyph set in Greek,
 like on the Mac Arial, Times New Roman, Helvetica all have it.
 I dont have Windoze to check which fonts have the full glyph set.
 
 FreeSans I discovered is no good either, nor DINRg
 
 Spyros
 
 
 
 On 30 Αυγ 2010, at 1:04 π.μ., Nikolaos Paraschou wrote:
 
  We made some progress I think. I converted name.xml, name2fo.xsl
  and myconfig2.xml from ANSI to UTF-8 (all three files begin with
  ?xml version=1.0 encoding=UTF-8? ) and then ran the command:
 
  fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
 
  which produced the following output:
 
  C:\Users\nikos\Desktopfop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl 
  -pdf
  name.pdf
  30 +Ϋή 2010 12:37:38 ΏΉ org.apache.fop.events.LoggingEventListener 
  processEvent
  WARNING: Glyph - (0x3af, iotatonos) not available in font Symbol.
 
  The word inside name.xml is Νίκος. After the conversion the pdf
  displays Hello, Ν#κος! (with the name aligned a bit lower than
  Hello,). Obviously, FOP isn't looking for iotatonos inside Arial.ttf
  or Freesans.ttf (I've tried it with both fonts), but instead it is
  trying to find iotatonos inside font Symbol. Why is this happening?
 
  I opened Arial.ttf and FreeSans.ttf with Character Map. The
  description these two fonts have for the character  ί  is:
 
  U+03AF: Greek Small Letter Iota With Tonos
 
  So, FOP is looking for  ί  in Arial and FreeSans as iotatonos but
  it's not there with that descritpion. Maybe that's why it's looking in
  font Symbol later on (correct me if I am wrong). How could this
  problem be solved?
 
  Thank you again,
  Nikos
 
 
  2010/8/30 Spyros Papantoniou spyros.papanton...@gmail.com:
  The Invalid byte 2 of 2-byte UTF-8 se points to not proper UTF encoding 
  somewhere.
  I tested FOP 0.95 and it works with Greek!
  Do not use FreeSans, as it does include Greek glyphs [I found out the hard 
  way..]
  I use Arial.ttf on the Mac with success.
 
 
  Are all your files UTF8 and their header UTF-8?  like:
 
   ?xml version=1.0 encoding=UTF-8?
 
  Spyros Papantoniou, PhD
 
 
 
 
 
 
  On 30 Αυγ 2010, at 12:10 π.μ., Nikolaos Paraschou wrote:
 
  First of all, thank you for your reply Spyros.
 
  I created myconfig2.xml with exactly the following code:
 
  fop version=1.0
   renderers
 renderer mime=application/pdf
   fonts
 font   embed-url=file:///Users/nikos/MyFonts/FreeSans.ttf
   font-triplet name=FreeSans style=normal weight=normal/
 /font
   /fonts
 /renderer
/renderers
  /fop
 
  and then I run the command:
 
  fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
 
  which produced again a severe exception:
 
  C:\Users\nikos\Desktopfop -c myconfig2.xml -xml name.xml -xsl 
  name2fo.xsl -pdf
  name.pdf
  29 +Ϋή 2010 11:57:59 ΉΉ org.apache.fop.cli.Main startFOP
  SEVERE: Exception
  javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 
  sequenc
  e.
 at 
  org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
 at 

RE: edge effects with consecutive colored blocks

2010-08-30 Thread Trevor Nicholls
Sorry, I omitted to say this is with FOP 0.95 on Fedora Linux.

Cheers
T

-Original Message-
From: Trevor Nicholls [mailto:tre...@castingthevoid.com] 
Sent: Tuesday, 31 August 2010 7:05 a.m.
To: fop-users@xmlgraphics.apache.org
Subject: edge effects with consecutive colored blocks

Hi

Where my input XML contains fragment elements I am generating fo:blocks
with a grey background and black border. Consecutive fragments are coalesced
into what looks like a single block with one outer border (but they need to
be separate fo:blocks so that page breaks occur at a block boundary). 

This is working, but I am getting some edge effects. These are apparent as
faint ghostly lines where the block boundaries occur - these must be due to
some sort of rounding/floating arithmetic as they do not appear consistently
at every boundary nor do they appear consistently on all
screens/resolutions.

I presume I am not the first person to see this kind of artefact, but Google
hasn't helped me find a solution. Can anyone here help me? Do I need to
overlay the blocks somehow (and how does one do that anyway)?

Thanks for any hints
Trevor

===

The relevant xsl-fo templates are these:

  xsl:attribute-set name=fragment.base.set
xsl:attribute name=font-familyCourier, monospace/xsl:attribute
xsl:attribute name=white-space-treatmentpreserve/xsl:attribute
xsl:attribute name=white-space-collapsefalse/xsl:attribute
xsl:attribute name=keep-together.within-pagealways/xsl:attribute
xsl:attribute name=font-size9pt/xsl:attribute
xsl:attribute name=background-color#e0e0e0/xsl:attribute
xsl:attribute name=padding-before3pt/xsl:attribute
xsl:attribute name=padding-after3pt/xsl:attribute
xsl:attribute name=padding-start6pt/xsl:attribute
xsl:attribute name=padding-end6pt/xsl:attribute
xsl:attribute name=margin0/xsl:attribute
xsl:attribute name=border-stylesolid/xsl:attribute
xsl:attribute name=border-width0.25mm/xsl:attribute
  /xsl:attribute-set
  
  xsl:attribute-set name=fragment.set
use-attribute-sets=fragment.base.set
xsl:attribute name=border-colorblack/xsl:attribute
xsl:attribute name=space-before.minimum0.4em/xsl:attribute
xsl:attribute name=space-before.optimum0.5em/xsl:attribute
xsl:attribute name=space-before.maximum0.6em/xsl:attribute
xsl:attribute name=space-after.minimum0.4em/xsl:attribute
xsl:attribute name=space-after.optimum0.5em/xsl:attribute
xsl:attribute name=space-after.maximum0.6em/xsl:attribute
  /xsl:attribute-set
  
  xsl:attribute-set name=fragment.top.set
use-attribute-sets=fragment.base.set
xsl:attribute name=border-top-colorblack/xsl:attribute
xsl:attribute name=border-left-colorblack/xsl:attribute
xsl:attribute name=border-right-colorblack/xsl:attribute
xsl:attribute name=border-bottom-color#e0e0e0/xsl:attribute
xsl:attribute name=space-before.minimum0.4em/xsl:attribute
xsl:attribute name=space-before.optimum0.5em/xsl:attribute
xsl:attribute name=space-before.maximum0.6em/xsl:attribute
xsl:attribute name=space-after0em/xsl:attribute
  /xsl:attribute-set
  
  xsl:attribute-set name=fragment.middle.set
use-attribute-sets=fragment.base.set
xsl:attribute name=border-top-color#e0e0e0/xsl:attribute
xsl:attribute name=border-left-colorblack/xsl:attribute
xsl:attribute name=border-right-colorblack/xsl:attribute
xsl:attribute name=border-bottom-color#e0e0e0/xsl:attribute
xsl:attribute name=space-before0em/xsl:attribute
xsl:attribute name=space-after0em/xsl:attribute
  /xsl:attribute-set
  
  xsl:attribute-set name=fragment.bottom.set
use-attribute-sets=fragment.base.set
xsl:attribute name=border-top-color#e0e0e0/xsl:attribute
xsl:attribute name=border-left-colorblack/xsl:attribute
xsl:attribute name=border-right-colorblack/xsl:attribute
xsl:attribute name=border-bottom-colorblack/xsl:attribute
xsl:attribute name=space-before0em/xsl:attribute
xsl:attribute name=space-after.minimum0.4em/xsl:attribute
xsl:attribute name=space-after.optimum0.5em/xsl:attribute
xsl:attribute name=space-after.maximum0.6em/xsl:attribute
  /xsl:attribute-set
  
  xsl:template
match=fragment[not(preceding-sibling::*[1][self::fragment])]
xsl:apply-templates select=. mode=inlist /
  /xsl:template

  xsl:template match=fragment mode=inlist
xsl:choose
  xsl:when test=not(preceding-sibling::*[1][self::fragment])
xsl:choose
  xsl:when test=not(following-sibling::*[1][self::fragment])
!-- sole fragment --
fo:block xsl:use-attribute-sets=fragment.set 
  xsl:apply-templates /
/fo:block
  /xsl:when
  xsl:otherwise
!-- first fragment --
fo:block xsl:use-attribute-sets=fragment.top.set 
  xsl:apply-templates /
/fo:block
  /xsl:otherwise
/xsl:choose
  /xsl:when
  xsl:otherwise
xsl:choose
  xsl:when 

RE: edge effects with consecutive colored blocks

2010-08-30 Thread Trevor Nicholls
Hi Jeremias

I am using Adobe Reader 9.3.4 and I can see the Smooth Line Art option in
the preferences, but it is always greyed out (and checked!). It seems to be
a forced setting regardless of the Smooth text setting: none, monitor, or
laptop/LCD. None of these alternatives seem to make any difference to what
is displayed. Itried playing with the other settings on that page but they
didn't help either.

You are correct that when I send the document to the printer the grey
regions do not have gaps, hooray! But I noticed another problem (less
apparent on the screen), which is that there is a tiny grey dot in the side
border at each block boundary. Presumably a black border-left and a grey
border-top are competing, and the top border is winning the corner. Is there
a technique for making the side border take precedence to avoid this?

Cheers
T

-Original Message-
From: Jeremias Maerki [mailto:d...@jeremias-maerki.ch] 
Sent: Tuesday, 31 August 2010 7:29 a.m.
To: fop-users@xmlgraphics.apache.org
Subject: Re: edge effects with consecutive colored blocks

Trevor, try turning off Smooth Line Art in Acrobat Reader (Preferences,
Page Display). If the effects go away, you'll know that it's
anti-aliasing that causes this. I'll bet it's that but we can't do much
about it. Won't happen in print. HTH

On 30.08.2010 21:05:15 Trevor Nicholls wrote:
 Hi
 
 Where my input XML contains fragment elements I am generating fo:blocks
 with a grey background and black border. Consecutive fragments are
coalesced
 into what looks like a single block with one outer border (but they need
to
 be separate fo:blocks so that page breaks occur at a block boundary). 
 
 This is working, but I am getting some edge effects. These are apparent as
 faint ghostly lines where the block boundaries occur - these must be due
to
 some sort of rounding/floating arithmetic as they do not appear
consistently
 at every boundary nor do they appear consistently on all
 screens/resolutions.
 
 I presume I am not the first person to see this kind of artefact, but
Google
 hasn't helped me find a solution. Can anyone here help me? Do I need to
 overlay the blocks somehow (and how does one do that anyway)?
 
 Thanks for any hints
 Trevor
 
 ===
 
 The relevant xsl-fo templates are these:
 
   xsl:attribute-set name=fragment.base.set
 xsl:attribute name=font-familyCourier, monospace/xsl:attribute
 xsl:attribute name=white-space-treatmentpreserve/xsl:attribute
 xsl:attribute name=white-space-collapsefalse/xsl:attribute
 xsl:attribute name=keep-together.within-pagealways/xsl:attribute
 xsl:attribute name=font-size9pt/xsl:attribute
 xsl:attribute name=background-color#e0e0e0/xsl:attribute
 xsl:attribute name=padding-before3pt/xsl:attribute
 xsl:attribute name=padding-after3pt/xsl:attribute
 xsl:attribute name=padding-start6pt/xsl:attribute
 xsl:attribute name=padding-end6pt/xsl:attribute
 xsl:attribute name=margin0/xsl:attribute
 xsl:attribute name=border-stylesolid/xsl:attribute
 xsl:attribute name=border-width0.25mm/xsl:attribute
   /xsl:attribute-set
   
   xsl:attribute-set name=fragment.set
 use-attribute-sets=fragment.base.set
 xsl:attribute name=border-colorblack/xsl:attribute
 xsl:attribute name=space-before.minimum0.4em/xsl:attribute
 xsl:attribute name=space-before.optimum0.5em/xsl:attribute
 xsl:attribute name=space-before.maximum0.6em/xsl:attribute
 xsl:attribute name=space-after.minimum0.4em/xsl:attribute
 xsl:attribute name=space-after.optimum0.5em/xsl:attribute
 xsl:attribute name=space-after.maximum0.6em/xsl:attribute
   /xsl:attribute-set
   
   xsl:attribute-set name=fragment.top.set
 use-attribute-sets=fragment.base.set
 xsl:attribute name=border-top-colorblack/xsl:attribute
 xsl:attribute name=border-left-colorblack/xsl:attribute
 xsl:attribute name=border-right-colorblack/xsl:attribute
 xsl:attribute name=border-bottom-color#e0e0e0/xsl:attribute
 xsl:attribute name=space-before.minimum0.4em/xsl:attribute
 xsl:attribute name=space-before.optimum0.5em/xsl:attribute
 xsl:attribute name=space-before.maximum0.6em/xsl:attribute
 xsl:attribute name=space-after0em/xsl:attribute
   /xsl:attribute-set
   
   xsl:attribute-set name=fragment.middle.set
 use-attribute-sets=fragment.base.set
 xsl:attribute name=border-top-color#e0e0e0/xsl:attribute
 xsl:attribute name=border-left-colorblack/xsl:attribute
 xsl:attribute name=border-right-colorblack/xsl:attribute
 xsl:attribute name=border-bottom-color#e0e0e0/xsl:attribute
 xsl:attribute name=space-before0em/xsl:attribute
 xsl:attribute name=space-after0em/xsl:attribute
   /xsl:attribute-set
   
   xsl:attribute-set name=fragment.bottom.set
 use-attribute-sets=fragment.base.set
 xsl:attribute name=border-top-color#e0e0e0/xsl:attribute
 xsl:attribute name=border-left-colorblack/xsl:attribute
 xsl:attribute name=border-right-colorblack/xsl:attribute
 

Re: Greek text in the HelloWorld example causes Severe Exception

2010-08-30 Thread Nikolaos Paraschou

 you need an xsl as well...

the xml with Nikos does not knwo which font to use:
 my xsl contains explicit calls to the xml:


This is exactly the reason it didn't work. Thank you Spyros!

I edited name2fo.xsl. It was:

fo:block
Hello, xsl:value-of select=name/!
/fo:block

and i changed it to:

fo:block font-family=arial
Hello, xsl:value-of select=name/!
/fo:block

So the font family must be explicitly defined in the XSLT stylesheet too.

Finally, problem solved.

Glenn, thank you for your reply too.

Regards,
Nikos