Copied to clipboard

Flag this post as spam?

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


  • Ambert van Unen 54 posts 96 karma points
    Feb 28, 2012 @ 09:28
    Ambert van Unen
    0

    PDF is being saved as .aspx

    Greetings,

    I've just installed this plugin, but I've encountered a issue...

    Everytime I open the template page, it wants to save that page as a PDF (witch is correct), BUT instead I download a .ASPX file..

    Any suggestions on the why and how ?(Tried a fresh install)

     

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Feb 28, 2012 @ 09:32
    Darren Ferguson
    0

    Which version of PDF Creator are you using? Which version of Umbraco? Which version of IIS? Which version of .net? Are you using integrated pipeline mode?

    Are you using an Out of the box template or your own?

    I'll need a lot more information than you have provided in order to help.

    Thanks.

  • Ambert van Unen 54 posts 96 karma points
    Feb 28, 2012 @ 09:56
    Ambert van Unen
    0

    PDFCreator : Using the latest version installed via the package repository.

    Umbraco version : Umbraco 4.7.2

    IIS version : IIS 7

    Asp.net version: 4.0

    Integrated pipeline mode: Wait, what ? I remember I had a error at start, but my colleague fixed that.. Sadly, he's absent this week.


    As a side note, yesterday it first worked fine 4x, after that I changed a template and it started giving .aspx. Did a complete restore of the website / database. Still giving aspx's..

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Feb 28, 2012 @ 10:37
    Darren Ferguson
    0

    Which template did you change to? a default one, or one of your own?

    Can you post your template - or mail it to me df @ fergusonmoriyama . com

  • Ambert van Unen 54 posts 96 karma points
    Feb 28, 2012 @ 10:39
    Ambert van Unen
    0

    Its the default one.. Clean as what (Tried [PDF] Razor Example + [PDF] Razor Helper Example

    both suddenly giving the same results.. And as far as my boss and I know, nothing changed on the server.

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Feb 28, 2012 @ 11:08
    Darren Ferguson
    0

    Hi Ambert, I'd have to say that in more than 15 years of working with the web - nearly every time somebody says "it was working before and then it stopped", something has been changed.

    Can you describe the behaviour a little better - you said:

    " it wants to save that page as a PDF (witch is correct), BUT instead I download a .ASPX file.."

    I don't understand - Can you perhaps attach a screengrab?

     

     

     

  • Ambert van Unen 54 posts 96 karma points
    Feb 28, 2012 @ 11:57
    Ambert van Unen
    0

    Hi Darren, I know something must be changed.. But I can't point to any reasonable explenation besides : 'the midgets did it'.

    If I rename the file from .aspx to .pdf, it works fine.. Below the screenshot of a notification when I open a page which uses the Razor Example template.

     

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Feb 28, 2012 @ 12:04
    Darren Ferguson
    0

    Can you send me your template?

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Feb 28, 2012 @ 12:25
    Darren Ferguson
    0

    In your template try ucommenting:

     

    // -- Uncomment this to force the browser to download the PDF.
    // Response.AppendHeader("X-Pdf-Force-Download","darren.pdf");

    Obviously - you'd want to use something dynamic - not just darren.pdf

     

  • Ambert van Unen 54 posts 96 karma points
    Feb 28, 2012 @ 12:59
    Ambert van Unen
    0

    That works, but indeed I would like something dynamically, still don't understand why it first worked though..

    Just a question, is it possible to use a macro in a macro ?

    We've been planning to use this to convert a productpage to a pdf, but the thing is there's quite alot of variables of witch we would like to load via macro's, so we can easily give sections for it. 
    Also, it might be my lack of knowdledge of razor, but I've got a mediapicker selecting a image for the page, and I'd like to show that in the PDF, but I can't seem to write any valid code like in the template like for example I use here : 
       dynamic parentNode @Model.Up();  
      
              @parentNode.contentTitle
              @parentNode.contentText
              @parentNode.ontwerper
              @parentNode.bouwmateriaal
              @parentNode.stahoogteAchter
      
         dynamic imagenode Library.MediaById(@parentNode.afbeelding)
         <img src="@imagenode.Url" height="100px" width="100px"/>
      
        dynamic childNode parentNode.Down();
        <href="@childNode.Url">DOWNLOAD PDF</a>
    }

    I know it asks for a xml image node, but i can't seem to use anything like the above to insert the image into the pdf.. :/

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Feb 28, 2012 @ 13:54
    Darren Ferguson
    0

    Hi Ambert,

    The questions you are asking are more fundamental Umbraco questions and I don't think they belong in the "bug reports" forum of my PDF creator.

    Also - I don't really understand your question, but why would you need to use a macro specifically?

Please Sign in or register to post replies

Write your reply to:

Draft