I am trying to convert PDF files to text files using
textutil. I don't if there are special types of PDFs that can and cannot be converted. The files I am trying to convert are in a searchable format, which I assume is a minimum requirement. When I convert the file, the text document is completed garbled output. Here is my code:
textutil -convert txt example.pdf
Here are some of the first lines, in case that helps to identify where I am going wrong:
%PDF-1.3 %ƒÂÚÂÎßÛ†–ƒ∆ 4 0 obj << /Length 5 0 R /Filter /FlateDecode >> stream xÌõYè‹∏«ﬂı)8>2”„å,R%Ÿªõ¯ﬁxs9ôM‚<YÅ`„Ô‰W,J¢‘íF3”@^2Z›<ädˇ:(ˇl>òüçuπ´Í¶ñ¶nõº.⁄⁄ 4>~˘œ?Ã_ÕøÕ”W_≠˘Ù’·ﬂ◊OL.ò´øÂKI5ÖÀª∫*≥O_ÃÀk”‘aH|\1OØØù ±Ê˙'sqv0◊ˇ2oÆ√Vñ©˘÷Êmy2jæ»;P+Ú¢(*s˝ikó3>z¸ãõæ8;èè˙Î„·ê—z~=| ¯D˝rËî)WÈå<˝¡ÒˇnÆﬂ/3¿’UnõÆ4~∫Á;Ú”µ≠J˙4‰JWùîgz8€]êªA@g¸≠kRŸ¯‹÷ùàëeÁÔπUŸÓ÷Ü´≤Œ
I'm guessing it has to do with some encoding feature -- not my area of expertise, so any assistance would be greatly appreciated!