xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Douglas" <edoug...@blockhouse.com>
Subject RE: Problems with SVG display as background to region-body (FOP-Trunk)
Date Wed, 07 Jul 2010 18:32:46 GMT
How are you calling FOP, and what OS?

I personally use embedded code to reference the classes directly from a
Java extension language called BBj (which you can find at
www.basis.com).  I run all my programs in webstart which tells me what
it's doing in the Java console.  If you go into Java on the Windows
Control Panel there's an option to make the Java Console visible.  This
shows me all the warnings FOP puts out which say there's a problem but
it's continuing on anyway.  These include things file not found messages
on href links, and the overrun messages saying text didn't fit in a
block.  You can watch here for your messages about a problem finding the
svg files, or you can configure the logger.  Depending how you're
referencing FOP there is some information on the site about setting up
the logs.

How are you generating the FO?  On mine I start with an XML file and an
XSL file, and using embedded code I don't get a physical FO file, so I
have no idea what impact it may have on the FO code that I paste the SVG
for an image directly into my XSL versus pulling it in with the href to
another file.  All our software runs on machines which typically have 64
bit processors with a 32 bit OS.

Check the FAQ on the website.  If FOP is finding your svg file, another
option is it may be running on a headless server?

-----Original Message-----
From: Mario Madunic [mailto:Mario_Madunic@newflyer.com] 
Sent: Wednesday, July 07, 2010 2:00 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Problems with SVG display as background to region-body
(FOP-Trunk)

Eric,

I'm keeping away from having the SVGs inline. The FO file will be 250+
megs and I'm trying to keep the size of the FO as small as possible if I
need to debug it and/or issues with running such a big file on my 32bit
machine.

I did a test of some SVGs inline for one section (out of 21). With the
trunk it was still a bunch blanks where the SVGs should appear. At one
point I did believe it was the SVGs themselves as we have had issues
with Corel Designer 9 files upped to Corel Designer 12 files and
exporting SVGs from Designer 12. Certain ellipses and rectangles have a
transform function attached to an attribute(can't name it off the top of
my head) that the various viewers choked on and displayed thick black
lines around the object. But that being said, I've been able to view the
SVGs in IE, Firefox, GIMP, Inkscape, and Corel Designer X4, which has
lead me to believe that the SVGs are not really the issue here, but not
innocent.

At the moment all I can think of as a culprit is that my build of the
trunk is somehow buggy. Could I be missing some JARs from the lib dir?

0.94 is giving us the expected output with a few minor issues, but all
the SVGs are appearing in the output. So we are happy.

Thanks for your help with this issue but I do need to move on to other
tasks related to our XML (DITA and Excel XML spreadsheet) manuals to PDF
project.

Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries

-----Original Message-----
From: Eric Douglas [mailto:edouglas@blockhouse.com]
Sent: Wednesday, July 07, 2010 12:25 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Problems with SVG display as background to region-body
(FOP-Trunk)

I never got FOP to work with any images in external files, at least with
a reference which works on different machines.  I haven't had a chance
to revisit that yet but I will figure it out.  I had figured out a
format for the href which worked for svg and not for other image formats
but it was running on the server and when I tried it on the client it
also just displayed blank with a message in java console showing file
not found.  I was testing full http: and file: paths.  I didn't try
relative path because I wasn't sure what that should be relative to (my
program with the embedded code calling the fop classes, my fop.jar, and
my xsl file and image files are all in different paths).

If you're just using svg and putting it instream you could do what I did
for now and open the svg file in a text editor and copy and paste it
into the xsl.


-----Original Message-----
From: Mario Madunic [mailto:Mario_Madunic@newflyer.com]
Sent: Wednesday, July 07, 2010 12:44 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Problems with SVG display as background to region-body
(FOP-Trunk)

Thanks Tom for the code. Tried it and still blank space where the svg
should be. (Tested with absolute and relative paths).

Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries

-----Original Message-----
From: Tom Browder [mailto:tom.browder@gmail.com]
Sent: Tuesday, July 06, 2010 12:28 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Problems with SVG display as background to region-body
(FOP-Trunk)

I'm not sure if this would help, but I've been able to use the trunk and
an external svg file like this:

          <fo:instream-foreign-object content-width='1.5in'
content-height='auto' text-align='center'>
            <xi:include href="images/value-xhairs-only.svg"/><!--
relative svg file name -->
          </fo:instream-foreign-object>

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
USA



On Tue, Jul 6, 2010 at 10:21, Mario Madunic <Mario_Madunic@newflyer.com>
wrote:
> Read the graphics.html for FOP and it doesn't say how to construct a
link to an SVG that works. It does say that there were changes with
0.95+.
>
> Ran the build.xml in the trunkdir/examples/fo to see the external.fo
example. The SVGs did not appear in the final PDF tests/external.pdf
also.
>
> Well I'm frustrated and am moving back to 0.94 as I'm getting the
expected output when it comes to using SVGs. Hopefully someone will post
how to construct references to SVGs. All the links created to PNGs and
JPGs (only a handful of these) are appearing fine and the SVGs reference
is built the same as those for PNG and JPG image files.
>
> Thanks for your help Eric.
>
> Marijan (Mario) Madunic
> Publishing Specialist
> New Flyer Industries
>
> -----Original Message-----
> From: Eric Douglas [mailto:edouglas@blockhouse.com]
> Sent: Tuesday, July 06, 2010 9:26 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Problems with SVG display as background to region-body
> (FOP-Trunk)
>
> I haven't gotten anything but blanks for external-graphic because it 
> keeps saying it can't find the file.  I haven't researched yet why, if

> there's a problem with FOP or just a problem with the format of my 
> link to the file.  I haven't tested 0.94, only 0.95 and Trunk.
>
> I don't know if there is a log file.  That may depend on how you run
it.
> I run it in webstart and I set my Java Console to visible in the 
> Control Panel, so I can see warnings logged there.  You may need to 
> set up log4j.  That may be able to write it to a file, I haven't
tested.
>
> Yes, I misread your message about the 20 meg FO and thought that was 
> the size of a PDF.  70 megs for one PDF sounds even more insanely 
> large, though it may be normal depending on the number of pages, 
> images, and links.  I haven't put any links in mine thus far.  I read 
> someone on the list thought links were taking up a lot of space.  I 
> don't have an FO file on mine.  I just pass in an XML file and an XSL 
> file to generate either a PDF or a printout.  I'm assuming it 
> generated FO code in that process but it apparently keeps it in 
> memory.  With the way I'm using the embedded code I wouldn't even know
how to get the FO into a file.
>
> There is this in the documentation:
> After the Apache FOP 0.94 release, the image handling subsystem has 
> been rewritten...
> The actual image loading framework no longer resides in Apache FOP, 
> but was instead placed in XML Graphics Commons.
> http://xmlgraphics.apache.org/fop/0.95/graphics.html
>
> -----Original Message-----
> From: Mario Madunic [mailto:Mario_Madunic@newflyer.com]
> Sent: Tuesday, July 06, 2010 10:09 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Problems with SVG display as background to region-body
> (FOP-Trunk)
>
> I'm mystified as to why 0.94 has no problem with external-graphic (and

> in my case SVGs) and using SVGS as background and the trunk does.
>
> You must of misunderstood me, the FO file is down to 20megs, the PDF 
> with all SVGs, linking, and such is around 70megs. There are 500+ full

> page SVGS and 15000+ links (mainly in indexes). It is a 1400+ page 
> parts manual. It is quite impressive when done, if I might say so 
> myself. We run the entire process on a 12gig Ram 64bit Windows XP
machine.
>
> Eric, you are exactly right in that I'm also seeing a blank space 
> where external-graphic should be placing and SVG.
>
> I'll see if I can find the log, or if there isn't one at the moment, 
> then have it created.
>
> Thanks for your insight and relating your experience with this issue.
>
> Marijan (Mario) Madunic
> Publishing Specialist
> New Flyer Industries
>
> -----Original Message-----
> From: Eric Douglas [mailto:edouglas@blockhouse.com]
> Sent: Tuesday, July 06, 2010 8:47 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Problems with SVG display as background to region-body
> (FOP-Trunk)
>
> I had too many problems with external-graphic, is why I'm using 
> instream-foreign-object.  When I get time I need to take another look 
> at getting external-graphic to work.  If you're having the same 
> problem I was having, everything prints fine except the 
> external-graphic space is blank, and if you can see the Java Console 
> it will show logs of file not found.
>
> 20 megs sounds ridiculously large for a PDF file.  If you're embedding

> images, the problem is no doubt the inclusion of ridiculously large 
> image files.  The largest reports I've generated so far are around 
> 44kb for a 1 page report and an 84kb 7 page report which includes this

> svg image 3 times per page.. At that ratio a 20 meg file should be 
> over 1600 pages..
>
>
> -----Original Message-----
> From: Mario Madunic [mailto:Mario_Madunic@newflyer.com]
> Sent: Tuesday, July 06, 2010 9:28 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Problems with SVG display as background to region-body
> (FOP-Trunk)
>
> Eric,
>
> I'm using external-graphic for all non-background images to keep the 
> file size down. I have the FO file down to around 20 megs from 
> whopping 250 megs. I also remove all the <xsl:comments /> I place in 
> the output, this saves another 20 megs. They are used to inform me 
> where the various attributes and their values are coming from for
style debugging.
>
> I'll try and place them inline and see what happens.
>
> If you don't mind can you post one of your SVGs? Just want to see the 
> root element (don't need the content itself) and any DTD/XSD 
> declarations. I want to compare what you have and see how mine are 
> different, if there any differences.
>
> Thanks
>
> Marijan (Mario) Madunic
> Publishing Specialist
> New Flyer Industries
>
> From: Eric Douglas [mailto:edouglas@blockhouse.com]
> Sent: Tuesday, July 06, 2010 8:10 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Problems with SVG display as background to region-body
> (FOP-Trunk)
>
> My SVG images appear find, using 0.95 and the Trunk, but I haven't 
> tried background images.  I'm drawing the SVG within
instream-foreign-object.
>
> ________________________________________
> From: Mario Madunic [mailto:Mario_Madunic@newflyer.com]
> Sent: Tuesday, July 06, 2010 9:00 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: Problems with SVG display as background to region-body
> (FOP-Trunk) I have the following as a child of simple-page-master
>
> <fo:region-body region-name="sectionBody_Section"
> background-image="url(file:graphics/partsTable_4ColBG.svg)"
> background-repeat="no-repeat" margin-top="{$g_MarginTop}"
> margin-bottom="{$g_MarginBottom}" margin-right="{$g_MarginInside}"
> margin-left="{$g_MarginOutside}" />
>
> I've tried various values for background-image, from relative to 
> absolute paths, and other formats for file: (ie. file:///), and with 
> or without url(). Everything I tried basically worked with 0.94 but 
> once I'm using the Trunk, no SVG appears in the output as a background

> or even as an external-graphic. Note this happens with all the SVGS. 
> Below is the SVG partsTable_4ColBG.svg.
>
> Is it a problem with the SVG itself or how I'm referencing the SVG?
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE svg 
> PUBLIC "-//W3C//DTD SVG 20000802//EN"
> "http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd">
> <svg width="7.25in" height="9.3625in">
> <!-- vertical border lines -->
> <line x1="0.01in" y1="0.01in" x2="0.01in" y2="9.3625in" stroke="black"
> stroke-width="0.02in" /> <line x1="7.24in" y1="0.01in" x2="7.24in"
> y2="9.3625in" stroke="black" stroke-width="0.02in" /> <line
x1="0.01in"
> y1="0.35in" x2="7.24in" y2="0.35in" stroke="black"
stroke-width="0.01in"
> />
> <!-- horizontal border lines -->
> <line x1="0.5in" y1="0.01in" x2="0.5in" y2="9.3625in" stroke="black"
> stroke-width="0.01in" /> <line x1="1.0in" y1="0.01in" x2="1.0in"
> y2="9.3625in" stroke="black" stroke-width="0.01in" /> <line x1="2.2in"
> y1="0.01in" x2="2.2in" y2="9.3625in" stroke="black"
> stroke-width="0.01in" /> </svg>
>
> Any help will be appreciated.
>
> Marijan (Mario) Madunic
> Publishing Specialist
> New Flyer Industries
>
> ________________________________________
> P 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.
>
>
> --------------------------------------------------------------------
> 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-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@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-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@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-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@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-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@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-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


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


Mime
View raw message