Downloaded octet-stream then encoding as pdf; can't get line endings worked out -
tools i'm using this:
chrome notepad++ sublime text 3 fiddler winmerge adobe acrobat reader x
synopsis
i have downloaded pdf twice, once through chrome experimental control; once again through raw /get
request via fiddler returns me octet-stream. point, can save octet-stream pdf , can proper page count , of page headers , numbers, little of body content loading. when open file in adobe reader x, error it
cannot extract embedded font 'lfidth+arialmt'. characters may not display or print correctly
and cannot work through why can extracted 'true' pdf cannot 1 saving.
details
as manual pull of file, have provided
accept: application/pdf, application/x-pdf, application/x-gzpdf, application/x-bzpdf
the server sent me aplication/octet-stream
attachment disposition.
so recap:
- valid foo.pdf sitting on hard drive
- http response octet-stream version of same file, in utf-8 encoding (i assume)
here know:
i pulled message body of response server , dropped file. ran winmerge comparison of against contents of pdf , every line mismatched on line endings. re-encoded eols unix , diff shrank ~1k lines out of 160k. close inspection of mismatch indicates valid pdf maintains looks nul 00
character in places whereas octet-stream contains literal spaces. also, "true" pdf reporting eol: lf 1252 mixed
through winmerge. "raw" pdf reporting 1252 unix
when homogenize 'true' pdf 1252 unix
, same issue explained in 'raw' one.
is there can mess of octet-stream straightened out?
note pdf downloaded through chrome historic. have on machine, downloaded "sometime in past" , request headers used when processing
/get
no longer available. attempting download through browser "now" results in error, explicit request against resource through fiddler returning pdf octet-stream.
well now....
in fiddler session,
right click http response application/octet-stream
body | save | response | response body
if content-disposition: attachment;filename
has been set on response, file save dialog prepopulated filename
easy after know it's there.
Comments
Post a Comment