Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Display a PDF in a Windows C# program.

Display a PDF in a Windows C# program.

Scheduled Pinned Locked Moved C#
comcsharpadobequestiondiscussion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jbradshaw
    wrote on last edited by
    #1

    I'm building kiosk software where we need to be able to display a PDF file. Because this is a kiosk, there is no user interaction which means that it is filled with issues. What do you do with multiple pages, we are displaying on a plasma so the aspect ratio is wrong which means there will be black bars, we'd like to not have any menus since they take up real estate. So does anybody have any ideas? One we came up with was to convert the document to jpgs, one page per image, and then scroll through them. This works but the library I looked at (http://www.aspose.com/) is slow (about 2 seconds a page). I've also looked at the Adobe ActiveX control (just started looking at it) but we've had issues before where Adobe wants to update itself and puts a message on the screen. So does anybody have any suggestions/thoughts on this? TIA - Jeff.

    A K 2 Replies Last reply
    0
    • J jbradshaw

      I'm building kiosk software where we need to be able to display a PDF file. Because this is a kiosk, there is no user interaction which means that it is filled with issues. What do you do with multiple pages, we are displaying on a plasma so the aspect ratio is wrong which means there will be black bars, we'd like to not have any menus since they take up real estate. So does anybody have any ideas? One we came up with was to convert the document to jpgs, one page per image, and then scroll through them. This works but the library I looked at (http://www.aspose.com/) is slow (about 2 seconds a page). I've also looked at the Adobe ActiveX control (just started looking at it) but we've had issues before where Adobe wants to update itself and puts a message on the screen. So does anybody have any suggestions/thoughts on this? TIA - Jeff.

      A Offline
      A Offline
      AspDotNetDev
      wrote on last edited by
      #2

      Just a thought...

      jbradshaw wrote:

      One we came up with was to convert the document to jpgs, one page per image, and then scroll through them. This works but the library I looked at (http://www.aspose.com/) is slow (about 2 seconds a page).

      Is the PDF generated dynamically by software you don't control? Can you just create the JPEG's in advance (once, when you write the software), then display those and not have to worry about PDF's? And why does speed matter that much? Can't you just convert the PDF in advance (i.e., right before it's needed), then you'll have each page as a JPEG to scroll as you please? Also, any reason you chose JPEG? Do your PDF's contain natural type images (e.g., photography), or does it contain just text? If just text, PNG may be a more ideal format (lossless and compresses very well with computer generated images). I did some Googling and came across ImageMagick, which apparently converts images and supports PDF as an input format (note that, for PDF's, it says it requires Ghostscript).

      [Forum Guidelines]

      1 Reply Last reply
      0
      • J jbradshaw

        I'm building kiosk software where we need to be able to display a PDF file. Because this is a kiosk, there is no user interaction which means that it is filled with issues. What do you do with multiple pages, we are displaying on a plasma so the aspect ratio is wrong which means there will be black bars, we'd like to not have any menus since they take up real estate. So does anybody have any ideas? One we came up with was to convert the document to jpgs, one page per image, and then scroll through them. This works but the library I looked at (http://www.aspose.com/) is slow (about 2 seconds a page). I've also looked at the Adobe ActiveX control (just started looking at it) but we've had issues before where Adobe wants to update itself and puts a message on the screen. So does anybody have any suggestions/thoughts on this? TIA - Jeff.

        K Offline
        K Offline
        Kythen
        wrote on last edited by
        #3

        If Aspose is too slow, here's another library you might want to try: GDPicture.NET[^] I haven't used it in any projects yet, but I did try it for a proof-of-concept to create a pdf from a composite image. It wasn't too hard to use and got the job done.

        J 1 Reply Last reply
        0
        • K Kythen

          If Aspose is too slow, here's another library you might want to try: GDPicture.NET[^] I haven't used it in any projects yet, but I did try it for a proof-of-concept to create a pdf from a composite image. It wasn't too hard to use and got the job done.

          J Offline
          J Offline
          jbradshaw
          wrote on last edited by
          #4

          Turns out you can use the Adobe ActiveX as long as the Reader is installed on the machine. Does everything I need. Thanks everybody. Jeff.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups