Copied to clipboard

Flag this post as spam?

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


  • René 327 posts 852 karma points
    Aug 06, 2014 @ 00:13
    René
    0

    UpdateRequestCache - Troubles

    HI 

    Im running this setup

    • Umbraco version 7.1.4
    • IIS 8.5
    • Windows 8.1, Intel core 7

    I´m having some troubels in generating a pdf file.  When i try the helloworldMVC exampel it works. At the moment it generates 12 pages, and i had it working. It should generate more pages but not public. 

    My problem is now i can´t get it generating the pdf, it starts up but it only waiting for localhost. 

    Here is an image from the IIS Working process. The only way i can get rid of this is recycling app pool.

    It seem to me it takes up a lot of memory, if i check the IIS Worker Process, in Windows, it just generate more and more memory use.

    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ibex="http://www.xmlpdf.com/2003/ibex/Format">
           @* Sets standard PDF Metadata *@
          <ibex:properties
            title=""
            author=""
            subject=""
            keywords=""
            creator="" />
        <fo:layout-master-set>
            <fo:simple-page-master master-name="A4" page-width="210mm" page-height="297mm" margin-top="1cm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm">
                <fo:region-body margin-left="1.5cm" margin-right="1.5cm" margin-top="1.5cm" margin-bottom="1.5cm" column-count="1" column-gap="0.5cm"/>
                <fo:region-before region-name="header" padding-bottom="3cm" border-after-style="solid" />
                <fo:region-after region-name="footer" extent="1.5cm"/>
            </fo:simple-page-master>
        </fo:layout-master-set>
    
    
         @* ======= Doucment FRONTPAGE START ======= *@
        <fo:page-sequence master-reference="A4">
            @* Doucment header *@
            <fo:flow flow-name="header">
                <fo:block >
                    <fo:inline font-family="Arial" font-size="23pt" color="#3399ff">
    
                    </fo:inline>
                </fo:block>
            </fo:flow>
    
            @* Doucment footer *@
            <fo:static-content flow-name="footer">
                <fo:block font-size="8pt" color="#aaaaaa">
                    <fo:block text-align-last="justify">
                        @name af @writerName - @DateTime.Now
                        <fo:leader leader-pattern="space"/>
                        Side <fo:page-number/> af <fo:page-number-citation ref-id="last-page"/>
                    </fo:block>
                </fo:block>
            </fo:static-content>
            <fo:flow flow-name="xsl-region-body">
                <fo:block>
    
                    <fo:external-graphic src="http://local.local/media/1007/logo_trans.png"></fo:external-graphic>
    
                    <fo:block>
                        @ParseRichText(FoHelper.Instance.GetRichTextNodes(@CurrentPage.pdfFrontpage))
                    </fo:block>
                    <fo:inline font-size="large"  font-weight="bold"> Text </fo:inline>
    
                </fo:block>
            </fo:flow>
        </fo:page-sequence>
        @* ======= Doucment FRONTPAGE END ======= *@
    
        @* ======= Doucment SUMMARY START ======= *@
        <fo:page-sequence master-reference="A4">
            @* Doucment header *@
            <fo:flow flow-name="header">
              <fo:block>
                <fo:inline font-family="Arial" font-size="23pt" color="#3399ff">
                  <fo:external-graphic src="http://local.local/media/1007/logo_trans.png"></fo:external-graphic>
                </fo:inline>
              </fo:block>
            </fo:flow>
    
            @* Doucment footer *@
            <fo:static-content flow-name="footer">
                <fo:block font-size="8pt" color="#aaaaaa">
                    <fo:block text-align-last="justify">
                        @name af @writerName - @DateTime.Now
                        <fo:leader leader-pattern="space"/>
                        Side <fo:page-number/> af <fo:page-number-citation ref-id="last-page"/>
                    </fo:block>
                </fo:block>
            </fo:static-content>
    
            <fo:flow flow-name="xsl-region-body">
                <fo:block>
                    <fo:inline font-size="large"  font-weight="bold">Indhold </fo:inline>
                    @{
                        foreach (IPublishedContent publishedContent in publishedContents)
                        {
    
                            var nodeTypeAlias = publishedContent.DocumentTypeAlias;
                            if (documentType == nodeTypeAlias)
                            {
                                @publishedContent.Name
                            }
                        }
                    }
    
                </fo:block>
    
            </fo:flow>        
        </fo:page-sequence>
    
        @* ======= Doucment SUMMARY END ======= *@
        @* ======= Doucment CATALOG START ======= *@
    
    
        @{
            foreach (IPublishedContent publishedContent in publishedContents)
            {
                var nodeTypeAlias = publishedContent.DocumentTypeAlias;
                var productId = publishedContent.Id;
                IPublishedContent productContent = Umbraco.Content(productId);
                var productImageUrl = productContent.GetCropUrl("categoryImage", "catalog");
                var productImageFullUrl = root.UrlWithDomain() + productImageUrl;
    
                if (documentType == nodeTypeAlias)
                {
    
                    <fo:page-sequence master-reference="A4">
                        @* Doucment header *@
                        <fo:flow flow-name="header">
                          <fo:block>
                            <fo:inline font-family="Arial" font-size="23pt" color="#3399ff">
                              @CurrentPage.Name
                            </fo:inline>
                          </fo:block>
                        </fo:flow>
    
                        @* Doucment footer *@
                        <fo:static-content flow-name="footer">
                            <fo:block font-size="8pt" color="#aaaaaa">
                                <fo:block text-align-last="justify">
                                    @name by @writerName - @DateTime.Now
                                    <fo:leader leader-pattern="space"/>
                                    Side <fo:page-number/> af <fo:page-number-citation ref-id="last-page"/>
                                </fo:block>
                            </fo:block>
                        </fo:static-content>
                        @* Catalog content *@
                        <fo:flow flow-name="xsl-region-body">
                            <fo:block>
                                <fo:inline font-size="large" font-weight="bold">@productContent.Parent.Name</fo:inline>
                            </fo:block>
                            <fo:block>
                                <fo:inline font-size="xx-large" font-weight="bold">@productContent.Name</fo:inline>
                                <fo:external-graphic src="@productImageFullUrl"></fo:external-graphic>
                            </fo:block>  
    
                            <fo:block width="100%" margin="5mm">
                                <fo:inline>@productContent.GetProperty("productShortDescription").Value</fo:inline>
                            </fo:block>
    
                            <fo:block margin-bottom="5mm">
                                <fo:table-and-caption>
                                    <fo:table>
                                        <fo:table-column column-width="30mm"/>
                                        <fo:table-column column-width="30mm"/>
    
                                        <fo:table-header>
                                            <fo:table-row>
                                                <fo:table-cell>
                                                    <fo:block font-weight="bold">SKU</fo:block>
                                                </fo:table-cell>
                                                <fo:table-cell>
                                                    <fo:block font-weight="bold">NR</fo:block>
                                                </fo:table-cell>
                                                <fo:table-cell>
                                                    <fo:block font-weight="bold">SZE</fo:block>
                                                </fo:table-cell>
                                                <fo:table-cell>
                                                    <fo:block font-weight="bold">PRICE</fo:block>
                                                </fo:table-cell>
                                            </fo:table-row>
                                        </fo:table-header>
    
                                        <fo:table-body>
                                            @foreach (IPublishedContent variant in productContent.Children)
                                            {
                                                <fo:table-row>
                                                    <fo:table-cell>
                                                        <fo:block>@variant.GetProperty("sku").Value</fo:block>
                                                    </fo:table-cell>
    
                                                    <fo:table-cell>
                                                        <fo:block>@variant.GetProperty("hmi").Value</fo:block>
                                                    </fo:table-cell>
    
                                                    <fo:table-cell>
                                                        <fo:block>@variant.GetProperty("size").Value</fo:block>
                                                    </fo:table-cell>
    
                                                    <fo:table-cell>
                                                        <fo:block>@TC.GetPrice(1, variant.Id.ToString(CultureInfo.InvariantCulture)).WithVatFormatted</fo:block>
                                                    </fo:table-cell>
                                                </fo:table-row>
    
                                            }
                                        </fo:table-body>
                                    </fo:table>
                                </fo:table-and-caption>
    
                            </fo:block>
    
                        </fo:flow>
    
                    </fo:page-sequence>
    
                        }
                    }
        }
    
        @* ======= Doucment CATALOG END ======= *@
    
        @* ======= Doucment LAST START ======= *@
        <fo:page-sequence master-reference="A4">
            @* Doucment header *@
            <fo:flow flow-name="header">
                <fo:block>
                    <fo:external-graphic src="http://local.local/media/1007/logo_trans.png"></fo:external-graphic>
                </fo:block>
            </fo:flow>
    
            @* Doucment footer *@
            <fo:static-content flow-name="footer">
                <fo:block font-size="8pt" color="#aaaaaa">
                    <fo:block text-align-last="justify">
                        @name af @writerName - @DateTime.Now
                        <fo:leader leader-pattern="space"/>
                        Side <fo:page-number/> af <fo:page-number-citation ref-id="last-page"/>
                    </fo:block>
                </fo:block>
            </fo:static-content>
            <fo:flow flow-name="xsl-region-body">
                <fo:block>
                    Lastpage  
                </fo:block>
                @* Having this before the closing tag of the body flow allows us to have a pager in the footer *@
                <fo:block id="last-page" keep-together.within-page="auto"></fo:block>
            </fo:flow>
        </fo:page-sequence>
         @* ======= Doucment LAST END ======= *@
    </fo:root>

    I hope this give some meaning :-)  

    If not let me know :-)

    René 

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Aug 06, 2014 @ 08:43
    Darren Ferguson
    0

    Hi I'm not sure what is happening: You said.

    "I´m having some troubels in generating a pdf file.  When i try the helloworldMVC exampel it works. At the moment it generates 12 pages, and i had it working. It should generate more pages but not public. 

    My problem is now i can´t get it generating the pdf, it starts up but it only waiting for localhost. "

    What do you mean by "more pages but not public"??

    I would approach this by putting break points on your Razor and stepping through the code until it hangs. Or comment out the dynamic parts one by one until it starts to work again so that you can identify which part causes the issue.

    Let me know how you get on!

    Thanks.

  • René 327 posts 852 karma points
    Aug 06, 2014 @ 10:57
    René
    0

    Hi 

    I can see that it was a bit late last night, it does not give any meaning. Sorry

    Tanks for your advice.

    I will get back on this. 

    René 

     

Please Sign in or register to post replies

Write your reply to:

Draft