docbook-apps

  • 1.  Re: [docbook-apps] images scaling problem for print output

    Posted 01-13-2011 09:22
    what do you mean by the actual size in the printed output? ;-)


    -> Currently, all my images are streched to the available page width.
    But I want my images to look in the pdf exactly as they have looked before
    on the screen... not scaled to 120% or 80% but 100%(not scaled).

    I also tried to use really high dpi-values to make sure that this is not the
    problem.
    -> High dpi-values do not change anything.

    My guess is that it has nothing to do with the resolution of the images but
    with the settings of docbook.

    Can you follow me?



    On Wed, Jan 12, 2011 at 5:36 PM, honyk <j.tosovsky@email.cz> wrote:

    > Hello Sebastian,
    >
    >
    >
    > > I am trying to use the images unscaled to use them in their actual size
    > for print output.
    >
    >
    >
    > what do you mean by the actual size in the printed output? ;-)
    >
    >
    >
    > The final size is dependent on the image resolution. PNG images can store
    > this info (in case of screenshots it varies according to the display
    > settings) and this info can be used later by xsl-fo processor. If this info
    > is not available, XEP uses 120 dpi instead for example. If the image
    > resolution is lower, it seems to be bigger in the output. As mentioned, the
    > screenshot resolution can vary if images are taken by different users so the
    > final image size can be different in the output, althought a pixel size is
    > the same. In my case these differences are normalized by imagemagick utility
    > before processing, where all resolution info is replaced by a single value
    > (120 dpi) – keeping the original pixel size.
    >
    >
    >
    > Regards,
    >
    > Jan
    >

    Hello all,

    I am trying to use the images unscaled to use them in their actual size for
    print output. But so far all my approaches failed. All images always use the
    available space on the page, which decreases quality massively whenever
    images are smaller than the available space. My image objects look like
    that:

    <mediaobject>
    <imageobject>
    <imagedata fileref="images/logo.png"/>
    </imageobject>
    </mediaobject>


    I went through everything related to graphics and customization in the
    Docbook XSL Guide and the docbook-apps. Nothing seems to help. All
    attributes used for image sizing (scalefit, width, contentdepth, …) in my
    custom-fo file are either ignored by xsltproc or do not even show up in the
    console. Other customizations work, though.

    Is it really that complicated leave pictures unscaled? Do I have to work
    with templates for such an "easy" task? Could somebody give me an example of
    what I have to write into the custom-fo file to leave my images unscaled?
    Any help would be highly appreciated!

    Thanks,
    Sebastian



  • 2.  Re: [docbook-apps] images scaling problem for print output

    Posted 01-13-2011 10:12
    On Thu, 13 Jan 2011 10:22:10 +0100
    Sebastian Kaiser <sebastian.kaiser@askozia.com> wrote:

    > what do you mean by the actual size in the printed output? ;-)
    >
    >
    > -> Currently, all my images are streched to the available page width.
    > But I want my images to look in the pdf exactly as they have looked
    > before on the screen... not scaled to 120% or 80% but 100%(not
    > scaled).

    Which screen? Your 32" or the 15"?
    Difficult!

    The difference is that screens talk in pixels (related to screen size)
    whereas printers talk in terms of inches. The two only relate when
    you fix the screen resolution and size?





    --

    regards

    --
    Dave Pawson
    XSLT XSL-FO FAQ.
    http://www.dpawson.co.uk



  • 3.  Re: [docbook-apps] images scaling problem for print output

    Posted 01-13-2011 14:31
    > > what do you mean by the actual size in the printed output? ;-)
    > >
    > >
    > > -> Currently, all my images are streched to the available page width.
    > > But I want my images to look in the pdf exactly as they have looked
    > > before on the screen... not scaled to 120% or 80% but 100%(not
    > > scaled).
    >
    > Which screen? Your 32" or the 15"?
    > Difficult!
    >

    -> OK, you got a point there. Of course, the images look differently
    depending on the size/resolution of the screen.

    >
    > The difference is that screens talk in pixels (related to screen size)
    > whereas printers talk in terms of inches. The two only relate when
    > you fix the screen resolution and size?
    >
    > -> My problem, on the other hand, is that all images are stretched to page
    width, no matter if they have the size of a stamp or a telephone.
    That does not seem to be a "dots per inch problem" because all images then
    should vary in size by the same factor, right? For example, the book about
    Subversion (also using docbook), found here:

    svnbook.red-bean.com/en/1.1/svn-book.pdf

    seems to have the same problem. All images look slightly blurry due to the
    (probably undesired) scaling.

    Cheers,
    Sebastian



  • 4.  Re: [docbook-apps] images scaling problem for print output

    Posted 01-13-2011 15:56
    On Thu, Jan 13, 2011 at 3:31 PM, Sebastian Kaiser
    <sebastian.kaiser@askozia.com> wrote:

    > -> My problem, on the other hand, is that all  images are stretched to page
    > width, no matter if they have the size of a stamp or a telephone.
    > That does not seem to be a "dots per inch problem" because all images then
    > should vary in size by the same factor, right?

    Hi Sebastian,
    I routinely produce complex pdf for print full of images from DB and I
    do not have any scaling issues. Here is what I do (hope this will help
    you).

    1. all images (raster or vector) for print are pdf sized in mm to the
    right dimensions depending on the page size. Obviously during the pdf
    generation from raster images (using GIMP or Photoshop) Ihave to chose
    the right mm dimensions to guarantee the quality I want based on the
    DPI of the sources.

    2. in the DB source I use the following markup:


    <mediaobject>
    <imageobject role="print">
    <imagedata fileref="foo.pdf" format="PDF"/>
    </imageobject>
    </mediaobject>


    3. If needed I can use <imagedata fileref="foo.pdf" format="PDF"
    scale="xx"/> and the image gets scaled correctly (note that xx is NOT
    followed by %).

    As you can see, everything is pretty standard and works perfectly. I
    have just made a quick test on one of my db file using a PNG instead
    of a PDF and the scaling works as expected also in this case.

    What FO processor are you using? (I use Antenna House)
    What version of DB fo xslt are you using /overriding? (I use a
    customization layer overriding 1.75.2 from DB 4.5 sources)

    cheers,

    __peppo



  • 5.  Re: [docbook-apps] images scaling problem for print output

    Posted 01-14-2011 14:08
    Hi Peppo,

    thanks for your help!
    It was not the solution I was looking for in the beginning but finally it
    worked. :)
    I was hoping that I only needed to change a couple of parameters in my
    customization layer.

    Now, I played around with the size of my images and made them all as wide as
    my page is and then they don't get scaled anymore (as suggested in 1.).
    Changing dpi made the quality acceptable.

    Thanks again and have a nice weekend,
    Sebastian




    On Thu, Jan 13, 2011 at 4:56 PM, Giuseppe Bonelli
    <peppo.bonelli@gmail.com>wrote:

    > On Thu, Jan 13, 2011 at 3:31 PM, Sebastian Kaiser
    > <sebastian.kaiser@askozia.com> wrote:
    >
    > > -> My problem, on the other hand, is that all images are stretched to
    > page
    > > width, no matter if they have the size of a stamp or a telephone.
    > > That does not seem to be a "dots per inch problem" because all images
    > then
    > > should vary in size by the same factor, right?
    >
    > Hi Sebastian,
    > I routinely produce complex pdf for print full of images from DB and I
    > do not have any scaling issues. Here is what I do (hope this will help
    > you).
    >
    > 1. all images (raster or vector) for print are pdf sized in mm to the
    > right dimensions depending on the page size. Obviously during the pdf
    > generation from raster images (using GIMP or Photoshop) Ihave to chose
    > the right mm dimensions to guarantee the quality I want based on the
    > DPI of the sources.
    >
    > 2. in the DB source I use the following markup:
    >

    >
    > <mediaobject>
    > <imageobject role="print">
    > <imagedata fileref="foo.pdf" format="PDF"/>
    > </imageobject>
    > </mediaobject>
    >

    >
    > 3. If needed I can use <imagedata fileref="foo.pdf" format="PDF"
    > scale="xx"/> and the image gets scaled correctly (note that xx is NOT
    > followed by %).
    >
    > As you can see, everything is pretty standard and works perfectly. I
    > have just made a quick test on one of my db file using a PNG instead
    > of a PDF and the scaling works as expected also in this case.
    >
    > What FO processor are you using? (I use Antenna House)
    > What version of DB fo xslt are you using /overriding? (I use a
    > customization layer overriding 1.75.2 from DB 4.5 sources)
    >
    > cheers,
    >
    > __peppo
    >



    --
    Sebastian Kaiser

    Askozia - Intuitive Telephony
    http://www.askozia.com

    Salzdahlumer Strasse 46/48
    D-38302 Wolfenbüttel
    Germany
    Tel: +49 (0)5331 900 989 202
    Fax: +49 (0)5331 900 989 199