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. Reading PDF data from Byte Stream

Reading PDF data from Byte Stream

Scheduled Pinned Locked Moved C#
csharpmcpdata-structuresperformancehelp
5 Posts 5 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.
  • T Offline
    T Offline
    Tauseef A
    wrote on last edited by
    #1

    hi guys i have a byte array created from a pdf file , now i want to get text data from this byte data without saving file to disk , means i want to get string somewhere from memory stream . any help ? regards. Tauseef A Khan MCP Dotnet framework 2.0.

    J L F 3 Replies Last reply
    0
    • T Tauseef A

      hi guys i have a byte array created from a pdf file , now i want to get text data from this byte data without saving file to disk , means i want to get string somewhere from memory stream . any help ? regards. Tauseef A Khan MCP Dotnet framework 2.0.

      J Offline
      J Offline
      John Gathogo
      wrote on last edited by
      #2

      You can convert a byte array to a string using: System.Text.Encoding.Unicode.GetString([byteArray]); Note: Unicode is just one of the encodings. You can use ASCII, UTF8, etc

      R 1 Reply Last reply
      0
      • J John Gathogo

        You can convert a byte array to a string using: System.Text.Encoding.Unicode.GetString([byteArray]); Note: Unicode is just one of the encodings. You can use ASCII, UTF8, etc

        R Offline
        R Offline
        Rajesh Anuhya
        wrote on last edited by
        #3

        Actually that not his requirement.., He wants to read the information in PDF Document ...

        Rajesh B --> A Poor Workman Blames His Tools <--

        1 Reply Last reply
        0
        • T Tauseef A

          hi guys i have a byte array created from a pdf file , now i want to get text data from this byte data without saving file to disk , means i want to get string somewhere from memory stream . any help ? regards. Tauseef A Khan MCP Dotnet framework 2.0.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          You cannot read a PDF file in this way. A PDF file is a structured file containing objects that define pages, strings, images, fonts etc, with an index at the end of the file that allows quick random access to each object. You can get a copy of the PDF specification[^] from the Adobe web site, or use one of the free PDF libraries such as iTextSharp[^].

          Just say 'NO' to evaluated arguments for diadic functions! Ash

          1 Reply Last reply
          0
          • T Tauseef A

            hi guys i have a byte array created from a pdf file , now i want to get text data from this byte data without saving file to disk , means i want to get string somewhere from memory stream . any help ? regards. Tauseef A Khan MCP Dotnet framework 2.0.

            F Offline
            F Offline
            fjdiewornncalwe
            wrote on last edited by
            #5

            How do you intend to define the location and content of the string you want to capture? I ask because the pdf format converted to a byte array isn't a plain text stream, it is binary data, which will make handling the data potentially problematic.

            I wasn't, now I am, then I won't be anymore.

            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