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. FlateDecode for PDF file (Flate Compression)

FlateDecode for PDF file (Flate Compression)

Scheduled Pinned Locked Moved C#
csharptutorialcombeta-testingquestion
1 Posts 1 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.
  • P Offline
    P Offline
    pmpdesign
    wrote on last edited by
    #1

    Does anyone know how to use the .net2 (c#) DeflateStream to compress content for a pdf? I have the PDF stuff written and working fine including text, images etc with the page contents in plain unicode. Example 5 0 obj<< /Length 278 >>stream [commands to write to PDF page in unicode] endstream When I try to compress the [commands to write to PDF page in unicode] part and add the /Filter /FlateDecode into the pdf object header, Acrobat seems not to recognise the compression and just returns a blank page. I found a Microsoft article http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=97064[^] which seems to indicate the the MS version of flate compression does not follow the original spec for zlib and needs two additional characters before the stream. I have used byte[0] = 88 and also 120 and byte[1] = 0 followed by the byte stream of the compressed page, but still doesn't work. Has anyone managed to use the DeflateStream successfully and if so, could you point me in the right direction please.

    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