{"id":1286,"date":"2009-06-01T15:15:19","date_gmt":"2009-06-01T19:15:19","guid":{"rendered":"http:\/\/www.schollnick.net\/wordpress\/?p=1286"},"modified":"2009-06-01T15:15:19","modified_gmt":"2009-06-01T19:15:19","slug":"convert-this","status":"publish","type":"post","link":"http:\/\/www.schollnick.net\/wordpress\/2009\/06\/convert-this\/","title":{"rendered":"Convert this!"},"content":{"rendered":"<p>Apple includes as part of the Printer Libraries, a small conversion utility. \u00c2\u00a0I presume it is used to help convert certain formats to either PDF or Postscript internally&#8230; \u00c2\u00a0But here&#8217;s some fun we can have with it.<\/p>\n<p>For example, let&#8217;s say we have a file called &#8220;my.html&#8221;, but using this command line:<\/p>\n<p>\/System\/Library\/Printers\/Libraries\/convert -f my.html -o my.pdf<\/p>\n<p>You would end up with a PDF version of the HTML file. \u00c2\u00a0Strings doesn&#8217;t reveal the Mime Type database, so I can&#8217;t tell what mime-types this will convert. \u00c2\u00a0My research indicates that it can handle most native formats from Mac OS X (rtf, Jpeg, gif, png, html, txt and more).<\/p>\n<p><!--more-->Usage: convert [ options ]<\/p>\n<p>Options:<\/p>\n<p>-f filename \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0Set file to be converted (otherwise stdin)<br \/>\n-o filename \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0Set file to be generated (otherwise stdout)<br \/>\n-i mime\/type \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 Set input MIME type (otherwise auto-typed)<br \/>\n-j mime\/type \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 Set output MIME type (otherwise application\/pdf)<br \/>\n-P filename.ppd \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0Set PPD file<br \/>\n-a &#8216;name=value &#8230;&#8217; \u00c2\u00a0Set option(s)<br \/>\n-U username \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0Set username for job<br \/>\n-J title \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 Set title<br \/>\n-c copies \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0Set number of copies<br \/>\n-u \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 Remove the PPD file when finished<br \/>\n-D \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 Remove the input file when finished<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apple includes as part of the Printer Libraries, a small conversion utility. \u00c2\u00a0I presume it is used to help convert certain formats to either PDF or Postscript internally&#8230; \u00c2\u00a0But here&#8217;s some fun we can have with it. For example, let&#8217;s say we have a file called &#8220;my.html&#8221;, but using this command line: \/System\/Library\/Printers\/Libraries\/convert -f my.html <a class=\"read-more\" href=\"http:\/\/www.schollnick.net\/wordpress\/2009\/06\/convert-this\/\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[12,5],"tags":[84],"_links":{"self":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/posts\/1286"}],"collection":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/comments?post=1286"}],"version-history":[{"count":0,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/posts\/1286\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/media?parent=1286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/categories?post=1286"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/tags?post=1286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->