docbook-apps

  • 1.  Images in PDF appear too large

    Posted 04-26-2007 20:25
    I've been trying to get inline images in a PDF file to appear
    correctly but they always seem to big. I've been following the advice
    in Bob's excellent book (also available at
    http://www.sagehill.net/docbookxsl/ImageSizing.html) and using

    <inlinemediaobject>
    <imageobject>
    <imagedata fileref="images/image.png" format="PNG" scalefit="1"
    width="100%" contentdepth="100%"/>
    </imageobject>
    </inlinemediaobject>

    So far, no luck; they appear to be scaled bigger than they actually
    are (the actual image is 36 pixels wide by 14 pixels high and has a
    resolution of 72 dpi -- the image appears roughly 1.5 times larger
    than actual when looking at the document on screen or printed out).
    I'm using the XSL 1.72.0 stylesheets and FOP 0.93 on Windows.

    Any other ideas on configuration? Maybe I need to include something
    about resolution in the FOP configuration file?

    Thanks,
    tgm



  • 2.  Re: [docbook-apps] Images in PDF appear too large

    Posted 04-26-2007 21:35
    I have heard that fop is not so good at obeying the scaling commands.
    I can't remember where, though.

    On 4/26/07, T.G. Mutato <throw6617@gmail.com> wrote:
    > I've been trying to get inline images in a PDF file to appear
    > correctly but they always seem to big. I've been following the advice
    > in Bob's excellent book (also available at
    > http://www.sagehill.net/docbookxsl/ImageSizing.html) and using
    >
    > <inlinemediaobject>
    > <imageobject>
    > <imagedata fileref="images/image.png" format="PNG" scalefit="1"
    > width="100%" contentdepth="100%"/>
    > </imageobject>
    > </inlinemediaobject>
    >
    > So far, no luck; they appear to be scaled bigger than they actually
    > are (the actual image is 36 pixels wide by 14 pixels high and has a
    > resolution of 72 dpi -- the image appears roughly 1.5 times larger
    > than actual when looking at the document on screen or printed out).
    > I'm using the XSL 1.72.0 stylesheets and FOP 0.93 on Windows.
    >
    > Any other ideas on configuration? Maybe I need to include something
    > about resolution in the FOP configuration file?
    >
    > Thanks,
    > tgm
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >


    --
    http://chris.chiasson.name/



  • 3.  Re: [docbook-apps] Images in PDF appear too large

    Posted 04-26-2007 21:56
    I'm currently working with a custom stylesheet I wrote from scratch (not
    DocBook) to generate FO from an XML document, and I'm using FOP v0.93. I've
    found that the image scaling does work. If I use the following FO:

    <fo:external-graphic src="image.jpg" width="100px"
    content-width="scale-to-fit"/>

    then the image is scaled properly to the given width, and the proportions
    remain intact.

    I haven't looked at the FO produced by the DocBook stylesheets, so this
    doesn't necessarily answer the original poster's question, but FOP can do
    image scaling in this manner.

    Colin

    On 4/26/07, Chris Chiasson <chris@chiasson.name> wrote:
    >
    > I have heard that fop is not so good at obeying the scaling commands.
    > I can't remember where, though.
    >
    > On 4/26/07, T.G. Mutato <throw6617@gmail.com> wrote:
    > > I've been trying to get inline images in a PDF file to appear
    > > correctly but they always seem to big. I've been following the advice
    > > in Bob's excellent book (also available at
    > > http://www.sagehill.net/docbookxsl/ImageSizing.html) and using
    > >
    > > <inlinemediaobject>
    > > <imageobject>
    > > <imagedata fileref="images/image.png" format="PNG" scalefit="1"
    > > width="100%" contentdepth="100%"/>
    > > </imageobject>
    > > </inlinemediaobject>
    > >
    > > So far, no luck; they appear to be scaled bigger than they actually
    > > are (the actual image is 36 pixels wide by 14 pixels high and has a
    > > resolution of 72 dpi -- the image appears roughly 1.5 times larger
    > > than actual when looking at the document on screen or printed out).
    > > I'm using the XSL 1.72.0 stylesheets and FOP 0.93 on Windows.
    > >
    > > Any other ideas on configuration? Maybe I need to include something
    > > about resolution in the FOP configuration file?
    > >
    > > Thanks,
    > > tgm
    > >
    > > ---------------------------------------------------------------------
    > > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    > >
    > >
    >
    >
    > --
    > http://chris.chiasson.name/
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >



  • 4.  Re: [docbook-apps] Images in PDF appear too large

    Posted 04-26-2007 22:26
    Hrm, maybe I was thinking of fop 0.2x

    I did (re)find more info on DocBook's scaling attributes:
    http://www.docbook.org/tdg5/en/html/imagedata.html

    On 4/26/07, Colin Shapiro <cmshapiro@gmail.com> wrote:
    > I'm currently working with a custom stylesheet I wrote from scratch (not
    > DocBook) to generate FO from an XML document, and I'm using FOP v0.93. I've
    > found that the image scaling does work. If I use the following FO:
    >
    > <fo:external-graphic src="image.jpg" width="100px"
    > content-width="scale-to-fit"/>
    >
    > then the image is scaled properly to the given width, and the proportions
    > remain intact.
    >
    > I haven't looked at the FO produced by the DocBook stylesheets, so this
    > doesn't necessarily answer the original poster's question, but FOP can do
    > image scaling in this manner.
    >
    > Colin
    >
    >
    > On 4/26/07, Chris Chiasson <chris@chiasson.name> wrote:
    > >
    > > I have heard that fop is not so good at obeying the scaling commands.
    > > I can't remember where, though.
    > >
    > > On 4/26/07, T.G. Mutato <throw6617@gmail.com> wrote:
    > > > I've been trying to get inline images in a PDF file to appear
    > > > correctly but they always seem to big. I've been following the advice
    > > > in Bob's excellent book (also available at
    > > > http://www.sagehill.net/docbookxsl/ImageSizing.html )
    > and using
    > > >
    > > > <inlinemediaobject>
    > > > <imageobject>
    > > > <imagedata fileref="images/image.png" format="PNG" scalefit="1"
    > > > width="100%" contentdepth="100%"/>
    > > > </imageobject>
    > > > </inlinemediaobject>
    > > >
    > > > So far, no luck; they appear to be scaled bigger than they actually
    > > > are (the actual image is 36 pixels wide by 14 pixels high and has a
    > > > resolution of 72 dpi -- the image appears roughly 1.5 times larger
    > > > than actual when looking at the document on screen or printed out).
    > > > I'm using the XSL 1.72.0 stylesheets and FOP 0.93 on Windows.
    > > >
    > > > Any other ideas on configuration? Maybe I need to include something
    > > > about resolution in the FOP configuration file?
    > > >
    > > > Thanks,
    > > > tgm
    > > >
    > > >
    > ---------------------------------------------------------------------
    > > > To unsubscribe, e-mail:
    > docbook-apps-unsubscribe@lists.oasis-open.org
    > > > For additional commands, e-mail:
    > docbook-apps-help@lists.oasis-open.org
    > > >
    > > >
    > >
    > >
    > > --
    > > http://chris.chiasson.name/
    > >
    > >
    > ---------------------------------------------------------------------
    > > To unsubscribe, e-mail:
    > docbook-apps-unsubscribe@lists.oasis-open.org
    > > For additional commands, e-mail:
    > docbook-apps-help@lists.oasis-open.org
    > >
    > >
    >
    >


    --
    http://chris.chiasson.name/



  • 5.  Re: [docbook-apps] Images in PDF appear too large

    Posted 04-26-2007 22:26
    > <fo:external-graphic src="image.jpg" width="100px"
    > content-width="scale-to-fit"/>

    Was this for an image that is 100 pixels wide Colin? Or was the
    example meant to say ..."width=100%"...?

    Thanks,
    tgm

    On 4/26/07, Colin Shapiro <cmshapiro@gmail.com> wrote:
    > I'm currently working with a custom stylesheet I wrote from scratch (not
    > DocBook) to generate FO from an XML document, and I'm using FOP v0.93. I've
    > found that the image scaling does work. If I use the following FO:
    >
    > <fo:external-graphic src="image.jpg" width="100px"
    > content-width="scale-to-fit"/>
    >
    > then the image is scaled properly to the given width, and the proportions
    > remain intact.
    >
    > I haven't looked at the FO produced by the DocBook stylesheets, so this
    > doesn't necessarily answer the original poster's question, but FOP can do
    > image scaling in this manner.
    >
    > Colin



  • 6.  Re: [docbook-apps] Images in PDF appear too large

    Posted 04-26-2007 22:32
    No, I meant pixels, as I wrote. It works this way for an image of any size;
    if my source image is 800px wide and 600px tall, then the FO

    <fo:external-graphic src="image.jpg" width="100px"
    content-width="scale-to-fit"/>

    will render my image as 100px wide and 75px tall (preserving the
    proportions).

    Colin

    On 4/26/07, T.G. Mutato <throw6617@gmail.com> wrote:
    >
    > > <fo:external-graphic src="image.jpg" width="100px"
    > > content-width="scale-to-fit"/>
    >
    > Was this for an image that is 100 pixels wide Colin? Or was the
    > example meant to say ..."width=100%"...?
    >
    > Thanks,
    > tgm
    >
    > On 4/26/07, Colin Shapiro <cmshapiro@gmail.com> wrote:
    > > I'm currently working with a custom stylesheet I wrote from scratch (not
    > > DocBook) to generate FO from an XML document, and I'm using FOP v0.93
    > . I've
    > > found that the image scaling does work. If I use the following FO:
    > >
    > > <fo:external-graphic src="image.jpg" width="100px"
    > > content-width="scale-to-fit"/>
    > >
    > > then the image is scaled properly to the given width, and the
    > proportions
    > > remain intact.
    > >
    > > I haven't looked at the FO produced by the DocBook stylesheets, so this
    > > doesn't necessarily answer the original poster's question, but FOP can
    > do
    > > image scaling in this manner.
    > >
    > > Colin
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >