{"id":2370,"date":"2009-01-23T07:00:11","date_gmt":"2009-01-23T07:00:11","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2009\/01\/23\/print-pdf\/"},"modified":"2016-11-01T17:41:11","modified_gmt":"2016-11-01T21:41:11","slug":"print-pdf","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2009\/01\/23\/print-pdf\/","title":{"rendered":"Print PDF"},"content":{"rendered":"<div class=\"alert alert-info\"> <span class=\"alert_icon icon-alert-info-reverse\"><\/span><p class=\"alert_heading\"><strong>Note<\/strong><\/p><p>The file submission referenced in this post is no longer available on File Exchange.<\/p><\/div>\r\n\r\n<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <introduction>\r\n      <p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/5021\">Bob<\/a>'s pick this week is <tt>print_pdf<\/tt> by Oliver Woodford.\r\n      <\/p>\r\n   <\/introduction>\r\n   <p>If you export MATLAB graphics to PDF files then fuss with settings to make it look \"just so\" then <tt>print_pdf<\/tt> may be for you.\r\n   <\/p>\r\n   <p>This is hardly the only such submission on the File Exchange. There are dozens of files with the <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/?term=tag%3A%22pdf%22\">\"pdf\" tag<\/a> for example. What made this submission stand out from the pack was the activity log. First, notice the Comments and Ratings. Then scroll down to the <b>Updates<\/b> section. Oliver harnessed the power of his fan club. He was extremely responsive to make improvements based on feedback from\r\n      others. We like to see this kind of social computing in the File Exchange, and encourage more posters to use the forum to\r\n      improve their code.\r\n   <\/p>\r\n   <p><a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2370#respond\">Comments?<\/a><\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_a96209c2bf3749fcb89590c6b20f9865() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='a96209c2bf3749fcb89590c6b20f9865 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' a96209c2bf3749fcb89590c6b20f9865';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        author = 'Robert Bemis';\r\n        copyright = 'Copyright 2009 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }   \r\n      \r\n-->\r\n<\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_a96209c2bf3749fcb89590c6b20f9865()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n            the MATLAB code \r\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; 7.8<br><\/p>\r\n<\/div>\r\n<!--\r\na96209c2bf3749fcb89590c6b20f9865 ##### SOURCE BEGIN #####\r\n%%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/5021 Bob>'s \r\n% pick this week is \r\n% |<https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/22018 print_pdf>|\r\n% by Oliver Woodford.\r\n%%\r\n% If you export MATLAB graphics to PDF files then fuss with settings to make\r\n% it look \"just so\" then |print_pdf| may be for you. \r\n%%\r\n% This is hardly the only such submission on the File Exchange. There are\r\n% dozens of files with the \r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/?term=tag%3A%22pdf%22 \"pdf\" tag>\r\n% for example. What made this submission stand out from the pack was the\r\n% activity log. First, notice the \r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/22018#feedback Comments and Ratings>.\r\n% Then scroll down to the *Updates* section.\r\n% Oliver harnessed the power of his fan club. He was extremely responsive to\r\n% make improvements based on feedback from others. We like to see\r\n% this kind of social computing in the File Exchange, and encourage more\r\n% posters to use the forum to improve their code. \r\n%%\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2370#respond Comments?>\r\n\r\n##### SOURCE END ##### a96209c2bf3749fcb89590c6b20f9865\r\n-->","protected":false},"excerpt":{"rendered":"<p> NoteThe file submission referenced in this post is no longer available on File Exchange.\r\n\r\n\r\n   \r\n      Bob's pick this week is print_pdf by Oliver Woodford.\r\n      \r\n   \r\n   If you export MATLAB... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2009\/01\/23\/print-pdf\/\">read more >><\/a><\/p>","protected":false},"author":46,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2370"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2370"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2370\/revisions"}],"predecessor-version":[{"id":8005,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2370\/revisions\/8005"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}