{"id":32,"date":"2013-11-27T06:38:47","date_gmt":"2013-11-27T12:38:47","guid":{"rendered":"http:\/\/www.teamdesk.net\/blog\/2013\/11\/attachmenturl-image-processing-in-documents\/"},"modified":"2015-10-26T11:39:36","modified_gmt":"2015-10-26T16:39:36","slug":"attachmenturl-image-processing-in-documents","status":"publish","type":"post","link":"https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/","title":{"rendered":"Attachment\/URL image processing in documents"},"content":{"rendered":"<p>We are now embedding images into document when generating it from <a href=\"http:\/\/www.teamdesk.net\">TeamDesk<\/a>.<\/p>\n<p>While ago, we\u2019ve added settings for specifying thumbnail size for attachment columns. Now documents respect these settings and downscale images accordingly. Images from URL columns and formulas are embedded in a full scale by default. To override this behavior you can add #ps suffix after the field name in MERGEFIELD code to specify image\u2019s bounding box size. The image will retain its aspect ratio and won\u2019t exceed box dimensions \u2013 no upscaling is performed.<\/p>\n<p>The suffix accepts either one number to specify square bounding box or two numbers separated by \u201cx\u201d to specify rectangular bounding box and the unit of measurement \u2013 either <em>in<\/em>, <em>cm<\/em>, <em>mm<\/em>, <em>pt<\/em> or <em>px<\/em>.<\/p>\n<p>Suppose there is a column called Image in your application. By default, <span style=\"background-color: #cccccc;\"><strong>{ MERGEFIELD Image }<\/strong><\/span> is generated into the document template. To fit its content into 200x200px box modify field code to <span style=\"background-color: #cccccc;\"><strong>{ MERGEFIELD Image#ps200px }<\/strong><\/span>. To fit it into 6.5x10cm box, use <strong><span style=\"background-color: #cccccc;\">{ MERGEFIELD Image#ps6.5x10cm }<\/span><\/strong>.<\/p>\n<p>To illustrate it, let\u2019s create simple document with Logo column pointing to TeamDesk <a href=\"http:\/\/www.teamdesk.net\/images\/td450x450.png\" target=\"_blank\">logo<\/a> which is 450&#215;450 image (approximately 12x12cm)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;\" title=\"image\" src=\"http:\/\/foresoft.typepad.com\/.a\/6a00e54ee895e98834019b01ba2f93970b-pi\" alt=\"image\" width=\"338\" height=\"179\" border=\"0\" \/><\/p>\n<p>And here are results:<\/p>\n<p><a href=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2013\/11\/221.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-352\" src=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2013\/11\/221.png\" alt=\"22,1\" width=\"472\" height=\"612\" srcset=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2013\/11\/221.png 472w, https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2013\/11\/221-231x300.png 231w\" sizes=\"auto, (max-width: 472px) 100vw, 472px\" \/><\/a><\/p>\n<p>As you can see, first logo was downscaled into 100x100px box. Second logo, despite rectangular box 5x10cm was specified, was downscaled to 5x5cm to maintain its aspect ratio. Since last box\u2019s dimensions exceed logo size, third logo was not upscaled, rather retaining it\u2019s original 12x12cm size.<\/p>\n<p>Enjoy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are now embedding images into document when generating it from TeamDesk. While ago, we\u2019ve added settings for specifying thumbnail size for attachment columns. Now documents respect these settings and downscale images accordingly. Images from URL columns and formulas are embedded in a full scale by default. To override this behavior you can add #ps [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-whats-new"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Attachment\/URL image processing in documents - TeamDesk Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Attachment\/URL image processing in documents - TeamDesk Blog\" \/>\n<meta property=\"og:description\" content=\"We are now embedding images into document when generating it from TeamDesk. While ago, we\u2019ve added settings for specifying thumbnail size for attachment columns. Now documents respect these settings and downscale images accordingly. Images from URL columns and formulas are embedded in a full scale by default. To override this behavior you can add #ps [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/\" \/>\n<meta property=\"og:site_name\" content=\"TeamDesk Blog\" \/>\n<meta property=\"article:published_time\" content=\"2013-11-27T12:38:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-10-26T16:39:36+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/foresoft.typepad.com\/.a\/6a00e54ee895e98834019b01ba2f93970b-pi\" \/>\n<meta name=\"author\" content=\"Kirill Bondar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirill Bondar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/attachmenturl-image-processing-in-documents\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/attachmenturl-image-processing-in-documents\\\/\"},\"author\":{\"name\":\"Kirill Bondar\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/22c4c05bd657513c8b00122fa364c8d2\"},\"headline\":\"Attachment\\\/URL image processing in documents\",\"datePublished\":\"2013-11-27T12:38:47+00:00\",\"dateModified\":\"2015-10-26T16:39:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/attachmenturl-image-processing-in-documents\\\/\"},\"wordCount\":256,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/attachmenturl-image-processing-in-documents\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/foresoft.typepad.com\\\/.a\\\/6a00e54ee895e98834019b01ba2f93970b-pi\",\"articleSection\":[\"What's New\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/attachmenturl-image-processing-in-documents\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/attachmenturl-image-processing-in-documents\\\/\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/attachmenturl-image-processing-in-documents\\\/\",\"name\":\"Attachment\\\/URL image processing in documents - TeamDesk Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/attachmenturl-image-processing-in-documents\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/attachmenturl-image-processing-in-documents\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/foresoft.typepad.com\\\/.a\\\/6a00e54ee895e98834019b01ba2f93970b-pi\",\"datePublished\":\"2013-11-27T12:38:47+00:00\",\"dateModified\":\"2015-10-26T16:39:36+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/22c4c05bd657513c8b00122fa364c8d2\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/attachmenturl-image-processing-in-documents\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/attachmenturl-image-processing-in-documents\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/attachmenturl-image-processing-in-documents\\\/#primaryimage\",\"url\":\"http:\\\/\\\/foresoft.typepad.com\\\/.a\\\/6a00e54ee895e98834019b01ba2f93970b-pi\",\"contentUrl\":\"http:\\\/\\\/foresoft.typepad.com\\\/.a\\\/6a00e54ee895e98834019b01ba2f93970b-pi\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/whats-new\\\/attachmenturl-image-processing-in-documents\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Attachment\\\/URL image processing in documents\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/\",\"name\":\"TeamDesk Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/22c4c05bd657513c8b00122fa364c8d2\",\"name\":\"Kirill Bondar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g\",\"caption\":\"Kirill Bondar\"},\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/author\\\/kirill-bondar\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Attachment\/URL image processing in documents - TeamDesk Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/","og_locale":"en_US","og_type":"article","og_title":"Attachment\/URL image processing in documents - TeamDesk Blog","og_description":"We are now embedding images into document when generating it from TeamDesk. While ago, we\u2019ve added settings for specifying thumbnail size for attachment columns. Now documents respect these settings and downscale images accordingly. Images from URL columns and formulas are embedded in a full scale by default. To override this behavior you can add #ps [&hellip;]","og_url":"https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/","og_site_name":"TeamDesk Blog","article_published_time":"2013-11-27T12:38:47+00:00","article_modified_time":"2015-10-26T16:39:36+00:00","og_image":[{"url":"http:\/\/foresoft.typepad.com\/.a\/6a00e54ee895e98834019b01ba2f93970b-pi","type":"","width":"","height":""}],"author":"Kirill Bondar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirill Bondar","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/#article","isPartOf":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/"},"author":{"name":"Kirill Bondar","@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/22c4c05bd657513c8b00122fa364c8d2"},"headline":"Attachment\/URL image processing in documents","datePublished":"2013-11-27T12:38:47+00:00","dateModified":"2015-10-26T16:39:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/"},"wordCount":256,"commentCount":0,"image":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/#primaryimage"},"thumbnailUrl":"http:\/\/foresoft.typepad.com\/.a\/6a00e54ee895e98834019b01ba2f93970b-pi","articleSection":["What's New"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/","url":"https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/","name":"Attachment\/URL image processing in documents - TeamDesk Blog","isPartOf":{"@id":"https:\/\/www.teamdesk.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/#primaryimage"},"image":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/#primaryimage"},"thumbnailUrl":"http:\/\/foresoft.typepad.com\/.a\/6a00e54ee895e98834019b01ba2f93970b-pi","datePublished":"2013-11-27T12:38:47+00:00","dateModified":"2015-10-26T16:39:36+00:00","author":{"@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/22c4c05bd657513c8b00122fa364c8d2"},"breadcrumb":{"@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/#primaryimage","url":"http:\/\/foresoft.typepad.com\/.a\/6a00e54ee895e98834019b01ba2f93970b-pi","contentUrl":"http:\/\/foresoft.typepad.com\/.a\/6a00e54ee895e98834019b01ba2f93970b-pi"},{"@type":"BreadcrumbList","@id":"https:\/\/www.teamdesk.net\/blog\/whats-new\/attachmenturl-image-processing-in-documents\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.teamdesk.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Attachment\/URL image processing in documents"}]},{"@type":"WebSite","@id":"https:\/\/www.teamdesk.net\/blog\/#website","url":"https:\/\/www.teamdesk.net\/blog\/","name":"TeamDesk Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.teamdesk.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/22c4c05bd657513c8b00122fa364c8d2","name":"Kirill Bondar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dc5bc844095b5753ccc73c589c028bf16615674f289668146bbd59205a08a52d?s=96&d=mm&r=g","caption":"Kirill Bondar"},"url":"https:\/\/www.teamdesk.net\/blog\/author\/kirill-bondar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":2,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"predecessor-version":[{"id":354,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/32\/revisions\/354"}],"wp:attachment":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/tags?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}