{"action":"created","issue":{"url":"https://api.github.com/repos/trade-informatics/caracal/issues/50","repository_url":"https://api.github.com/repos/trade-informatics/caracal","labels_url":"https://api.github.com/repos/trade-informatics/caracal/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/trade-informatics/caracal/issues/50/comments","events_url":"https://api.github.com/repos/trade-informatics/caracal/issues/50/events","html_url":"https://github.com/trade-informatics/caracal/issues/50","id":175786313,"number":50,"title":"Page Orientation","user":{"login":"swedishpotato","id":15358006,"avatar_url":"https://avatars.githubusercontent.com/u/15358006?v=3","gravatar_id":"","url":"https://api.github.com/users/swedishpotato","html_url":"https://github.com/swedishpotato","followers_url":"https://api.github.com/users/swedishpotato/followers","following_url":"https://api.github.com/users/swedishpotato/following{/other_user}","gists_url":"https://api.github.com/users/swedishpotato/gists{/gist_id}","starred_url":"https://api.github.com/users/swedishpotato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swedishpotato/subscriptions","organizations_url":"https://api.github.com/users/swedishpotato/orgs","repos_url":"https://api.github.com/users/swedishpotato/repos","events_url":"https://api.github.com/users/swedishpotato/events{/privacy}","received_events_url":"https://api.github.com/users/swedishpotato/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-08T15:33:10Z","updated_at":"2016-09-08T16:19:15Z","closed_at":null,"body":"Hello!\r\n\r\nI absolutely love the Caracal gem, it is truly awesome!\r\n\r\nI have a request. While I can produce a Word document that \"looks like\" it is in landscape orientation, it still tries to print out as portrait. This means the end users have to make sure they set the printer page orientation manually before printing, which they tend to forget.\r\n\r\nIs there any way of setting the page orientation to landscape \"properly\", rather than the current fiddle I use as follows:\r\n\r\n# landscape \r\n\r\ndocx.page_size do\r\n  width   16837    # sets the page width. units in twips = 297 mm\r\n  height  11905    # sets the page height. units in twips = 210 mm\r\nend\r\n\r\n# portrait\r\n\r\ndocx.page_size do\r\n  width   11905     # sets the page width. units in twips = 210 mm\r\n  height  16837     # sets the page height. units in twips = 297 mm\r\nend\r\n\r\nIt would also be great to tell Word that the document to be printed is A4, letter etc.\r\n\r\nI'd have a go at this myself, but this is way beyond my competency level! :)\r\n\r\nCheers,\r\n\r\nMichael"},"comment":{"url":"https://api.github.com/repos/trade-informatics/caracal/issues/comments/245652737","html_url":"https://github.com/trade-informatics/caracal/issues/50#issuecomment-245652737","issue_url":"https://api.github.com/repos/trade-informatics/caracal/issues/50","id":245652737,"user":{"login":"jdugan","id":34268,"avatar_url":"https://avatars.githubusercontent.com/u/34268?v=3","gravatar_id":"","url":"https://api.github.com/users/jdugan","html_url":"https://github.com/jdugan","followers_url":"https://api.github.com/users/jdugan/followers","following_url":"https://api.github.com/users/jdugan/following{/other_user}","gists_url":"https://api.github.com/users/jdugan/gists{/gist_id}","starred_url":"https://api.github.com/users/jdugan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdugan/subscriptions","organizations_url":"https://api.github.com/users/jdugan/orgs","repos_url":"https://api.github.com/users/jdugan/repos","events_url":"https://api.github.com/users/jdugan/events{/privacy}","received_events_url":"https://api.github.com/users/jdugan/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T16:19:15Z","updated_at":"2016-09-08T16:19:15Z","body":"Hi, Michael.\r\n\r\nThanks for the kind words.  I often tell programmers they should manage an open source library if for no other reason than to receive unexpected praise every now and again. It feels good.  :)\r\n\r\nI confess I've never had a personal reason to print a landscape file created with Caracal.  I'm surprised the page size changes aren't enough to convince Word to default to landscape orientation in the printer settings, but then again, it's Word, so maybe I shouldn't be surprised.  I suspect there's some simple OOXML attribute we can set to help communicate our intent.\r\n\r\nI like the idea of having a standard list of preset sizes.  Especially because twips is such an absurd unit of measurement.  Let's focus first on getting orientation set properly and then revisit preset sizes afterward.\r\n\r\nEven if you don't feel up for implementing the feature (which is fine), you might be able to do some investigation of the OOXML to determine what's missing.  There's a brief description of the reverse engineering process I use to work on problems near the end of the README.  My approach is surprisingly unsophisticated.  Google docs are sometimes more helpful than actual Word documents for spotting small differences because they tend to use vastly simplified OOXML (like Caracal).  I'll try to make time to look into the problem myself this weekend.  If you find something before then, please do let me know and I'll try to confirm.\r\n\r\nAs a side note, it's a bit of pleasant curiosity to me that Caracal has so many Swedish fans.  Particularly because my wife and I are a bit obsessed with all things Scandinavian.  We've been teaching ourselves (forgive me) Norwegian the past year or so.  We visited Norway and Denmark last summer, and we hope to make it to Sweden some day soon.\r\n"}}
{"actor":{"display_login":"jdugan"}}