{"id":6355,"date":"2012-08-24T17:32:44","date_gmt":"2012-08-24T12:02:44","guid":{"rendered":"https:\/\/tothenewone.online\/blog\/?p=6355"},"modified":"2026-10-27T12:25:17","modified_gmt":"2026-10-27T06:55:17","slug":"using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs","status":"publish","type":"post","link":"https:\/\/tothenewone.online\/blog\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\/","title":{"rendered":"Using Data URLs for embedding images in Flying Saucer generated PDFs"},"content":{"rendered":"<p>We extensively use Flying Saucer to generate PDFs from GSPs in our grails applications. However, there is always the issue of embedding images from within the application because the URLs are usually relative to the environment and as such, embedding them in PDFs with a URL in the src attribute is cumbersome.<\/p>\n<p>To get around this, we decided to write our own implementation of the ReplacedElementFactory taking some help from this excellent <a href=\"https:\/\/gist.github.com\/915348\" target=\"_blank\" rel=\"noopener\">snippets of code<\/a>. However, we didn&#8217;t find a need to go with our custom implementation of Base64 encoding and as such, we ended up using the <a href=\"http:\/\/grepcode.com\/file\/repository.grepcode.com\/java\/root\/jdk\/openjdk\/6-b14\/sun\/misc\/BASE64Decoder.java\">sun.<\/a>misc.BASE64Decoder. The resulting class looked like this :<\/p>\n<p>[java]<\/p>\n<p>import com.lowagie.text.BadElementException<br \/>\nimport com.lowagie.text.Image<br \/>\nimport org.w3c.dom.Element<br \/>\nimport org.xhtmlrenderer.extend.FSImage<br \/>\nimport org.xhtmlrenderer.extend.ReplacedElement<br \/>\nimport org.xhtmlrenderer.extend.ReplacedElementFactory<br \/>\nimport org.xhtmlrenderer.extend.UserAgentCallback<br \/>\nimport org.xhtmlrenderer.layout.LayoutContext<br \/>\nimport org.xhtmlrenderer.pdf.ITextFSImage<br \/>\nimport org.xhtmlrenderer.pdf.ITextImageElement<br \/>\nimport org.xhtmlrenderer.render.BlockBox<br \/>\nimport org.xhtmlrenderer.simple.extend.FormSubmissionListener<\/p>\n<p>public class B64ImgReplacedElementFactory implements ReplacedElementFactory {<\/p>\n<p>public ReplacedElement createReplacedElement(LayoutContext c, BlockBox box, UserAgentCallback uac, int cssWidth, int cssHeight) {<br \/>\nElement e = box.getElement();<br \/>\nif (e == null) {<br \/>\nreturn null;<br \/>\n}<br \/>\nString nodeName = e.getNodeName();<br \/>\nif (nodeName.equals(&#8220;img&#8221;)) {<br \/>\nString attribute = e.getAttribute(&#8220;src&#8221;);<br \/>\nFSImage fsImage;<br \/>\ntry {<br \/>\nfsImage = buildImage(attribute, uac);<br \/>\n} catch (BadElementException e1) {<br \/>\nfsImage = null;<br \/>\n} catch (IOException e1) {<br \/>\nfsImage = null;<br \/>\n}<br \/>\nif (fsImage != null) {<br \/>\nif (cssWidth != -1 || cssHeight != -1) {<br \/>\nfsImage.scale(cssWidth, cssHeight);<br \/>\n}<br \/>\nreturn new ITextImageElement(fsImage);<br \/>\n}<br \/>\n}<br \/>\nreturn null;<br \/>\n}<\/p>\n<p>protected FSImage buildImage(String srcAttr, UserAgentCallback uac) throws IOException, BadElementException {<br \/>\nFSImage fsImage;<br \/>\nif (srcAttr.startsWith(&#8220;data:image\/&#8221;)) {<br \/>\nString b64encoded = srcAttr.substring(srcAttr.indexOf(&#8220;base64,&#8221;) + &#8220;base64,&#8221;.length(), srcAttr.length());<br \/>\nbyte[] decodedBytes = new sun.misc.BASE64Decoder().decodeBuffer(b64encoded);<br \/>\nfsImage = new ITextFSImage(Image.getInstance(decodedBytes));<br \/>\n} else {<br \/>\nfsImage = uac.getImageResource(srcAttr).getImage();<br \/>\n}<br \/>\nreturn fsImage;<br \/>\n}<\/p>\n<p>public void remove(Element e) {<br \/>\n}<\/p>\n<p>public void reset() {<br \/>\n}<\/p>\n<p>@Override<br \/>\npublic void setFormSubmissionListener(FormSubmissionListener listener) {<br \/>\n}<br \/>\n}<br \/>\n[\/java]<\/p>\n<p>Now, in the code where we call the Renderer, we used :<\/p>\n<pre>[java]\r\n byte[] generatePdf(String content) {\r\n        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\r\n        byte[] bytes = null\r\n        ITextRenderer renderer = new ITextRenderer();\r\n        SharedContext sharedContext = renderer.getSharedContext();\r\n        sharedContext.setPrint(true);\r\n        sharedContext.setInteractive(false);\r\n        sharedContext.setReplacedElementFactory(new B64ImgReplacedElementFactory());\r\n        sharedContext.getTextRenderer().setSmoothingThreshold(0);\r\n        try {\r\n            renderer.setDocumentFromString(content);\r\n            renderer.layout();\r\n            renderer.createPDF(byteArrayOutputStream);\r\n            bytes = byteArrayOutputStream.toByteArray()\r\n        }\r\n        catch (Throwable e) {\r\n            log.error(\"Error while generating pdf ${e.message}\", e)\r\n        }\r\n        return bytes\r\n    }\r\n[\/java]\r\n<\/pre>\n<p>Now, we can embed images in the form of data URLs in our GSPs using base64 encoded version of the image bytes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We extensively use Flying Saucer to generate PDFs from GSPs in our grails applications. However, there is always the issue of embedding images from within the application because the URLs are usually relative to the environment and as such, embedding them in PDFs with a URL in the src attribute is cumbersome. To get around [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":160,"footnotes":""},"categories":[7],"tags":[880,879,292],"class_list":["post-6355","post","type-post","status-publish","format-standard","hentry","category-grails","tag-data-url-in-images-with-itext","tag-flying-saucer-pdf","tag-pdf"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"We extensively use Flying Saucer to generate PDFs from GSPs in our grails applications. However, there is always the issue of embedding images from within the application because the URLs are usually relative to the environment and as such, embedding them in PDFs with a URL in the src attribute is cumbersome. To get around\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Vivek Krishna\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/tothenewone.online\/blog\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Using Data URLs for embedding images in Flying Saucer generated PDFs | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"We extensively use Flying Saucer to generate PDFs from GSPs in our grails applications. However, there is always the issue of embedding images from within the application because the URLs are usually relative to the environment and as such, embedding them in PDFs with a URL in the src attribute is cumbersome. To get around\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/tothenewone.online\/blog\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/tothenewone.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/tothenewone.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Using Data URLs for embedding images in Flying Saucer generated PDFs | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"We extensively use Flying Saucer to generate PDFs from GSPs in our grails applications. However, there is always the issue of embedding images from within the application because the URLs are usually relative to the environment and as such, embedding them in PDFs with a URL in the src attribute is cumbersome. To get around\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/tothenewone.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\\\/#article\",\"name\":\"Using Data URLs for embedding images in Flying Saucer generated PDFs | TO THE NEW Blog\",\"headline\":\"Using Data URLs for embedding images in Flying Saucer generated PDFs\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2012-08-24T17:32:44+05:30\",\"dateModified\":\"2026-10-27T12:25:17+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":7,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\\\/#webpage\"},\"articleSection\":\"Grails, data url in images with itext, flying saucer pdf, pdf\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"position\":2,\"name\":\"Grails\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\\\/#listItem\",\"name\":\"Using Data URLs for embedding images in Flying Saucer generated PDFs\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\\\/#listItem\",\"position\":3,\"name\":\"Using Data URLs for embedding images in Flying Saucer generated PDFs\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek\\\/\",\"name\":\"Vivek Krishna\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/07dba643a97b00215bacf46343f18d6cb7ab45f777264e13c22deb54f2cc830b?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Vivek Krishna\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\\\/\",\"name\":\"Using Data URLs for embedding images in Flying Saucer generated PDFs | TO THE NEW Blog\",\"description\":\"We extensively use Flying Saucer to generate PDFs from GSPs in our grails applications. However, there is always the issue of embedding images from within the application because the URLs are usually relative to the environment and as such, embedding them in PDFs with a URL in the src attribute is cumbersome. To get around\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek\\\/#author\"},\"datePublished\":\"2012-08-24T17:32:44+05:30\",\"dateModified\":\"2026-10-27T12:25:17+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Using Data URLs for embedding images in Flying Saucer generated PDFs | TO THE NEW Blog","description":"We extensively use Flying Saucer to generate PDFs from GSPs in our grails applications. However, there is always the issue of embedding images from within the application because the URLs are usually relative to the environment and as such, embedding them in PDFs with a URL in the src attribute is cumbersome. To get around","canonical_url":"https:\/\/tothenewone.online\/blog\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tothenewone.online\/blog\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\/#article","name":"Using Data URLs for embedding images in Flying Saucer generated PDFs | TO THE NEW Blog","headline":"Using Data URLs for embedding images in Flying Saucer generated PDFs","author":{"@id":"https:\/\/tothenewone.online\/blog\/author\/vivek\/#author"},"publisher":{"@id":"https:\/\/tothenewone.online\/blog\/#organization"},"datePublished":"2012-08-24T17:32:44+05:30","dateModified":"2026-10-27T12:25:17+05:30","inLanguage":"en-US","commentCount":7,"mainEntityOfPage":{"@id":"https:\/\/tothenewone.online\/blog\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\/#webpage"},"isPartOf":{"@id":"https:\/\/tothenewone.online\/blog\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\/#webpage"},"articleSection":"Grails, data url in images with itext, flying saucer pdf, pdf"},{"@type":"BreadcrumbList","@id":"https:\/\/tothenewone.online\/blog\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/tothenewone.online\/blog#listItem","position":1,"name":"Home","item":"https:\/\/tothenewone.online\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewone.online\/blog\/category\/grails\/#listItem","name":"Grails"}},{"@type":"ListItem","@id":"https:\/\/tothenewone.online\/blog\/category\/grails\/#listItem","position":2,"name":"Grails","item":"https:\/\/tothenewone.online\/blog\/category\/grails\/","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewone.online\/blog\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\/#listItem","name":"Using Data URLs for embedding images in Flying Saucer generated PDFs"},"previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewone.online\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/tothenewone.online\/blog\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\/#listItem","position":3,"name":"Using Data URLs for embedding images in Flying Saucer generated PDFs","previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewone.online\/blog\/category\/grails\/#listItem","name":"Grails"}}]},{"@type":"Organization","@id":"https:\/\/tothenewone.online\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/tothenewone.online\/blog\/"},{"@type":"Person","@id":"https:\/\/tothenewone.online\/blog\/author\/vivek\/#author","url":"https:\/\/tothenewone.online\/blog\/author\/vivek\/","name":"Vivek Krishna","image":{"@type":"ImageObject","@id":"https:\/\/tothenewone.online\/blog\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/07dba643a97b00215bacf46343f18d6cb7ab45f777264e13c22deb54f2cc830b?s=96&d=mm&r=g","width":96,"height":96,"caption":"Vivek Krishna"}},{"@type":"WebPage","@id":"https:\/\/tothenewone.online\/blog\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\/#webpage","url":"https:\/\/tothenewone.online\/blog\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\/","name":"Using Data URLs for embedding images in Flying Saucer generated PDFs | TO THE NEW Blog","description":"We extensively use Flying Saucer to generate PDFs from GSPs in our grails applications. However, there is always the issue of embedding images from within the application because the URLs are usually relative to the environment and as such, embedding them in PDFs with a URL in the src attribute is cumbersome. To get around","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/tothenewone.online\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/tothenewone.online\/blog\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\/#breadcrumblist"},"author":{"@id":"https:\/\/tothenewone.online\/blog\/author\/vivek\/#author"},"creator":{"@id":"https:\/\/tothenewone.online\/blog\/author\/vivek\/#author"},"datePublished":"2012-08-24T17:32:44+05:30","dateModified":"2026-10-27T12:25:17+05:30"},{"@type":"WebSite","@id":"https:\/\/tothenewone.online\/blog\/#website","url":"https:\/\/tothenewone.online\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/tothenewone.online\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Using Data URLs for embedding images in Flying Saucer generated PDFs | TO THE NEW Blog","og:description":"We extensively use Flying Saucer to generate PDFs from GSPs in our grails applications. However, there is always the issue of embedding images from within the application because the URLs are usually relative to the environment and as such, embedding them in PDFs with a URL in the src attribute is cumbersome. To get around","og:url":"https:\/\/tothenewone.online\/blog\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\/","og:image":"https:\/\/tothenewone.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/tothenewone.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Using Data URLs for embedding images in Flying Saucer generated PDFs | TO THE NEW Blog","twitter:description":"We extensively use Flying Saucer to generate PDFs from GSPs in our grails applications. However, there is always the issue of embedding images from within the application because the URLs are usually relative to the environment and as such, embedding them in PDFs with a URL in the src attribute is cumbersome. To get around","twitter:image":"https:\/\/tothenewone.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"6355","title":null,"description":null,"keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"limit_modified_date":false,"created":"2021-04-29 13:16:15","updated":"2026-10-27 06:55:18","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewone.online\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewone.online\/blog\/category\/grails\/\" title=\"Grails\">Grails<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tUsing Data URLs for embedding images in Flying Saucer generated PDFs\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/tothenewone.online\/blog"},{"label":"Grails","link":"https:\/\/tothenewone.online\/blog\/category\/grails\/"},{"label":"Using Data URLs for embedding images in Flying Saucer generated PDFs","link":"https:\/\/tothenewone.online\/blog\/using-data-urls-for-embedding-images-in-flying-saucer-generated-pdfs\/"}],"_links":{"self":[{"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/posts\/6355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/comments?post=6355"}],"version-history":[{"count":1,"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/posts\/6355\/revisions"}],"predecessor-version":[{"id":84068,"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/posts\/6355\/revisions\/84068"}],"wp:attachment":[{"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/media?parent=6355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/categories?post=6355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tothenewone.online\/blog\/wp-json\/wp\/v2\/tags?post=6355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}