Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Creating a protected document from a fillable form online

  • 14-08-2013 9:12am
    #1
    Registered Users, Registered Users 2 Posts: 7


    Hey all

    I'm looking to get somebody to design what (I hope) would be a relatively simple website and programme. This will be used to create template documents for customers. Basically, the customer would log in (or be granted access by verified IP / network address) and fill in a form that is customised to them. This form would then populate a document which they would get in protected PDF format.

    The point of this is that they can update the document in a limited way anytime by re-submitting the form with different information, but they would never be able to copy or change the majority of the document (we want to stop them just taking the whole thing and modifying it without consulting us). We would need to have full access to the document, so that we can change it if required by updated legislation, etc.

    We would also like to be able to revoke access at any time, or after a specified time period.

    We would have different customers all with access to different types of documents (all documents would be bespoke for each particular customer).

    Now - that's the idea, but I've no clue how best to go about this, or who would be best to contact. Obviously, we'd like to keep costs as low as possible, but, I'd need a bit of guidance as to how big / small a job this is.

    Any advice gratefully appreciated!


Comments

  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    I'm just finishing a project which uses Migradoc. It's easy to use and it's free, but it does not support Templates so I don't think it's a runner for what you need.

    The best way might be to have the system open and modify word templates, and then convert the result to PDF. This would allow you to maintain the templates and create new templates without any technical knowledge. I've used this approach with success.

    The downside is that you'll need to pay for a third party component to convert Word to PDF for you and they aren't cheap.


  • Moderators, Society & Culture Moderators Posts: 17,643 Mod ✭✭✭✭Graham


    John_Mc wrote: »
    The best way might be to have the system open and modify word templates, and then convert the result to PDF. This would allow you to maintain the templates and create new templates without any technical knowledge. I've used this approach with success.

    What's the benefit to having the Word element? Wouldn't it be cleaner/simpler just to generate the required PDF programmatically?

    Database containing standard sections/questions/answers/form elements.
    Database table grouping required section/questions/answers/elements into 'forms'.
    Functionality to convert 'forms' into PDF's

    OP, is there any reason why you can't get the end users to fill in the 'forms' online, thus also removing the requirement for PDF's?


  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    Graham wrote: »
    What's the benefit to having the Word element? Wouldn't it be cleaner/simpler just to generate the required PDF programmatically?

    Database containing standard sections/questions/answers/form elements.
    Database table grouping required section/questions/answers/elements into 'forms'.
    Functionality to convert 'forms' into PDF's

    OP, is there any reason why you can't get the end users to fill in the 'forms' online, thus also removing the requirement for PDF's?
    The point of this is that they can update the document in a limited way anytime by re-submitting the form with different information, but they would never be able to copy or change the majority of the document (we want to stop them just taking the whole thing and modifying it without consulting us). We would need to have full access to the document, so that we can change it if required by updated legislation, etc.

    We would also like to be able to revoke access at any time, or after a specified time period.

    We would have different customers all with access to different types of documents (all documents would be bespoke for each particular customer).

    The bold parts are why I suggested Word templates. If the system were coded to work against Content Controls in Word then this could be achieved.

    Programmatically rendering the document = hard coded.


  • Moderators, Society & Culture Moderators Posts: 17,643 Mod ✭✭✭✭Graham


    Full access would still be available to the 'document' so that it can be changed over time as required.

    Consider a form 'A' that initially contains elements 1, 2 , 3, 4, 5, 6

    Database (simplified overview):
    A (v1) , 1, 2, 3, 4, 5, 6

    Six months later 2 is updated by legislative changes so A is marked in the database as retired (not removed but no longer selectable for new documents) and is replaced by A (v2):

    A (v1) , 1, 2, 3, 4, 5, 6 (RETIRED)
    A (v2) , 1, 7, 3, 4, 5, 6

    This approach has the advantage that if a new form B is created with questions in common with form A, we are not duplicating data.

    A (v1) , 1, 2, 3, 4, 5, 6 (RETIRED)
    A (v2) , 1, 7, 3, 4, 5, 6
    B (v1) , 1, 4, 6, 8, 9, 10

    If the forms are unique to each customer, A and B could easily represent the customers specific forms:

    Andy (v1) , 1, 2, 3, 4, 5, 6 (RETIRED)
    Andy (v2) , 1, 7, 3, 4, 5, 6
    Bert (v1) , 1, 4, 6, 8, 9, 10

    Programmatically rendering the document != hard coded

    I have been involved with many projects of this type, usually with a workflow element on top. From experience, Word templates are really not where you want to be heading.

    When forms have been filled-in by the recipient, the completed PDF could be stored in the database or in a file store with a link back to the customer record. This way historically completed forms are always available and traceable.

    OP, you'd need to go into more detail as to you requirements to get a much better answer.

    Must you maintain full traceability of forms, changes to forms, completed forms etc.
    How many forms? Dozens, hundreds, thousands?
    How many customers?
    Are forms unique to each customer?
    Do you need to keep a copy of the form that was sent out to the customer as well as a copy of the forms that have been returned?
    Does this need to be a high availability solution?
    Does this need to be a highly secure solution?
    Will completed forms be stored on the web server (not recommended) or will a part of your required solution sit in house?
    Do you need to track changes to forms at the back end? E.g. which staff member changed/updated the form, when it was changed?
    Is the legislation your organisation needs to adhere to around these forms?
    Any data protection considerations?
    Data retention considerations?


  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    Graham wrote: »
    Full access would still be available to the 'document' so that it can be changed over time as required.

    Consider a form 'A' that initially contains elements 1, 2 , 3, 4, 5, 6

    Database (simplified overview):
    A (v1) , 1, 2, 3, 4, 5, 6

    Six months later 2 is updated by legislative changes so A is marked in the database as retired (not removed but no longer selectable for new documents) and is replaced by A (v2):

    A (v1) , 1, 2, 3, 4, 5, 6 (RETIRED)
    A (v2) , 1, 7, 3, 4, 5, 6

    This approach has the advantage that if a new form B is created with questions in common with form A, we are not duplicating data.

    A (v1) , 1, 2, 3, 4, 5, 6 (RETIRED)
    A (v2) , 1, 7, 3, 4, 5, 6
    B (v1) , 1, 4, 6, 8, 9, 10

    If the forms are unique to each customer, A and B could easily represent the customers specific forms:

    Andy (v1) , 1, 2, 3, 4, 5, 6 (RETIRED)
    Andy (v2) , 1, 7, 3, 4, 5, 6
    Bert (v1) , 1, 4, 6, 8, 9, 10

    Programmatically rendering the document != hard coded

    When you say "updated", you mean by a programmer right? That's not what the OP asked for. They want to be able to change it themselves.

    Also, what you've outlined above is really only a way of turning on and off sections of the form. The blocks are still hard coded and now you need a front end UI for managing this configuration data stored in the database.

    Let's say new legislative changes require some text to be added to the document to explain to the customer how to fill something in. With your method, this requires changes to the code base, testing, deployments etc.
    Graham wrote: »
    I have been involved with many projects of this type, usually with a workflow element on top. From experience, Word templates are really not where you want to be heading.

    With all due respect, that doesn't mean you're doing it the right way. Can you elaborate on why Word isn't the way to go?

    Open XML Content Controls are made exactly for this purpose, and I've used them with success in generating highly complex legally binding documents issued by a public body.

    We actually went a step further and used XML and XSLT to map the properties of classes to the content controls in the document so that as little was hard coded as possible.


  • Advertisement
  • Moderators, Technology & Internet Moderators Posts: 1,336 Mod ✭✭✭✭croo


    Look at http://freemarker.org/ & http://xmlgraphics.apache.org/fop/
    Freemarker allows you to define & generate template documents in any form but if you generate XML then that can in turn be convert by fop into many document formats.. including the default PDF.

    These are rock solid & very fast.


  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    Forgot to add a link to this: Word Document Generator on Codeplex


  • Moderators, Society & Culture Moderators Posts: 17,643 Mod ✭✭✭✭Graham


    John_Mc wrote: »
    When you say "updated", you mean by a programmer right? That's not what the OP asked for. They want to be able to change it themselves.

    No I don't mean by a programmer, I would envisage a back-end where authorised users can change it themselves.
    John_Mc wrote: »
    Also, what you've outlined above is really only a way of turning on and off sections of the form. The blocks are still hard coded and now you need a front end UI for managing this configuration data stored in the database.

    Blocks are not hard coded, they are database records.
    John_Mc wrote: »
    Let's say new legislative changes require some text to be added to the document to explain to the customer how to fill something in. With your method, this requires changes to the code base, testing, deployments etc.

    Nope, it requires a new form element (you called it a block). So lets say element 7 now requires explanatory text, Element (block) 7 is retired and replaced by 11:

    A (v1) , 1, 2, 3, 4, 5, 6 (RETIRED)
    A (v2) , 1, 7, 3, 4, 5, 6 (RETIRED)
    B (v1) , 1, 4, 6, 8, 9, 10
    A (v3) , 1, 11, 3, 4, 5, 6
    John_Mc wrote: »
    With all due respect, that doesn't mean you're doing it the right way. Can you elaborate on why Word isn't the way to go?

    Open XML Content Controls are made exactly for this purpose, and I've used them with success in generating highly complex legally binding documents issued by a public body.

    We actually went a step further and used XML and XSLT to map the properties of classes to the content controls in the document so that as little was hard coded as possible.

    I don't doubt you have done it in word, I also don't doubt that there are several such systems in existence and I'm absolutely sure someone posting to MSDN will recommend an MS solution. That still doesn't make Word the right tool for the job.

    At the end of the day, Word is a Word Processor, not a document management solution. That fact remains no matter how much you bolt on to it.

    Without finding out more about the OP's requirements/budget/timescales I wouldn't like to suggest an appropriate platform/technology stack. A Word hammer may be the solution if it turns out the OP is holding a nail.


  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    Graham wrote: »
    No I don't mean by a programmer, I would envisage a back-end where authorised users can change it themselves.



    Blocks are not hard coded, they are database records.

    So now you need a front end for Customers to fill in the form as well as a backend for Administrators to be able to manage the document template. That's a lot of additional effort.

    Graham wrote: »
    I don't doubt you have done it in word, I also don't doubt that there are several such systems in existence and I'm absolutely sure someone posting to MSDN will recommend an MS solution. That still doesn't make Word the right tool for the job.

    At the end of the day, Word is a Word Processor, not a document management solution. That fact remains no matter how much you bolt on to it.

    Without finding out more about the OP's requirements/budget/timescales I wouldn't like to suggest an appropriate platform/technology stack. A Word hammer may be the solution if it turns out the OP is holding a nail.

    You're right, there are some solid solutions out there using this approach.

    Don't you think it makes sense for a Word Processor to be used to allow Administrators manage templates? It sounds ideal to me because that's exactly what Word is designed for.

    Besides the template management, that's all Word is used for. The generated document would be Open XML so there's no Com Interop or requirement for Word to be installed on the server.


  • Moderators, Society & Culture Moderators Posts: 17,643 Mod ✭✭✭✭Graham


    John_Mc wrote: »
    So now you need a front end for Customers to fill in the form as well as a backend for Administrators to be able to manage the document template. That's a lot of additional effort.

    Nope (again) the backend would produce PDF's as per OP.
    John_Mc wrote: »
    You're right, there are some solid solutions out there using this approach.

    Don't you think it makes sense for a Word Processor to be used to allow Administrators manage templates? It sounds ideal to me because that's exactly what Word is designed for.

    Besides the template management, that's all Word is used for. The generated document would be Open XML so there's no Com Interop or requirement for Word to be installed on the server.
    Templates basically store data, in this case form sections. The nature of forms is that many of the sections are likely to be common across many of the forms. Your solution duplicates all of that data across all of those templates.

    Lets imagine the legislation around 'Widgitus Nothingus' changes, do you want to change the Widgitus Nothingus section on 9,850 word templates or by creating a single new 'Widgitus Nothingus' database record and retiring the previous one?

    Again, much depends on the requirements. We may discover the OP is only talking about 5 forms and 50 customers in which case the costs involved probably preclude anything beyond a very basic system.


  • Advertisement
  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    I'd agree with John's suggestion of using Word with Content Controls as a templating engine. I've used that approach very successfully in a number of projects.

    If the templates need to be customised per customer, it's likely that there will need to be additional branding and blurbs added to the templates in addition to just specifying which sections of data need to be included. Word gives the user a powerful and familiar GUI to do this type of template design quickly and easily.

    It's very simple and straightforward to then build an engine to take these word templates, merge in the data and spit out PDFs whenever needed. And most importantly of all, it's quick and cheap to do.


Advertisement