locked
What is the best way to generate a PDF or Word document within LS? RRS feed

  • Question

  • I have explorated several ways to create a PDF or Word document in LS...

    I have found this 2 options

    1. Use some HTML rendering tool (From NuGet for example) and invoking the ASP.NET form or web page from LS using the Web Browser or the DOM controller.

    2. Using some SilverLight control as an intermediate as in this article http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/3/Printing-With-LightSwitch.aspx

    3. (An unproven theory) Create the Word document with the Office.Interop services or using a dynamic object creating the ActiveX Word Object and amnipulating it to create the document and finally renderit as a PDF.

    All of this options has some problems:

    1. All HTML to PDF render components has some graphical problems.. so the final PDF sometimes is a mess.

    2. The Article exposes a good way but for a real application you should manage all about the paper size and printing stuff.. very hard work.

    3. I don't know if it's possible to do it and get a final PDF wothout many complications.. it's unproven !

    But I would like to know opinions and suggestions...

    What's the best way for doing this?

    Thanks :D


    SebaXOR

    Monday, July 30, 2012 11:19 AM

Answers

  • Hi

    It will be better if you use Grid Logic Office Integration Pack. Easy Simplest Handy

    Regards


    Rashmi Ranjan Panigrahi
    www.lightswitchspecial.com

    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”.
    This will help other users to find their answer quickly.

    • Marked as answer by sebaxor Tuesday, July 31, 2012 6:54 PM
    Tuesday, July 31, 2012 12:59 PM

All replies

  • IMO, XtraReports is current best and easiest way to create a report/letter/labels in LS.  Can be coded to create pdf on server side if needed, and/or user can save as pdf, html, excel, print, etc.  So a lot of bang for the buck.  Downside is can not use xtra in V2 yet.  The other methods above are soo much work, I would rather publish a V1 site just for reports, and link to that from a V2 site if you nedd V2 site now.  Then wait for V2-xtra and integrate reports back in main site.  You could go down the road of SS server side Reports and just link to report URLs.  Bit more learning curve and setup and takes a dependency on SSR which can be pain.  Xtra is integrated into your app, so it walks around with your app code without a bunch of other luggage needed.  

    Monday, July 30, 2012 10:55 PM
  • More than easy.. a best way... I never liked to use third-party components, I prefer doing it by myself...
    Thanks for your suggestion :D

    Some other options?


    SebaXOR

    Monday, July 30, 2012 11:59 PM
  • Hi

    It will be better if you use Grid Logic Office Integration Pack. Easy Simplest Handy

    Regards


    Rashmi Ranjan Panigrahi
    www.lightswitchspecial.com

    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”.
    This will help other users to find their answer quickly.

    • Marked as answer by sebaxor Tuesday, July 31, 2012 6:54 PM
    Tuesday, July 31, 2012 12:59 PM
  • Creating a full set of reports manually with office integration pack and word/excel is great if you like taking a beating and have tons of time on your hands (or if your output requirements are real simple).  Not to say anything wrong with OIP at all.  Does make the job easier.  Just compared to a reporting tools is no real comparison and don't think it attempts to be such.  But if that works, live strong on it! :-)
    Wednesday, August 1, 2012 3:59 AM