AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images

2005-07-20 Thread michella
Thank you for your reply,

I actually checked out the last trunk repositery of FOP, as you told me. I may 
be doing something wrong, but the trunk downloaded doesn't contain any 
build(.bat) file that is set as required in the FOP building documentation URL.

The FOP version I actually use is the latest binary release (fop-0.20.5 windows)

Regards

Lawrence

-Ursprüngliche Nachricht-
Von: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 19. Juli 2005 17:45
An: fop-users@xmlgraphics.apache.org
Betreff: Re: AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG 
Images



On 19.07.2005 17:27:38 michella wrote:
 I already tried this alternate way, but it didn't change anything.
 (StrokeSVGText set to false)
 
 The SVG contains more or less 40 to 60 graphics (g). Each one having
 text with ellipses, rect, and so on.
 
 I tried the external Batik Rasterizer SVG to pdf conversion. The Pdf
 output is small (300k per SVG) ... and perfect.

The PDF Transcoder delivered with Batik is based on the FOP Trunk code
(redesign). It could very well be that there are considerable
improvements for your use case.

If all you do is basically use XSL-FO to place a set of SVGs on several
pages you could try the trunk source code.
http://xml.apache.org/fop/download.html#source

There's a little catch ATM: A bug may render the SVGs too small. I
already fixed that on my machine at home (I'm at ApacheCon ATM) but I'm
pretty sure I fixed it the wrong way. I still have to investigate that
and probably won't be able to fix it before next week. As a momentary
work-around you could make sure that the if-statement in the line below
(found in PDFXMLHandler.java) always resolves to false:

old:
if (!at.isIdentity()) {

new:
if (false  !at.isIdentity()) {

Depending on your skills that may sound adventurous, but that's all I
can offer right now.

 The external-graphics tag included has two xsl-fo:blocks as parents (ie
 parent + grandparent). Could it be the problem?

No.

 Second : As you'll see, the graphics blocks are all in one single
 page-sequence and flow. Is there a problem with that?

No.

 FO Abstract :
 
 fo:page-sequence master-reference=Title font-family=Frutiger45Light
   fo:flow flow-name=xsl-region-body
   fo:block id=d1e390153.4pct_Sortierung_NF break-before=page
   fo:block text-align=center padding-after=15pt
   fo:external-graphic 
 src=../Output/Bilder/EA_Diagrammen/SVG/d211_PDF.svg 
 content-type=content-type: xml/svg block-  
 progression-dimension=17cm inline-progression-dimension=25.7cm/
   /fo:block
   /fo:block
   (... + 48 times identical blocs with SVG graphics...)
   /fo:flow
 /fo:page-sequence
 
 Thank you for your help
 
 Lawrence Michel


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images

2005-07-20 Thread Jeremias Maerki

On 20.07.2005 09:31:45 michella wrote:
 Thank you for your reply,
 
 I actually checked out the last trunk repositery of FOP, as you told me.
 I may be doing something wrong, but the trunk downloaded doesn't
 contain any build(.bat) file that is set as required in the FOP building
 documentation URL.

I know. :-( The documentation has not been updated to reflect the
changes in the development. We don't include Apache Ant anymore but
require it installed on your machine. We're following Ant best practices
here. Please install Apache Ant on your machine and then just call ant
in the FOP directory to build the trunk sources.

http://ant.apache.org/manual/
http://ant.apache.org/manual/install.html#installing

 The FOP version I actually use is the latest binary release (fop-0.20.5 
 windows)



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images

2005-07-20 Thread Jeremias Maerki

On 20.07.2005 12:02:47 michella wrote:
 Hi again,
 
 thanks for your help.
 
 I successfully installed Ant and the latest trunk version of Fop. After
 a bit while fo:table-column redesign requirement, I finally got an
 output PDF. Unfortunately, the SVG Images could not be handled
 correctly. I got the following error :
 
 No ImageReader for this type of image ((some relative path)/svgImage.svg)
 Image not available : (some relative path)/svgImage.svg

Can you try with absolute paths, please? The image loading stuff may not
be working as it should. If that doesn't help can you please post a
small SVG graphic that produces this problem? Maybe there's also
something wrong with the SVG detection. FOP doesn't really check the
filename extension to detect the file format.

Sorry for the trouble, but we're on the bleeding edge here. :-)

I'll try to find some time between session to try to reproduce what
you're experiencing. No promises, though. It's a busy place here.

 Do I have to add any Batik stuff manually (if not automatically
 supplied in the FOP installed version)?

No. You should use the batik.jar in the lib directory.

 Thanks for your (really!) precious help

You're welcome. I hope we can get somewhere. :-)

 Gruss aus Bern ;-)

:-) Greetings from Stuttgart (ApacheCon), normally located in Lucerne.


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images

2005-07-20 Thread michella
Hi Jeremias,

I set an absolute Path, and image is now inserted. OK,

But the quality of insertion is really bad. It won't stick it in the middle, 
and don't have it sized as specified in the SVG header width and height. (the 
old version of fop did the work properly!). Here the sample FO and SVG header :

FO: 

fo:block text-align=center padding-after=15pt
fo:external-graphic 
src=file:///C:/Documents%20and%20Settings/michella/My

%20Documents/EAI/InformationsManagement/XML/Output/Bilder/EA_Diagrammen/SVG/d192_PDF.svg
 content-type=content-type:xml/svg block-progression-dimension=17cm 
inline-progression-dimension=25.7cm/
/fo:block

The SVG Header :

svg xmlns:xlink=http://www.w3.org/1999/xlink; width=355 height=800 
viewBox=75 12 1237 2791 preserveAspectRatio=xMinYMin meet kerning=0 
xml:space=preserve style=stroke: black; fill: none; g...

I may send you the PDF Output in your direct email only (confidentiality 
purposes :-( )

Thanks ;-)

Lawrence


-Ursprüngliche Nachricht-
Von: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 20. Juli 2005 12:31
An: fop-users@xmlgraphics.apache.org
Betreff: Re: AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG 
Images



On 20.07.2005 12:02:47 michella wrote:
 Hi again,
 
 thanks for your help.
 
 I successfully installed Ant and the latest trunk version of Fop. After
 a bit while fo:table-column redesign requirement, I finally got an
 output PDF. Unfortunately, the SVG Images could not be handled
 correctly. I got the following error :
 
 No ImageReader for this type of image ((some relative path)/svgImage.svg)
 Image not available : (some relative path)/svgImage.svg

Can you try with absolute paths, please? The image loading stuff may not
be working as it should. If that doesn't help can you please post a
small SVG graphic that produces this problem? Maybe there's also
something wrong with the SVG detection. FOP doesn't really check the
filename extension to detect the file format.

Sorry for the trouble, but we're on the bleeding edge here. :-)

I'll try to find some time between session to try to reproduce what
you're experiencing. No promises, though. It's a busy place here.

 Do I have to add any Batik stuff manually (if not automatically
 supplied in the FOP installed version)?

No. You should use the batik.jar in the lib directory.

 Thanks for your (really!) precious help

You're welcome. I hope we can get somewhere. :-)

 Gruss aus Bern ;-)

:-) Greetings from Stuttgart (ApacheCon), normally located in Lucerne.


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Almost-Solved - Huge size of Output PDF when inserting 49 SVG Images

2005-07-20 Thread michella
Back ...

I did the java modifications you proposed, and it worked. ;-)

As you already said, there is a scaling problem still to be solved. In my 
specific case, my FO documents has inline- and block-progression-dimension as 
image block parameters set to specific centimeters values. Does the actual FOP 
implementation still handle this case (as it was the case in the previous 
version)?

Again thank you for your precious help

Lawrence

-Ursprüngliche Nachricht-
Von: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 20. Juli 2005 15:28
An: fop-users@xmlgraphics.apache.org
Betreff: Re: AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG 
Images


Remember the little catch I wrote about yesterday? There's a work-around
there. I don't know if it fixes everything but at least the scaling.

On 20.07.2005 15:20:19 michella wrote:
 But the quality of insertion is really bad. It won't stick it in the
 middle, and don't have it sized as specified in the SVG header width
 and height. (the old version of fop did the work properly!). Here the sample
 FO and SVG header :


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PDF Header alignment

2005-07-20 Thread JBryant
You can set the alignment properties on the blocks within the table cells, 
thus:

fo:table table-layout=fixed
  fo:table-column column-width=2in/
  fo:table-column column-width=2.5in/
  fo:table-column column-width=2in/
  fo:table-body
fo:table-row
  fo:table-cell
 fo:block text-align=leftLeft footer stuff here/fo:block
  /fo:table-cell
  fo:table-cell
 fo:block text-align=centerCenter footer stuff here/fo:block
  /fo:table-cell
  fo:table-cell
 fo:block text-align=rightRight footer stuff here/fo:block
  /fo:table-cell
/fo:table-row
  /fo:table-body
/fo:table


The footer definition I actually use for most of the documents for this 
client is:

  fo:table table-layout=fixed
fo:table-column column-width=2in/
fo:table-column column-width=2.5in/
fo:table-column column-width=2in/
fo:table-body
  fo:table-row
fo:table-cell
  fo:block xsl:use-attribute-sets=footerleft
Date prepared: xsl:value-of 
select=format-date(current-date(),'[D1] [MNn] [Y0001]')/
  /fo:block
/fo:table-cell
fo:table-cell
  fo:block xsl:use-attribute-sets=footercenter
Confidential and Proprietary
  /fo:block
/fo:table-cell
fo:table-cell
  fo:block xsl:use-attribute-sets=footerright
fo:page-number /
  /fo:block
/fo:table-cell
  /fo:table-row
  fo:table-row
fo:table-cell number-columns-spanned=3
  fo:block xsl:use-attribute-sets=footercenter
Copyright xsl:value-of select=$copyrightYears/, 
xsl:value-of select=$copyrightOwner/. All Rights Reserved
  /fo:block
/fo:table-cell
  /fo:table-row
/fo:table-body
  /fo:table

Then I define the alignment in the named attribute set (which I keep in a 
separate XSL file and import into several kinds of documents).

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help about FOP 1.0 DR1

2005-07-20 Thread Jeremias Maerki

On 20.07.2005 17:26:04 David Xicota Adell wrote:
 Basically we need the widow-orphan lines features. 

Ok, this should already work in the trunk code.

 And some advanced line treatment such:
  - Do not end X number of lines with the same word.
  - Do not start X number of lines with the same word.
  - Do not end lines with some characters.

Ok, that is indeed advanced and, as far as I can see, not in the
specification. If you need something like that you will most probably
have to implement it yourself.


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]