Copied to clipboard

Flag this post as spam?

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


  • Mike 80 posts 101 karma points
    Nov 01, 2011 @ 11:39
    Mike
    0

    Document Creation on the Fly using Contour as base?

    Hi Guys,

    I have a project request and I was just wondering if Contour is the way to go, or search for alternatives. Hope I can get some answers here.

    Description of project:

    We would like to generate a PDF document on the fly, based on some questions. So for example, we have 5 questions (multiple choice) and depending on the choice of each question a different block of text should be used to generate the document.

    Additionally it would be nice if we could also have some textfields and use the text from the input in a textblock. For example: name:  [   ]. And then use a replace function to replace the placeholder in the textblock.

    Also, some questions should only become visible on selection of a certain answer. For example is in question 1 the user selects choice b, question 2 should become visible, otherwise stay hidden.

    The administrator of the site should be able to create questions and "attach" a block of text to the question. At the end of the last question the PDF document should be generated with the chosen textblocks. 

    So I can imagine that the admin creates a new questionnaire and is able to attach a block of text to each question. On the front-end a user would click on create document X and the correct questionnaire would start.

    Is this possible using Contour, or is it better to look at some different tools, or create this from scratch?  

    Thanks

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Nov 02, 2011 @ 17:16
    Tim
    0

    Hiya,

    This is certainly doable. You can easily create PDF documents in ASP.Net using something like the excellent iTextSharp project: http://sourceforge.net/projects/itextsharp/

    You could do this in Contour, by having the form that the user fills in in Contour, and then write your own Contour workflow for the on-submit to generate the PDF. However, I think you'd run into issues assigning the text blocks to the questions (there's nothing for that built in, you'd probably have to code custom field types), and Contour can't do any kind of conditional logic.

    You could code it up custom though if you wanted to?

  • Mike 80 posts 101 karma points
    Nov 03, 2011 @ 08:16
    Mike
    0

    Hey,

    of course, custom coding would always be possible, but i always believe there's no need to invent the wheel a second time :) So was hoping Contour would be able to function as a base for this. But i guess i will have to start thinking about a custom code project then...

  • John Jennings 2 posts 22 karma points
    Nov 09, 2011 @ 03:46
    John Jennings
    0

    I am doing something similar by taking form values submitted and writing them to a PDF. Everything works great in Visual Studio locally, but when I deploy the DLL to the server, the form submission does not execute. I can add the workflow and set it to active, but it will not work.

    I am wondering if putting the iTextSharp DLLs in the Bin folder is enough, or must they be GACed? or does it matter. I didn't think it matters.

    Could it also be permissions to write the PDF to an outside folder?

    I will probably get this figured out in the next few days, but if someone could offer some suggestions, that would be helpful.

    Also, I can help with any of the above.

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Nov 10, 2011 @ 10:17
    Tim
    0

    Hi @John,

    Whether its gac'd or not shouldn't make a difference I don't think, it should be able to resolve the reference either way. It could be the permissions, make sure that the app pool identity user account has read/write/modify on the folder that you are creating the PDF in.

    Have you had a look at the application logs on the server? See if there's anything useful in there that might point to the error.

  • John Jennings 2 posts 22 karma points
    Nov 10, 2011 @ 15:25
    John Jennings
    0

    It was the permissions and we left the iTextSharp dependencies in the bin folder for now.

    Thanks for the reply.

Please Sign in or register to post replies

Write your reply to:

Draft