Results 1 to 5 of 5

Thread: PDF issues using HttpWebRequest

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Minnesota
    Posts
    830

    PDF issues using HttpWebRequest

    I am using HttpWebRequest/HttpWebResponse to pass information and then retrieve information. I can request fine but the response is a pdf file that seems to look fine but if I save to a file it give me the corrupt error.

    The pdf files lookes like the following:
    %PDF-1.4
    %
    1 0 obj <</Filter/FlateDecode/Type/XObject/Length 1565/BitsPerComponent 8/Height 49/Mask [255 255 ]/ColorSpace[/Indexed/DeviceRGB 255(f

    It's obviously decoding or something. Is this even possible to save to a file to view?

    Thanks.

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: PDF issues using HttpWebRequest

    is this in ASP.NET or in a windows form app?

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Minnesota
    Posts
    830

    Re: PDF issues using HttpWebRequest

    Sorry, a vb.net app

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: PDF issues using HttpWebRequest

    You need to look at the headers of the WebResponse you are receiving, and if it is a PDF, then you should be handling it differently. You can also use WebClient to download the PDF.

  5. #5
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: PDF issues using HttpWebRequest

    check the link in my signature for downloading a file from a URL with progress

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width