Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Nov 10, 2010 @ 21:13
    Chris Houston
    0

    Unable to attach "certain" images as external-graphic elements.

    Hi Darren ( or anyone else there who might have a clue about XSL-FO )

    I am quickly getting the hang of things, but I have been stumped by one thing and I cannot see a way of debugging the issue.

    The following will work:

    <fo:external-graphic src="C:/inetpub/root/media/5781/03092010_000214_Medium.jpg" />

     But the following identical statement ( different graphic ) will fail:

     <fo:external-graphic src="C:/inetpub/root/media/5781/03092010_000214_Large.jpg" />

    These two file for your reference can be found online here:

    Medium Image

    Large Image

    Are there any size limitations to the images that can be included and if not, is there any way of seeing what error is being generated (if any?) as currently it just returns a blank page (i.e. not a PDF document) so it's very difficult to debug.

    Cheers,

    Chris

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Nov 11, 2010 @ 15:42
    Darren Ferguson
    0

    Chris, suggest that the large image is bigger than the bounds of the page.

    Do you have elmah installed? Can you see if any exceptions are being thrown?

    Thanks,

    Darren.

     

     

     

     

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Nov 11, 2010 @ 15:47
    Chris Houston
    0

    Hi Darren,

    No, I don't have Elmah installed, I will try and do so, I cannot see any exceptions unfortunately, nothing in the event log, unless there is somewhere else I should be looking?

    The "Medium" sized image we have is too low a resolution and looks pretty naff when printed, hence wanted to use a higher resolution image, I was wondering if it was something to do with the DPI of the image, I know some applications when you produce PDF documents you can create them "for print" which has higher resolution images, hence I assumed it would scale a larger image?

    Maybe there are some additional attributes that I have to set?

    Best regards,

    Chris

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Nov 11, 2010 @ 15:51
    Darren Ferguson
    1

    Chris, Have a look at this:

    http://www.xmlpdf.com/builds/ibex.pdf

    especially sections 16.2 and 16.5 to see if playing with these help.

    Definitely recommend you install elmah though. not all exceptions will be in the event log.

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Nov 11, 2010 @ 17:10
    Chris Houston
    0

    Thanks Darren,

    I have managed to sort it out now, the documentation link was useful.

    The solution was as follows:

    <fo:external-graphic scaling="uniform" content-width="5.5cm" src="{$webRoot}{$pic}"/>

    In other words the addition of the scaling="uniform" and the content-width="5.5cm" did the trick.

    Best regards,

    Chris

Please Sign in or register to post replies

Write your reply to:

Draft