Skip to main content
May 6, 2010
Question

Whitespace Being Stripped from PDFs

  • May 6, 2010
  • 1 reply
  • 231 views

Hello,

I'm fairly new to CF development, but I inherited a rather large codebase.

I am attempting to add some functionality to upload a PDF document directly (using the PUT HTTP verb, not as a multipart form POST), but everytime I try to do so, the document seems to lose all of its internal whitespace, thus making it unreadable.

I am using GetHttpRequestData().content to retrieve the data, so I thought that maybe it was trying to normalize the internal whitespace.

Note that the new document's file size is half of the original file size - though all the content (aside from the whitespace) appears to be there when I try opening up both docs in a text editor and comparing them side by side.

I'm really stuck here. Can anyone point me in the right direction?

Thanks,

-Michael

    This topic has been closed for replies.

    1 reply

    May 7, 2010

    Hey,

    As it turns out, it was just an ID10T user error - I was using cURL to send the PDF, but I used -d instead of --data-binary to specify the file, so cURL thought it was an ASCII file and tried to normalize it.

    Thanks,

    -Michael