Copied to clipboard

Flag this post as spam?

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


  • Levente Kosa 136 posts 352 karma points
    Jun 04, 2015 @ 12:50
    Levente Kosa
    0

    Images from the second page is wrong

    Hi,

    I have a lot of images and I would like to place to the PDF. Two images in one row.
    The first page is perfect, but from the second page every images go wrong, just one image within the row.
    Here is my code, maybe somebody notice someting.

    <fo:flow flow-name="xsl-region-body">    
                @foreach (var category in @CurrentPage.Children.Where("Visible").OrderBy("Name"))
                {
                 <fo:block margin-bottom="5mm">
                      <fo:external-graphic src="@docRoot/@category.Url" content-width="9cm" />
                     </fo:block>
                }

                <fo:block id="last-page" keep-together.within-page="auto"></fo:block>
    </fo:flow>

    Thanks

  • Levente Kosa 136 posts 352 karma points
    Jun 05, 2015 @ 02:34
    Levente Kosa
    0

    Somehow I managed with an empty inline element before the image:

    foreach (var categoryImage in categoryImagesCollection.Where("Visible").OrderBy("Name"))
    {
        <fo:block margin-bottom="5mm" keep-with-next.within-page="always">
            <fo:inline></fo:inline>
            <fo:external-graphic src="@docRoot/@categoryImage.Url" content-width="9cm" content-height="scale-to-fit" />
        </fo:block>
    }
Please Sign in or register to post replies

Write your reply to:

Draft