{"id":1094,"date":"2012-07-06T12:21:47","date_gmt":"2012-07-06T03:21:47","guid":{"rendered":"https:\/\/gunmagisgeek.com\/wordpress\/?p=1094"},"modified":"2014-12-19T16:42:16","modified_gmt":"2014-12-19T07:42:16","slug":"post-1094","status":"publish","type":"post","link":"https:\/\/gunmagisgeek.com\/blog\/indesign\/1094","title":{"rendered":"InDesign\u306e\u30b9\u30af\u30ea\u30d7\u30c6\u30a3\u30f3\u30b0\u3000\u30e1\u30e2"},"content":{"rendered":"<p>\u30cd\u30bf\u304c\u7121\u3044\u306e\u3067\u3001\u6614\u306e\u30d6\u30ed\u30b0\u304b\u3089\u6398\u308a\u51fa\u3057\u3066\u304d\u305f\u8a18\u4e8b\u3002<\/p>\n<p>\uff24\uff22\u304b\u3089\u51fa\u529b\u3055\u308c\u305fCSV\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3001\u30c7\u30fc\u30bf\u7d50\u5408(\u81ea\u52d5\u7d44\u7248)\u3001\u30c4\u30e1\u4ed8\u3051\u3001\u30ce\u30f3\u30d6\u30eb\u632f\u308a\u3001PDF\u66f8\u304d\u51fa\u3057\u306a\u3069\u3002(\u53c2\u8003\uff1a<a href=\"http:\/\/study-room.info\/id\/\">InDesign\u306e\u52c9\u5f37\u90e8\u5c4b<\/a>)<\/p>\n<p><strong>Javascript\u5185\u3067\u300c\u30c7\u30fc\u30bf\u7d50\u5408\u300d\u6a5f\u80fd\u3092\u5b9f\u884c<\/strong><\/p>\n<pre class=\"lang:js decode:true \" >var doc = app.activeDocument;\r\nvar Filename = File.openDialog(&quot;\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e&quot;);\r\nvar dmg = doc.dataMergeProperties;\r\ndmg.selectDataSource(Filename);\r\ndmg.mergeRecords();\r\n<\/pre>\n<p><strong>\u30c4\u30e1\u306e\u8cbc\u308a\u4ed8\u3051<\/strong><\/p>\n<pre class=\"lang:js decode:true \" >doc = app.activeDocument;\r\nvar Filename = File.openDialog(&quot;\u30c4\u30e1\u753b\u50cf\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044&quot;);\r\nif(Filename){\r\n\tfor(i=0;i &lt; app.activeDocument.pages.length;i++){\r\n\t\timgFrame = doc.pages[i].textFrames.add();\r\n\t\tif(i % 2 == 0){\r\n\t\t\timgFrame. visibleBounds = [&quot;-3mm&quot;, &quot;-3mm&quot;, &quot;300mm&quot;, &quot;10mm&quot;]; \r\n\t\t}else{\r\n\t\t\timgFrame. visibleBounds = [&quot;-3mm&quot;, &quot;200mm&quot;, &quot;300mm&quot;, &quot;213mm&quot;]; \r\n\t\t}\r\n\t\timgFrame.contentType = ContentType.graphicType;\r\n\t\timgFrame.place(Filename);\r\n\t}\r\n}<\/pre>\n<p><strong>\u30ce\u30f3\u30d6\u30eb\u3092\u632f\u308b<\/strong><\/p>\n<pre class=\"lang:js decode:true \" >var doc = app.activeDocument;\r\nvar start_nombre = prompt(&quot;\u30ce\u30f3\u30d6\u30eb\u306e\u958b\u59cb\u756a\u53f7\u3092\u5165\u529b&quot;,&quot;&quot;);\r\nif(start_nombre != null){ \r\n\tif(start_nombre ==&quot;&quot;) start_nombre = &quot;1&quot;;\r\n\tfor(i=0;i &lt; app.activeDocument.pages.length;i++){\r\n\t\tnombreFrame = doc.pages[i].textFrames.add();\r\n\t\tnombreFrame . visibleBounds = [&quot;285mm&quot;, &quot;95mm&quot;, &quot;290mm&quot;, &quot;115mm&quot;];\r\n\t\tnombre = parseInt(start_nombre) + i;\r\n\t\tnombreFrame.contents = String(nombre);\r\n\t\tnombreFrame.paragraphs[0].justification = Justification.centerAlign;\r\n\t}\r\n}\r\n<\/pre>\n<p><strong>PDF\u66f8\u304d\u51fa\u3057<\/strong><\/p>\n<pre class=\"lang:js decode:true \" >PDFpre = &quot;PDFX1&quot;\u3000\/\/PDF\u66f8\u304d\u51fa\u3057\u30d7\u30ea\u30bb\u30c3\u30c8\u306e\u6307\u5b9a\r\nvar filename = File.saveDialog(&quot;\u4fdd\u5b58\u5148\u30d5\u30a9\u30eb\u30c0\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044&quot;,&quot;.pdf&quot;);\r\nif (filename)\r\n{\r\n\tif(PDFpre){\r\n\t\tapp.activeDocument.exportFile(ExportFormat.pdfType, filename, false,PDFpre);\r\n\t}else{\r\n\t\tapp.activeDocument.exportFile(ExportFormat.pdfType, filename, false);\r\n\t}\r\n}<\/pre>\n<p><strong>\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u4fee\u6b63<\/strong><\/p>\n<pre class=\"lang:js decode:true \" >var docObj = app.activeDocument;\r\nfor (var i=0; i&lt;docObj.pages.length; i++) \/\/\u30da\u30fc\u30b8\u30eb\u30fc\u30d7\r\n{\r\n\tvar tfObj = docObj.pages[i].textFrames; \/\/\u30da\u30fc\u30b8\u5185\u30c6\u30ad\u30b9\u30c8\u30d5\u30ec\u30fc\u30e0\r\n\tfor (var j=0; j&lt;tfObj.length; j++){\r\n\t\twhile(tfObj[j].overflows == true){\r\n\t\t\ttry{\r\n\t\t\t\t--tfObj[j].parentStory.horizontalScale ;\r\n\t\t\t}catch(e){\r\n\t\t\t\talert(e);\r\n\t\t\t\t$.writeln(tfObj[j].texts[0]);\r\n\t\t\t\texit();\r\n\t\t\t}\r\n\t\t}\t\r\n\t}\t\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u30cd\u30bf\u304c\u7121\u3044\u306e\u3067\u3001\u6614\u306e\u30d6\u30ed\u30b0\u304b\u3089\u6398\u308a\u51fa\u3057\u3066\u304d\u305f\u8a18\u4e8b\u3002&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-1094","post","type-post","status-publish","format-standard","hentry","category-indesign"],"_links":{"self":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/1094","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/comments?post=1094"}],"version-history":[{"count":8,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/1094\/revisions"}],"predecessor-version":[{"id":3270,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/1094\/revisions\/3270"}],"wp:attachment":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media?parent=1094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/categories?post=1094"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/tags?post=1094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}