{"id":2199,"date":"2011-10-12T05:36:33","date_gmt":"2011-10-12T10:36:33","guid":{"rendered":"http:\/\/www.bytebot.net\/blog\/?p=2199"},"modified":"2012-09-04T23:25:53","modified_gmt":"2012-09-05T04:25:53","slug":"how-i-prepare-expense-reports","status":"publish","type":"post","link":"http:\/\/www.bytebot.net\/blog\/archives\/2011\/10\/12\/how-i-prepare-expense-reports","title":{"rendered":"How I prepare expense reports"},"content":{"rendered":"<p>Its been traditional since the old days to stick receipts on a sheet of paper and have them represent entries into an expense report. I think the only time this differed was at Sun &#8211; there we just stuffed it all into an envelope without any order and someone presumably went through all of them and figured out their own sane order.<\/p>\n<p>Recently I had to scan about 70 pages worth of receipts (yes, imagine the expense value). My scanner creates some rather huge images (at 300dpi, with some 4128&#215;2480 pixels), which average anywhere between 3-12MB per page for one JPG image. The scans to PDFs don&#8217;t make sense because I can&#8217;t concatenate PDFs the way I can JPG images (and the sheet feeder only handles about 15 or so sheets at once, reliably &#8212; its very easy to get paper jams when you have staples and loose paper).<\/p>\n<p>Total size for everything? 300MB. A little hard to attach to an email. So I whipped out trusty ImageMagick (easily installable on MacOSX via homebrew &#8212; <tt>brew install imagemagick<\/tt>). ImageMagick wouldn&#8217;t install due to a conflict with pkg-config from Mono, and since I don&#8217;t use Mono any longer I trashed that.<\/p>\n<p>Then it was as simple as:<\/p>\n<blockquote>\n<p><tt>ls -1 *.jpg | sed \"s\/\\(.*\\)\\.jpg\/\\1.jpg \\1_thumb.jpg\/\" | xargs -n 2 convert -resize 1024 -quality 70<\/tt><\/p>\n<\/blockquote>\n<p>What does that do? It simply finds all JPG files, then it saves thumbnails with a _thumb, and it uses convert (from ImageMagick) to resize it to 1024 pixels with only about 70% quality. This reduced the 300MB tome to something like 10MB!<\/p>\n<p>How do I generate PDFs? Simply open all the thumbnails (open -a Preview *_thumb.jpg) and then do a Print to PDF from Preview.<\/p>\n<p>Voila, all expense receipts are generated and ready for emailing. I typically like to keep attachments below 20MB in size because most mail systems reject it after that.<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-email\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-email sd-button share-icon\" href=\"mailto:?subject=%5BShared%20Post%5D%20How%20I%20prepare%20expense%20reports&body=http%3A%2F%2Fwww.bytebot.net%2Fblog%2Farchives%2F2011%2F10%2F12%2Fhow-i-prepare-expense-reports&share=email\" target=\"_blank\" title=\"Click to email a link to a friend\" data-email-share-error-title=\"Do you have email set up?\" data-email-share-error-text=\"If you&#039;re having problems sharing via email, you might not have email set up for your browser. You may need to create a new email yourself.\" data-email-share-nonce=\"e47c77af29\" data-email-share-track-url=\"http:\/\/www.bytebot.net\/blog\/archives\/2011\/10\/12\/how-i-prepare-expense-reports?share=email\"><span>Email<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-2199\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2011\/10\/12\/how-i-prepare-expense-reports?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\" ><span>Facebook<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-2199\" class=\"share-linkedin sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2011\/10\/12\/how-i-prepare-expense-reports?share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\" ><span>LinkedIn<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-2199\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2011\/10\/12\/how-i-prepare-expense-reports?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" ><span>Twitter<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Its been traditional since the old days to stick receipts on a sheet of paper and have them represent entries into an expense report. I think the only time this differed was at Sun &#8211; there we just stuffed it all into an envelope without any order and someone presumably went through all of them [&hellip;]<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-email\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-email sd-button share-icon\" href=\"mailto:?subject=%5BShared%20Post%5D%20How%20I%20prepare%20expense%20reports&body=http%3A%2F%2Fwww.bytebot.net%2Fblog%2Farchives%2F2011%2F10%2F12%2Fhow-i-prepare-expense-reports&share=email\" target=\"_blank\" title=\"Click to email a link to a friend\" data-email-share-error-title=\"Do you have email set up?\" data-email-share-error-text=\"If you&#039;re having problems sharing via email, you might not have email set up for your browser. You may need to create a new email yourself.\" data-email-share-nonce=\"e47c77af29\" data-email-share-track-url=\"http:\/\/www.bytebot.net\/blog\/archives\/2011\/10\/12\/how-i-prepare-expense-reports?share=email\"><span>Email<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-2199\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2011\/10\/12\/how-i-prepare-expense-reports?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\" ><span>Facebook<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-2199\" class=\"share-linkedin sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2011\/10\/12\/how-i-prepare-expense-reports?share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\" ><span>LinkedIn<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-2199\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2011\/10\/12\/how-i-prepare-expense-reports?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" ><span>Twitter<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_options":[]},"categories":[1,1406],"tags":[1297,154,1296],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4vJD-zt","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":3249,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2016\/07\/06\/may-june-2016-mariadb-server-related-worklog","url_meta":{"origin":2199,"position":0},"title":"May-June 2016 MariaDB Server related worklog","date":"6\/7\/2016","format":false,"excerpt":"Reviewed Sergei's MariaDB in Google Summer of Code 2016 Reviewed Kaj's MariaDB Foundation dialogue GDoc\/blog Accepted to speak at SELF 2016, and also organise the speaking at Nerdear.la in Buenos Aires; tight schedules to make those events Prepared for speech in Hanoi for OpenCPS Launch Event; give speech; wrote blog\u2026","rel":"","context":"In &quot;Work&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3214,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2016\/05\/02\/april-2016-mariadb-server-related-worklog","url_meta":{"origin":2199,"position":1},"title":"April 2016 MariaDB Server related worklog","date":"2\/5\/2016","format":false,"excerpt":"Planning for May MariaDB Corporation roadshows in London and Paris. The Paris edition is also one where Kentoku Shiba from Spiral Arms will make an appearance; we're also likely to plan several meetings around there too. Planning the MariaDB Berlin Meetup. Getting the speakers from our side. Ensuring that other\u2026","rel":"","context":"In &quot;Work&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":643,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2007\/10\/12\/more-disgust-with-the-spaceflight-participant","url_meta":{"origin":2199,"position":2},"title":"more disgust, with the spaceflight participant","date":"12\/10\/2007","format":false,"excerpt":"of all the hullabaloo of sending the first malaysian into space, only to find that the great sheikh muszaphar shukor is just a spaceflight participant (link). not an astronaut, but a space tourist. one that the government used tax payer dollars (okay, ringgit) to push him into. thats rm100 million\u2026","rel":"","context":"In &quot;General&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3063,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2015\/04\/21\/in-singapore-getting-your-gst-back-is-efficiently-electronic","url_meta":{"origin":2199,"position":3},"title":"In Singapore, getting your GST back is efficiently electronic","date":"21\/4\/2015","format":false,"excerpt":"We departed Singapore and got to experience their electronic tourist refund scheme (eTRS), for collecting your GST back. To think, at the cashier\u2019s desk when we made the purchase, we were wondering why we couldn\u2019t just use a Global Blue refund card (useful in most of Europe).\u00a0 At the point\u2026","rel":"","context":"In &quot;Travel&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":27,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2004\/02\/05\/luck--","url_meta":{"origin":2199,"position":4},"title":"luck&#8211;","date":"5\/2\/2004","format":false,"excerpt":"albus has died again, in spite of luck earlier. I really have to go buy a new box now, because there goes my build box and data store. The motherboard looks like whats wonky because I've played with the PSU with a multi-tester (and I'm alive). Why can't motherboard manufacturers\u2026","rel":"","context":"In &quot;General&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":599,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2007\/08\/01\/amusing-open-courseware-request","url_meta":{"origin":2199,"position":5},"title":"Amusing Open Courseware request","date":"1\/8\/2007","format":false,"excerpt":"Today I received most interesting mail from a training company in Australia. They want to use some of my (dated) open courseware, and obviously, I gave them permission. What was amusing was how they approached the situation: \"We are prepared to not make a profit but will realistically have to\u2026","rel":"","context":"In &quot;General&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"amp_enabled":true,"_links":{"self":[{"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/2199"}],"collection":[{"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/comments?post=2199"}],"version-history":[{"count":2,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/2199\/revisions"}],"predecessor-version":[{"id":2473,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/2199\/revisions\/2473"}],"wp:attachment":[{"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/media?parent=2199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/categories?post=2199"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/tags?post=2199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}