Strategy for Rendering Multiple Document Types From Single Source

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jordan S.

    Strategy for Rendering Multiple Document Types From Single Source

    I would appreciate your thoughts and opinions on the following:

    I am looking to render documents [that are constructed at runtime] into
    multiple document formats. At a minimum the documents will need to be
    rendered as HTML, and separately as PDF. Ideally we could also offer a
    subset additionally as xls and docx (Excel and/or Word 2007) files.

    All files will be distributed via ASP.NET Web site. This is a "greenfield "
    project using .NET 3.5, and I can do whatever I want.

    It appears to me that there are two general strategies I could take.

    1. Render all documents initially as HTML, then to the other document types.

    2. Render all documents initially into whatever the final document type will
    be (i.e., do not render first as HTML, but just render the pdf file
    directly, for example).

    Keeping in mind that these files are all built at runtime from information
    and templates stored in a database... These templates are basically HTML
    snippets styled with css.

    My initial preference is for alternative #1 above, as I could have one
    single code base that builds these documents at runtime. That single code
    base cranks out the HTML version, which is one of the required formats. From
    the HTML, it would be a relatively trivial matter to convert the document to
    PDF or whatever (there are 3rd party components that could do this
    automatically and quickly - perhaps called via some custom HTTP module that
    I write).

    Thoughts? Opinions?

    Thanks!



  • =?Utf-8?B?YnJ1Y2UgYmFya2Vy?=

    #2
    RE: Strategy for Rendering Multiple Document Types From Single Source

    it depends on how complex the documents are. the html to pdf converters
    either only do simple html, or use an IE instance and a print driver to
    produce pdf.


    -- bruce (sqlwork.com)


    "Jordan S." wrote:
    I would appreciate your thoughts and opinions on the following:
    >
    I am looking to render documents [that are constructed at runtime] into
    multiple document formats. At a minimum the documents will need to be
    rendered as HTML, and separately as PDF. Ideally we could also offer a
    subset additionally as xls and docx (Excel and/or Word 2007) files.
    >
    All files will be distributed via ASP.NET Web site. This is a "greenfield "
    project using .NET 3.5, and I can do whatever I want.
    >
    It appears to me that there are two general strategies I could take.
    >
    1. Render all documents initially as HTML, then to the other document types.
    >
    2. Render all documents initially into whatever the final document type will
    be (i.e., do not render first as HTML, but just render the pdf file
    directly, for example).
    >
    Keeping in mind that these files are all built at runtime from information
    and templates stored in a database... These templates are basically HTML
    snippets styled with css.
    >
    My initial preference is for alternative #1 above, as I could have one
    single code base that builds these documents at runtime. That single code
    base cranks out the HTML version, which is one of the required formats. From
    the HTML, it would be a relatively trivial matter to convert the document to
    PDF or whatever (there are 3rd party components that could do this
    automatically and quickly - perhaps called via some custom HTTP module that
    I write).
    >
    Thoughts? Opinions?
    >
    Thanks!
    >
    >
    >
    >

    Comment

    • Jordan S.

      #3
      Re: Strategy for Rendering Multiple Document Types From Single Source

      Some documents are short and trivial, but others complex and lengthy. In
      either case I was hoping to leverage the styling (font properties, image
      layout etc) that are already appled to the HTML so that I don't have to
      duplicate that logic for each rendered file type.

      -J


      "bruce barker" <brucebarker@di scussions.micro soft.comwrote in message
      news:EAE69E75-82EC-478E-A7AD-446A3B4E091A@mi crosoft.com...
      it depends on how complex the documents are. the html to pdf converters
      either only do simple html, or use an IE instance and a print driver to
      produce pdf.
      >
      >
      -- bruce (sqlwork.com)
      >
      >
      "Jordan S." wrote:
      >
      >I would appreciate your thoughts and opinions on the following:
      >>
      >I am looking to render documents [that are constructed at runtime] into
      >multiple document formats. At a minimum the documents will need to be
      >rendered as HTML, and separately as PDF. Ideally we could also offer a
      >subset additionally as xls and docx (Excel and/or Word 2007) files.
      >>
      >All files will be distributed via ASP.NET Web site. This is a
      >"greenfield "
      >project using .NET 3.5, and I can do whatever I want.
      >>
      >It appears to me that there are two general strategies I could take.
      >>
      >1. Render all documents initially as HTML, then to the other document
      >types.
      >>
      >2. Render all documents initially into whatever the final document type
      >will
      >be (i.e., do not render first as HTML, but just render the pdf file
      >directly, for example).
      >>
      >Keeping in mind that these files are all built at runtime from
      >information
      >and templates stored in a database... These templates are basically HTML
      >snippets styled with css.
      >>
      >My initial preference is for alternative #1 above, as I could have one
      >single code base that builds these documents at runtime. That single code
      >base cranks out the HTML version, which is one of the required formats.
      >From
      >the HTML, it would be a relatively trivial matter to convert the document
      >to
      >PDF or whatever (there are 3rd party components that could do this
      >automaticall y and quickly - perhaps called via some custom HTTP module
      >that
      >I write).
      >>
      >Thoughts? Opinions?
      >>
      >Thanks!
      >>
      >>
      >>
      >>
      >


      Comment

      • John Timney \(MVP\)

        #4
        Re: Strategy for Rendering Multiple Document Types From Single Source

        I would look to create one type of document using code, and then find
        something that can convert that document type into other formats on demand.
        Simplify your problem, find something to solve your most complex issue, and
        then solve the other formats.

        Regards

        John Timney (MVP)




        "Jordan S." <A@B.comwrote in message
        news:%23Qfd0bFt IHA.4476@TK2MSF TNGP06.phx.gbl. ..
        Some documents are short and trivial, but others complex and lengthy. In
        either case I was hoping to leverage the styling (font properties, image
        layout etc) that are already appled to the HTML so that I don't have to
        duplicate that logic for each rendered file type.
        >
        -J
        >
        >
        "bruce barker" <brucebarker@di scussions.micro soft.comwrote in message
        news:EAE69E75-82EC-478E-A7AD-446A3B4E091A@mi crosoft.com...
        >it depends on how complex the documents are. the html to pdf converters
        >either only do simple html, or use an IE instance and a print driver to
        >produce pdf.
        >>
        >>
        >-- bruce (sqlwork.com)
        >>
        >>
        >"Jordan S." wrote:
        >>
        >>I would appreciate your thoughts and opinions on the following:
        >>>
        >>I am looking to render documents [that are constructed at runtime] into
        >>multiple document formats. At a minimum the documents will need to be
        >>rendered as HTML, and separately as PDF. Ideally we could also offer a
        >>subset additionally as xls and docx (Excel and/or Word 2007) files.
        >>>
        >>All files will be distributed via ASP.NET Web site. This is a
        >>"greenfield "
        >>project using .NET 3.5, and I can do whatever I want.
        >>>
        >>It appears to me that there are two general strategies I could take.
        >>>
        >>1. Render all documents initially as HTML, then to the other document
        >>types.
        >>>
        >>2. Render all documents initially into whatever the final document type
        >>will
        >>be (i.e., do not render first as HTML, but just render the pdf file
        >>directly, for example).
        >>>
        >>Keeping in mind that these files are all built at runtime from
        >>information
        >>and templates stored in a database... These templates are basically HTML
        >>snippets styled with css.
        >>>
        >>My initial preference is for alternative #1 above, as I could have one
        >>single code base that builds these documents at runtime. That single
        >>code
        >>base cranks out the HTML version, which is one of the required formats.
        >>From
        >>the HTML, it would be a relatively trivial matter to convert the
        >>document to
        >>PDF or whatever (there are 3rd party components that could do this
        >>automatical ly and quickly - perhaps called via some custom HTTP module
        >>that
        >>I write).
        >>>
        >>Thoughts? Opinions?
        >>>
        >>Thanks!
        >>>
        >>>
        >>>
        >>>
        >>
        >
        >
        >

        Comment

        Working...