Re: SVG styles being ignored
Thanks. I'll add a vote to the bug. I agree that it's more than minor, because it basically means I can't import SVGs. Sam. Original Message On 11 Sep 2019, 22:41, Oskar Berggren wrote: > Batik bug since 2015: > https://issues.apache.org/jira/browse/BATIK-1112 > > Sometimes coincidences are ridiculous... I discovered the existence of this > problem only yesterday and tried to bring some attention to it: > http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-dev/201909.mbox/%3CCAHOuc7PL0%2Be-8H5Ahagm5q7ChSk%3DX6zsFMgs8gwot5-gHONKJQ%40mail.gmail.com%3E > > Den ons 11 sep. 2019 kl 21:09 skrev Samuel Penn : > >> Hi all, >> >> I have a document which imports an SVG as a full page graphic. It used to >> display fine, but recently I started having problems with it. The problems >> started after I recently edited the image in Inkscape (it's been unchanged >> for a couple of years). Since the image was created in Inkscape, and has >> only ever been edited in Inkscape, I'm not sure why it's started having >> problems now. >> >> I'm using FOP 2.3 on Ubuntu 18.04, with Java 11.0.4 >> >> The first issue was that the image was displayed at the wrong size - it was >> resized so only the top left quarter of the image was displayed (but sized >> to fill the entire page). I've tracked this down to a change in how Inkscape >> is setting the page width and height in the document. It used to specify >> (according to my gitlab history): >> width="744.09448819" >> height="1052.3622047" >> Inkscape recently changed things to: >> width="210mm" >> height="297mm" >> >> Since it's an A4 page (210mm x 297mm), the change seems perfectly >> reasonable, but FOP doesn't seem to like it. Changing the units back to the >> unitless values seems to have fixed that, so this issue is more a curiosity >> than a problem for me at the moment. >> >> The bigger issue is that FOP has stopped rendering styles on some graphics. >> This seems to be mostly limited to text styles - colours and border styles. >> Even if I convert the text to a path, then it is still displayed as flat >> colour. I've put some examples of the problem I'm seeing, along with a cut >> down FO file, here: >> >> https://drive.google.com/open?id=1gFt4qC-30GA1VapKicCvTDjrbbiE093e >> >> with-styles.png shows how the image should look (and does look in Inkscape) >> no-styles.png shows how the image is rendered by FOP when it's converted to >> a PDF. >> >> I've also included the SVG file, generated PDF and my fop.conf file. >> The SVG includes the font Archivo Black (which is referenced in the >> fop.conf), but I see the problem with standard fonts as well. >> >> Also included, is test-wrong-size.pdf, which shows how the PDF is rendered >> before I changed the page units from mm. >> >> So far the only work around I've found is to export the image as PNG from >> Inkscape, and include that in the document instead. I'd prefer to be able to >> directly include the SVG though. >> >> Thanks. >> >> -- >> Sam. >> https://www.notasnark.net/
SVG styles being ignored
Hi all, I have a document which imports an SVG as a full page graphic. It used to display fine, but recently I started having problems with it. The problems started after I recently edited the image in Inkscape (it's been unchanged for a couple of years). Since the image was created in Inkscape, and has only ever been edited in Inkscape, I'm not sure why it's started having problems now. I'm using FOP 2.3 on Ubuntu 18.04, with Java 11.0.4 The first issue was that the image was displayed at the wrong size - it was resized so only the top left quarter of the image was displayed (but sized to fill the entire page). I've tracked this down to a change in how Inkscape is setting the page width and height in the document. It used to specify (according to my gitlab history): width="744.09448819" height="1052.3622047" Inkscape recently changed things to: width="210mm" height="297mm" Since it's an A4 page (210mm x 297mm), the change seems perfectly reasonable, but FOP doesn't seem to like it. Changing the units back to the unitless values seems to have fixed that, so this issue is more a curiosity than a problem for me at the moment. The bigger issue is that FOP has stopped rendering styles on some graphics. This seems to be mostly limited to text styles - colours and border styles. Even if I convert the text to a path, then it is still displayed as flat colour. I've put some examples of the problem I'm seeing, along with a cut down FO file, here: https://drive.google.com/open?id=1gFt4qC-30GA1VapKicCvTDjrbbiE093e with-styles.png shows how the image should look (and does look in Inkscape) no-styles.png shows how the image is rendered by FOP when it's converted to a PDF. I've also included the SVG file, generated PDF and my fop.conf file. The SVG includes the font Archivo Black (which is referenced in the fop.conf), but I see the problem with standard fonts as well. Also included, is test-wrong-size.pdf, which shows how the PDF is rendered before I changed the page units from mm. So far the only work around I've found is to export the image as PNG from Inkscape, and include that in the document instead. I'd prefer to be able to directly include the SVG though. Thanks. -- Sam. https://www.notasnark.net/
Re: Skipping page numbers on cover sheets
On Sunday 14 October 2012 00:59:31 Luis Bernardo wrote: If I understand what you are saying, for every chapter you use a new page-sequence. Then, all you have to do is set initial-page-number=1in the first chapter, and set initial-page-number=auto in the remaining chapters. That's the bit I was missing. I didn't know you could stick in auto as a value. I've now got it working correctly. Thanks. -- Be seeing you,Games: http://www.glendale.org.uk/ Sam. Posts: http://www.google.com/profiles/samuel.penn
Skipping page numbers on cover sheets
Hi, I want to add a front cover sheet to a document. The document is two-sided, consisting of multiple chapters (each being a page-sequence) with the page number in the header. My problem, is that when I add the cover, it is treated as pages one and two (I want the first 'real' page to start on the right, so I insert a blank page after the cover). This means that the first chapter starts at page 3, when I want it to start at page 1. Is there a way to force the first chapter to be page 1? I've tried setting initial-page-number=-1 for the front cover, but that didn't work (I'm not that surprised). I can't think of a way of setting the first chapter to start on page one, without either all chapters starting on page 1, or duplicating the page-sequence definition for each chapter type for the situation where it's the first chapter - since the initial-page-number is an attribute to fo:page-sequence, I can't stick it into an if. My template is here: http://yagsbook.svn.sourceforge.net/viewvc/yagsbook/trunk/xml/xslt/pdf/yagsbook.xsl?revision=78view=markup I add the cover at line 349, I match each chapter at line 399. -- Be seeing you,Games: http://www.glendale.org.uk/ Sam. Posts: http://www.google.com/profiles/samuel.penn
Re: Skipping page numbers on cover sheets
On Saturday 13 October 2012 10:45:32 Bonekrusher wrote: Hi, Simply put your cover in its own page-sequence. Your chapter page-sequence should then be set to initial-page-number=1. That's what I'm doing at the moment. However, each chapter has it's own page-sequence (there are different formats for chapters, depending on whether it's two column or single column layout for that chapter). I need only the first chapter to have initial-page-number=1. Can page sequences be nested? Or can I change the format of pages without starting a new page sequence? -- Be seeing you,Games: http://www.glendale.org.uk/ Sam. Posts: http://www.google.com/profiles/samuel.penn
Re: spurious indentation with (small) text lose SOLVED
On Tue, 04 Sep 2012 09:46:23 -0600, Rob Sargent rsarg...@xmission.com wrote: I have long suspected that what we're asking FOP to do is somewhat out there. Man would I love a review of my xsl/fo transformation. 2700+ lines of xsl can't be a good thing! That doesn't seem that bad. My own XSLT for FOP is pushing 7000 lines. :-) -- Be seeing you, Sam. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: spurious indentation with (small) text lose SOLVED
On Thursday 06 September 2012 17:07:37 Rob Sargent wrote: On 09/06/2012 06:04 AM, Samuel Penn wrote: On Tue, 04 Sep 2012 09:46:23 -0600, Rob Sargent rsarg...@xmission.com wrote: I have long suspected that what we're asking FOP to do is somewhat out there. Man would I love a review of my xsl/fo transformation. 2700+ lines of xsl can't be a good thing! That doesn't seem that bad. My own XSLT for FOP is pushing 7000 lines. :-) That's just wrong! :) What on earth are you doing? Documenting rules for a (pen and paper) roleplaying game. Most of it is handling the maths and rules for displaying inline character sheets, or building lists of skills, spells or equipment which do a lot of referencing to each other and semi-complex mangling according to game rules. I started off using Docbook, then decided it was too complex in areas I wasn't interested in, and wasn't suited to handling the things I was interested in. The code is here: http://yagsbook.svn.sourceforge.net/viewvc/yagsbook/trunk/xml/xslt/pdf/ The project is over 10 years old, so there's probably a lot of cruft in there which doesn't help matters. The general layout of the documents themselves isn't particulary exciting. There's a lot I'd like to be able to do, especially around image and table layout (auto-placement of images, and stretching them across two text columns etc), which doesn't yet seem to be possible in FOP. There's an example document here: http://yags.glendale.org.uk/download/yags-character.pdf Which is built from the source XML files here: http://yagsbook.svn.sourceforge.net/viewvc/yagsbook/trunk/sources/yags/ -- Be seeing you,Games: http://www.glendale.org.uk/ Sam. Posts: http://www.google.com/profiles/samuel.penn - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: spurious indentation with (small) text lose SOLVED
On Thursday 06 September 2012 19:57:03 Rob Sargent wrote: On 09/06/2012 12:03 PM, Samuel Penn wrote: The general layout of the documents themselves isn't particulary exciting. There's a lot I'd like to be able to do, especially around image and table layout (auto-placement of images, and stretching them across two text columns etc), which doesn't yet seem to be possible in FOP. span=all doesn't work? You would of course have to split the page into before, body and after regions and place some of the content in the erstwhile head and footer. Alternatively a trick VH showed me is to print content twice covering 200% of the available width and use left/right indent at 0% and -100% alternately. This is how I print tables across two pages. Haven't tried that. I do already make use of the header/footer, so I don't know whether that prevents use of this technique. When I get time, I might look into that. I do have a workaround for tables - I have a chapter type which has a single column, and save all the big tables until then. It's not ideal, but it's functional. -- Be seeing you,Games: http://www.glendale.org.uk/ Sam. Posts: http://www.google.com/profiles/samuel.penn - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: How to configure special PDF settings (transparency)?
On Thursday 22 December 2011 16:52:13 KarstenS wrote: I'm using FOP 1.0 and putting a transparent PNG with text over an image. Unfortunately due to the settings for transparency in the PDF the PNG appiers in the 100%-view with a black border. When I increase the quality for transparency in Adobe Acrobate, it's fine. So I'm searching how I can make this setting in FOP, but found nothing yet (would be also interesting to generally know, how to set other properties and/or a list of in FOP supported properties). There's some configuration options detailed here: http://xmlgraphics.apache.org/fop/1.0/configuration.html It doesn't look like there's an option for transparency included though. I've only ever used it for setting image resolution. -- Be seeing you,Games: http://www.glendale.org.uk/ Sam. Posts: http://www.google.com/profiles/samuel.penn - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: More on external graphics
On Thursday 15 December 2011 23:50:54 Luis Bernardo wrote: On 12/15/11 7:44 PM, Samuel Penn wrote: For some reason, if I tweak the margins a bit, then the image problem comes back. I did remove the negative margins whilst testing the example I sent, and it made no difference, so it seems not to be -ve margins as such, but it is something to do with those margins. Attached is an example with the side regions in place. The output is the same as before. Thanks. I actually just took the margins you defined and inserted them into my stylesheets, and it all worked. I almost have things how I want them, I just need to do some print tests to make sure it looks okay. However, it seems to be that if the left/right page margins don't match, then I get the problem with misplaced images. e.g., if I take 1mm off the left margin on right hand pages, I need to also take 1mm off the right margin on left hand pages in order for images to be placed correctly. Not sure if this is expected behaviour, but it seems like a bug. -- Be seeing you,Games: http://www.glendale.org.uk/ Sam. Posts: http://www.google.com/profiles/samuel.penn - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Test
Apologies, but I've tried sending some real messages to the list but none of them seem to have turned up after 90 minutes. -- Be seeing you,Games: http://www.glendale.org.uk/ Sam. Posts: http://www.google.com/profiles/samuel.penn - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Test
On Thursday 15 December 2011 12:22:00 Fernando Israel wrote: Got this On Thu, Dec 15, 2011 at 9:58 AM, Samuel Penn s...@glendale.org.uk wrote: Apologies, but I've tried sending some real messages to the list but none of them seem to have turned up after 90 minutes. It's taking 5 hours for mail to get from the list to me. Looking at the headers, the list server is still sending mail via my old ISP (changed on Monday). Probably just needs DNS changes to finish propagating. -- Be seeing you,Games: http://www.glendale.org.uk/ Sam. Posts: http://www.google.com/profiles/samuel.penn - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: More on external graphics
On Thursday 15 December 2011 00:26:43 Luis Bernardo wrote: Your page definitions (margins, paddings, and so on) may be part of the problem. Negative margins in a page are suspicious to me... I probably had a reason for that, but I did that 10 years ago, so I don't remember why. I fixed your example by reducing it a simpler case. If you are not using using the start, end, before and after regions you do not need to define them. Probably later you will want to use them for static content but for the purposes of your example they are not needed. I do need all those regions in the real document. I've added your margins into my actual stylesheet, and the graphics are fixed, however the page dimensions are now too squashed. For some reason, if I tweak the margins a bit, then the image problem comes back. I did remove the negative margins whilst testing the example I sent, and it made no difference, so it seems not to be -ve margins as such, but it is something to do with those margins. At least this gives me something to play with, and I can try tweaking the values (and refresh my memory of what they all mean) to try and find out exactly what values cause the issue. Thanks very much for your help. -- Be seeing you,Games: http://www.glendale.org.uk/ Sam. Posts: http://www.google.com/profiles/samuel.penn - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Placing external graphics
On Friday 26 August 2011 11:46:56 Chris Bowditch wrote: On 25/08/2011 22:25, Samuel Penn wrote: I'm having some issues with the placement of images with external-graphic. The graphic (a jpeg) is being inserted into a text flow in one column of a two column page layout (i.e., it's not meant to spread across multiple text columns). What happens, is that the correct amount of whitespace is reserved for the image, but the bottom of the image is aligned with the top of where it should be, so the image overwrites the text paragraph immediately above it. This is happening with several of the inserted images (the one that works is quite small). I'm using FOP 0.95 on Linux (Ubuntu 11.4). On a previous computer, using theoretically the same stylesheets and FOP version, the images seemed to be placed correctly, so I'm not sure what's changed. Have you tested your XSL-FO on FOP v1.0? There have been a lot of fixes between 1.0 and 0.95, some of them relates to multi-column layout. Apologies, I lied. I had downloaded 1.0 last week to test against to see if that fixed things, and had forgotten that I'd changed my scripts to use the fop-1.0 install rather than the system default. So yes, I'm seeing the problem on 1.0. Whilst putting together a simple example of the problem, I've discovered that it works fine on the first page of each chapter. On the 2nd and subsequent pages (even/odd makes no difference) of a chapter, I see the problem. Each chapter starts on a new page (it's been 10 years since I wrote these stylesheets, so my knowledge of fop is a bit rusty. Chapters seem to begin a new fo:page-sequence/fo:flow). It also doesn't make a difference which column the image is in. Difficult to tell what could be the problem from a snippet of the FO. You could try taking out the space-before/after attributes in case that causes some problems within multi-column layouts. If that still fails on FOP 1.0, could you send us a trimmed down XSL-FO File that demonstrates the issue? Attached. It has two images inserted, one of the first page (which shows up fine) and one on the second (which doesn't). Second image is 700x500 pixels, first about 400x300. Thanks. -- Be seeing you, Sam. ?xml version=1.0? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:yb=http://yagsbook.sourceforge.net/xml;fo:layout-master-setfo:simple-page-master master-name=leftPage page-height=297mm page-width=210mm margin-top=10mm margin-bottom=5mm margin-left=0mm margin-right=10mmfo:region-body column-count=2 margin-left=20mm margin-right=10mm margin-top=11mm margin-bottom=11mm/fo:region-before extent=15mm region-name=region-before-left/fo:region-after extent=10mm region-name=region-after-left/fo:region-start extent=20mm/fo:region-end extent=10mm//fo:simple-page-masterfo:simple-page-master master-name=rightPage page-height=297mm page-width=210mm margin-top=10mm margin-bottom=5mm margin-left=15mm margin-right=-10mm padding=0mmfo:region-body column-count=2 margin-right=20mm margin-left=10mm margin-top=11mm margin-bottom=11mm/fo:region-before extent=15mm region-name=region-before-right/fo:region-after extent=10mm region-name=region-after-right/fo:region-start extent=10mm/fo:region-end extent=20mm//fo:simple-page-masterfo:simple-page-master master-name=leftPage1 page-height=297mm page-width=210mm margin-top=10mm margin-bottom=5mm margin-left=0mm margin-right=10mmfo:region-body column-count=1 margin-left=20mm margin-right=10mm margin-top=11mm margin-bottom=11mm/fo:region-before extent=15mm region-name=region-before-left/fo:region-after extent=10mm region-name=region-after-left/fo:region-start extent=20mm/fo:region-end extent=10mm//fo:simple-page-masterfo:simple-page-master master-name=rightPage1 page-height=297mm page-width=210mm margin-top=10mm margin-bottom=5mm margin-left=15mm margin-right=-10mm padding=0mmfo:region-body column-count=1 margin-right=20mm margin-left=10mm margin-top=11mm margin-bottom=11mm/fo:region-before extent=15mm region-name=region-before-right/fo:region-after extent=10mm region-name=region-after-right/fo:region-start extent=10mm/fo:region-end extent=20mm//fo:simple-page-masterfo:page-sequence-master master-name=documentfo:repeatable-page-master-alternativesfo:conditional-page-master-reference master-reference=leftPage odd-or-even=even/fo:conditional-page-master-reference master-reference=rightPage odd-or-even=odd//fo:repeatable-page-master-alternatives/fo:page-sequence-masterfo:page-sequence-master master-name=document1fo:repeatable-page-master-alternativesfo:conditional-page-master-reference master-reference=leftPage1 odd-or-even=even/fo:conditional-page-master-reference master-reference=rightPage1 odd-or-even=odd//fo:repeatable-page-master-alternatives/fo:page-sequence-master/fo:layout-master-setfo:page-sequence master-reference=documentfo:static-content flow-name=region-before-rightfo:block font-family=Helvetica font-size=24pt text-align=end font-weight=bold color=white background-image
Placing external graphics
Hi, I'm having some issues with the placement of images with external-graphic. The graphic (a jpeg) is being inserted into a text flow in one column of a two column page layout (i.e., it's not meant to spread across multiple text columns). What happens, is that the correct amount of whitespace is reserved for the image, but the bottom of the image is aligned with the top of where it should be, so the image overwrites the text paragraph immediately above it. This is happening with several of the inserted images (the one that works is quite small). I'm using FOP 0.95 on Linux (Ubuntu 11.4). On a previous computer, using theoretically the same stylesheets and FOP version, the images seemed to be placed correctly, so I'm not sure what's changed. The XML looks something like this: fo:block font-size=10pt font-family=Times line-height=12pt space-after=10pt Blah blah blah blah blah blah... Blah blah blah blah blah blah... Blah blah blah blah blah blah... Blah blah blah blah blah blah... Blah blah blah blah blah blah... Blah blah blah blah blah blah... Blah blah blah blah blah blah... Blah blah blah blah blah blah... Blah blah blah blah blah blah... Blah blah blah blah blah blah... /fo:block fo:block space-after=0pt space-before=0px text-align=center fo:external-graphic src=images/sizes.jpg display-align=center content-width=60mm/ /fo:block fo:block font-size=10pt font-family=Times line-height=12pt space-after=10pt Blah blah blah blah blah blah... Blah blah blah blah blah blah... Blah blah blah blah blah blah... Blah blah blah blah blah blah... Blah blah blah blah blah blah... Blah blah blah blah blah blah... Blah blah blah blah blah blah... Blah blah blah blah blah blah... Blah blah blah blah blah blah... Blah blah blah blah blah blah... /fo:block What renders, is the first paragraph, the image overlaid on top of it, a chunk of whitespace (equal in size to the image), then the second paragraph. There's an image of the output here: https://picasaweb.google.com/lh/photo/-T-EK3oVgCrkfc4aUie6HQ?feat=directlink Any ideas on what I'm doing wrong? Thanks. -- Be seeing you, Sam. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: File size when including SVGs
On Tuesday 09 September 2008 11:57:45 Jeremias Maerki wrote: On 03.09.2008 21:00:10 Samuel Penn wrote: If so, is there a way around it? My plan is to use a small number of SVGs a large number of times, so being able to embed an image once, and simply reference it each time it is used in the PDF would greatly reduce space. If you switch to FOP 0.95, as Pascal suggested, the file sizes should get smaller as FOP should be able to paint more text as text rather than convert almost all text to graphics. Of course, you'll only profit if there's text in the SVG. The ones that will be repeated most have no text (think flags for bullet points, or symbols to denote different types of items in lists) so it probably won't help much, but every bit helps. But for the issue about only including the SVG once, that is currently not possible. We've got a task hanging around somewhere to generate the SVG as a form object in PDF. That way it could be reused multiple times. The tricky part here is to preserve any links inside the SVG and to make them appear in the right place on the page. This would have to be solved first. Nobody seems to have had an itch, yet, I'm afraid. Okay, fair enough. Lacking itching powder, maybe I should start looking to see if some of my needs can be met with symbol fonts. Thanks. -- Be seeing you, http://www.glendale.org.uk Sam.Mail/IM (Jabber): [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
File size when including SVGs
Hi all, I'm currently using FOP 0.93, and I've just started looking at using SVG images in the rendered PDFs. One thing that I have noticed is that the image size of the resulting PDF grows considerably. It would appear that if I import an SVG multiple times, the resulting PDF includes a new instance of the image. If I have a 20k SVG displayed in the header of a 20 page document, then it adds 400k to the PDF (before compression). Is this correct? If so, is there a way around it? My plan is to use a small number of SVGs a large number of times, so being able to embed an image once, and simply reference it each time it is used in the PDF would greatly reduce space. If this isn't the case, then I obviously need to try and figure out why my PDFs seem to grow considerably if I repeat the same image. I'm mostly importing SVGs as background images, but some are inserted with fop:external-graphic Thanks. -- Be seeing you, http://www.glendale.org.uk Sam.Mail/IM (Jabber): [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Missing log4j appender
I have just upgraded to fop 0.93 from 0.20.5, on Gentoo Linux, and I'm now running into some issues whenever I try to process files which worked prior to the upgrade. Running fop, I get the following error: log4j:WARN No appenders could be found for logger (org.apache.fop.render.RendererFactory). log4j:WARN Please initialize the log4j system properly. An empty output file is generated, then deleted. This error is thrown even if I just run fop by itself (I get that error, followed by a usage). I can see three possible causes: 1) It's a Gentoo issue, and not a FOP issue. 2) It's not a log4j issue (it is reported as a warning after all), and something has changed which is causing some other failure which can't be logged. Setting up log4j will tell me what the real problem is. 3) log4j needs to be setup somehow, which will fix the problem. Assuming 2 or 3, how do I setup a suitable log4j configuration file and pass it to fop when running it from the command line? Thanks, Sam. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Missing log4j appender
Andreas Siepert wrote: Hi Samuel, this is the typical output for not having configured log4j. To configure it you can for example place a log4j.properties file into your classpath (something like ../classes/log4j.properties) but there are some options. Okay, adding a properties file to the current directory showed the error. Presumably previous versions (either by default, or installed as part of the Gentoo package) defined a properties file (or didn't use log4j). It appears that the real error was: javax.xml.transform.TransformerException: file:///tmp/character.fo:2:351: Error(2/351): For fo:simple-page-master, fo:region-body must be declared before fo:region-before. Changing my XSLT has fixed the problem. Presumably this requirement has changed in the rewrite between .2 and .9, since it never complained about it before. I've also noted some other differences in the new rendering engine - time to revisit my XSLT I think! Thanks for the help, Sam. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
fo:external-graphic problems
Hi, I'm trying to use FOP/Batik to embed an SVG file into a generated PDF document. My understanding of the best way of doing this is to use the fo:external-graphic element. However, when I do so, I get the following error: [ERROR] Could not load external SVG: Content is not allowed in prolog. [ERROR] Error while creating area : No ImageReader for this type of image (file:/home/sam/rpg/yags/habisfern/) To me, this almost looks like it's trying to load the directory the file is in, rather than the file itself (the above path is the directory which all files reside in). The XML I'm passing to FOP is as follows: fo:external-graphic source-document=words.svg width=5cm height=5cm content-width=5cm content-height=5cm/ I've tried various alternatives to the source-document, including enclosing in an url(), passing the full path etc. I have setup the baseDir config option, though this appears to default to the working directory anyway, so has no effect. I've tried most of the possibilities that I've found on various Google searches. Is anyone able to tell me what I'm doing wrong? The SVG was created in Inkscape, and loads fine in other viewers. I'm using FOP 0.20.5 and Batik 1.5.1. The latter is in the classpath when I run FOP. The environment is Gentoo Linux/AMD64. Thanks for any help. -- Be seeing you, http://www.glendale.org.uk Sam. IM: [EMAIL PROTECTED] or [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fo:external-graphic problems
On Sunday 13 November 2005 15:08, J.Pietschmann wrote: Samuel Penn wrote: fo:external-graphic source-document=words.svg Try src=words.svg instead. Yep, that was it. My web search found a list of attributes for fo:external-graphic, and I assumed source-document was the one I wanted since that was the first vaguely-useful one I found. Thanks for that. -- Be seeing you, http://www.glendale.org.uk Sam. IM: [EMAIL PROTECTED] or [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fo:external-graphic problems
As a followup, now that I've got my graphics embedded in a PDF, is there a way of forcing the graphic to scale to the available area? According to the FAQ it would seem that it isn't currently possible: http://xmlgraphics.apache.org/fop/0.20.5/graphics.html#svg-scaling Is this still the case, or is there a clever way around the limitation? I'd like to be able to take any random image (probably drawn on an A4 canvas), and embed it into a column of a document, cropping to the actual image size (not page size) and scaling to fit the column. I'm assuming I could probably do something by querying the SVG document itself (though even this wouldn't work if I can't change the image dimensions), but a simpler solution would be preferred. -- Be seeing you, http://www.glendale.org.uk Sam. IM: [EMAIL PROTECTED] or [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]