{"id":52912,"date":"2016-06-28T10:37:03","date_gmt":"2016-06-28T10:37:03","guid":{"rendered":"http:\/\/webkul.com\/blog\/?p=52912"},"modified":"2016-07-15T11:16:54","modified_gmt":"2016-07-15T11:16:54","slug":"create-custom-pdf-prestashop","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/","title":{"rendered":"Custom PDF in prestashop using TCPDF library"},"content":{"rendered":"<div id=\"attachment_54596\" style=\"width: 835px\" class=\"wp-caption alignnone\"><img decoding=\"async\" aria-describedby=\"caption-attachment-54596\" class=\"size-full wp-image-54596\" src=\"http:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/Prestashop-Code-Snippet.png\" alt=\"Custom PDF\" width=\"825\" height=\"260\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/Prestashop-Code-Snippet.png 825w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/Prestashop-Code-Snippet-250x79.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/Prestashop-Code-Snippet-300x95.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/Prestashop-Code-Snippet-768x242.png 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" loading=\"lazy\" \/><p id=\"caption-attachment-54596\" class=\"wp-caption-text\">Custom PDF<\/p><\/div>\n<p>Create custom PDF in prestashop using prestashop library which they have used to render PDF templates like Invoice, Delivery slip and others.<\/p>\n<p>Right, now there is no such way to create your own PDF documented file in prestashop\u00a0because prestashop has created predefined templates which they render whenever it calls. Even you can not easily edit that templates with help of\u00a0third party modules. If you need to edit that template you have to edit in core files of prestashop.<\/p>\n<p>Lets see what is the process or classes which will be needed when you create your own custom PDF document in prestashop.<\/p>\n<p>Prestashop is using TCPDF library to render all the pdf content. For information about tcpdf, you can check tcpdf official website. They have used many examples to render PDF in php. Visit <a href=\"http:\/\/www.tcpdf.org\/examples.php\">tcpdf<\/a>\u00a0. But prestashop has extended this library and customized this library accordingly and created a class PDFGenerator. This class have various methods to create content like footer content, header content, body content and others.<\/p>\n<p>Lets start with code step by step.<\/p>\n<p><strong>Step : 1)<\/strong> If you want to create custom PDF document then you need to extend HTMLTemplate class in your own class.<\/p>\n<p>In this class, you can see\u00a0three abstract method defined, which you need to use in your own custom class, if you don&#8217;t use them, then it will throw error.<\/p>\n<ul>\n<li>abstract public function <strong>getContent<\/strong>()<\/li>\n<li>abstract public function <strong>getFilename<\/strong>()<\/li>\n<li>abstract public function <strong>getBulkFilename<\/strong>()<\/li>\n<\/ul>\n<p><strong>Step : 2)<\/strong> After defining all three method in your own class, you can use other methods which are defined in HTMLTemplate, like<\/p>\n<p><strong>getHeader()<\/strong> for setting header content,<\/p>\n<p><strong>getFooter()<\/strong> for setting footer content,<\/p>\n<p><strong>getContent()<\/strong> for setting main content of the body,<\/p>\n<p><strong>Step : 3)<\/strong> Now, you have all the content in your own methods. Now you need to put content on tpl files.<\/p>\n<p>Lets take an example to explain, how to put content on tpl file.<\/p>\n<pre class=\"brush:php\">public function getHeader()\r\n{\r\n     \/\/---------------------------------------------------\r\n     $this-&gt;context-&gt;smarty-&gt;assign(array(\r\n         'header' =&gt; self::l('Invoice'),\r\n         )\r\n     );\r\n     return $this-&gt;context-&gt;smarty-&gt;fetch($this-&gt;getTemplate('sellerinvoice_header'));\r\n}<\/pre>\n<p>we have getHeader(), function in our custom class. we have assign Invoice text in header variable which will be used in .tpl file. In last line, we are returning the tpl file using fetch method of smarty.\u00a0getTemplate() is a custom function used to set path to tpl file. By this way, we can set the content on tpl file.<\/p>\n<p><strong>Step : 4)<\/strong> We have set the content in our header, footer and content. Now we need to render our PDF document by using PDFGenerator class.<\/p>\n<p>In PDFGenerator, there are various methods which used to create the content, write the content then render the content.<\/p>\n<ul>\n<li><strong>writePage<\/strong>() for writing the pdf file.<\/li>\n<li><strong>createHeader<\/strong>() for creating the header content.<\/li>\n<li><strong>createFooter<\/strong>() for creating the footer\u00a0content.<\/li>\n<li><strong>createContent<\/strong>() for creating the main\u00a0body\u00a0content.<\/li>\n<li><strong>setFontForLang<\/strong>() for setting the font language. If you don&#8217;t do this, then it will create some issue while rendering the content like missing special characters, not supported currency symbol n others.<\/li>\n<\/ul>\n<p>These are the steps which will help you to create your own PDF file in prestashop.<\/p>\n<p><strong>Example code &#8211;<\/strong><\/p>\n<pre class=\"brush:php\">$orientation = 'P';   \/\/ p for portrait view\r\n$file_attachement = array();\r\n$this-&gt;pdf_renderer = new PDFGenerator((bool) Configuration::get('PS_PDF_USE_CACHE'), $orientation);\r\n$obj_seller = new SellerInvoice();  \/\/ custom class\r\n$this-&gt;pdf_renderer-&gt;setFontForLang(Context::getContext()-&gt;language-&gt;iso_code); \/\/ setting lang\r\n$this-&gt;pdf_renderer-&gt;createHeader($obj_seller-&gt;getHeader()); \/\/ creating header content\r\n$this-&gt;pdf_renderer-&gt;createFooter($obj_seller-&gt;getFooter()); \/\/ creating footer content\r\n$this-&gt;pdf_renderer-&gt;createContent($obj_seller-&gt;getContent()); \/\/ creating body content\r\n$this-&gt;pdf_renderer-&gt;writePage(); \/\/ writing pdf page\r\n$file_attachement['content'] = $this-&gt;pdf_renderer-&gt;render($obj_seller-&gt;getFilename(), false);\r\n$file_attachement['name'] = $obj_seller-&gt;getFilename(); \/\/ getting pdf file name\r\n$file_attachement['invoice']['mime'] = 'application\/pdf';\r\n$file_attachement['mime'] = 'application\/pdf';\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Create custom PDF in prestashop using prestashop library which they have used to render PDF templates like Invoice, Delivery slip and others. Right, now there is no such way to create your own PDF documented file in prestashop\u00a0because prestashop has created predefined templates which they render whenever it calls. Even you can not easily edit <a href=\"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":81,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[209],"tags":[353,3357,3358,2635,3356,2065,3359],"class_list":["post-52912","post","type-post","status-publish","format-standard","hentry","category-prestashop","tag-custom","tag-delivery-slip","tag-document","tag-invoice","tag-pdf","tag-prestashop","tag-tcpdf"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Custom PDF in prestashop using TCPDF library - Webkul Blog<\/title>\n<meta name=\"description\" content=\"Custom PDF Create custom PDF in prestashop using prestashop library which they have used to render PDF templates like Invoice, Delivery slip and others.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Custom PDF in prestashop using TCPDF library - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Custom PDF Create custom PDF in prestashop using prestashop library which they have used to render PDF templates like Invoice, Delivery slip and others.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-28T10:37:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-07-15T11:16:54+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/webkul.com\/blog\/wp-content\/uploads\/2016\/06\/Prestashop-Code-Snippet.png\" \/>\n<meta name=\"author\" content=\"Deepak\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Deepak\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/\"},\"author\":{\"name\":\"Deepak\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/06a72f75a5d335e9751297fb9839ef68\"},\"headline\":\"Custom PDF in prestashop using TCPDF library\",\"datePublished\":\"2016-06-28T10:37:03+00:00\",\"dateModified\":\"2016-07-15T11:16:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/\"},\"wordCount\":502,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/webkul.com\/blog\/wp-content\/uploads\/2016\/06\/Prestashop-Code-Snippet.png\",\"keywords\":[\"Custom\",\"delivery slip\",\"document\",\"invoice\",\"PDF\",\"prestashop\",\"tcpdf\"],\"articleSection\":[\"prestashop\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/\",\"url\":\"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/\",\"name\":\"Custom PDF in prestashop using TCPDF library - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/webkul.com\/blog\/wp-content\/uploads\/2016\/06\/Prestashop-Code-Snippet.png\",\"datePublished\":\"2016-06-28T10:37:03+00:00\",\"dateModified\":\"2016-07-15T11:16:54+00:00\",\"description\":\"Custom PDF Create custom PDF in prestashop using prestashop library which they have used to render PDF templates like Invoice, Delivery slip and others.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/#primaryimage\",\"url\":\"http:\/\/webkul.com\/blog\/wp-content\/uploads\/2016\/06\/Prestashop-Code-Snippet.png\",\"contentUrl\":\"http:\/\/webkul.com\/blog\/wp-content\/uploads\/2016\/06\/Prestashop-Code-Snippet.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Custom PDF in prestashop using TCPDF library\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/06a72f75a5d335e9751297fb9839ef68\",\"name\":\"Deepak\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/067dbf448c072fa8c6cb14b2e26949dc29c46c534e586b915b56f39c95cb2b95?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/067dbf448c072fa8c6cb14b2e26949dc29c46c534e586b915b56f39c95cb2b95?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Deepak\"},\"description\":\"I love the web. Coding is my passion and love the learn new technologies.\",\"url\":\"https:\/\/webkul.com\/blog\/author\/deepak037\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Custom PDF in prestashop using TCPDF library - Webkul Blog","description":"Custom PDF Create custom PDF in prestashop using prestashop library which they have used to render PDF templates like Invoice, Delivery slip and others.","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:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/","og_locale":"en_US","og_type":"article","og_title":"Custom PDF in prestashop using TCPDF library - Webkul Blog","og_description":"Custom PDF Create custom PDF in prestashop using prestashop library which they have used to render PDF templates like Invoice, Delivery slip and others.","og_url":"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2016-06-28T10:37:03+00:00","article_modified_time":"2016-07-15T11:16:54+00:00","og_image":[{"url":"http:\/\/webkul.com\/blog\/wp-content\/uploads\/2016\/06\/Prestashop-Code-Snippet.png","type":"","width":"","height":""}],"author":"Deepak","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Deepak","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/"},"author":{"name":"Deepak","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/06a72f75a5d335e9751297fb9839ef68"},"headline":"Custom PDF in prestashop using TCPDF library","datePublished":"2016-06-28T10:37:03+00:00","dateModified":"2016-07-15T11:16:54+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/"},"wordCount":502,"commentCount":2,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/#primaryimage"},"thumbnailUrl":"http:\/\/webkul.com\/blog\/wp-content\/uploads\/2016\/06\/Prestashop-Code-Snippet.png","keywords":["Custom","delivery slip","document","invoice","PDF","prestashop","tcpdf"],"articleSection":["prestashop"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/","url":"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/","name":"Custom PDF in prestashop using TCPDF library - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/#primaryimage"},"thumbnailUrl":"http:\/\/webkul.com\/blog\/wp-content\/uploads\/2016\/06\/Prestashop-Code-Snippet.png","datePublished":"2016-06-28T10:37:03+00:00","dateModified":"2016-07-15T11:16:54+00:00","description":"Custom PDF Create custom PDF in prestashop using prestashop library which they have used to render PDF templates like Invoice, Delivery slip and others.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/#primaryimage","url":"http:\/\/webkul.com\/blog\/wp-content\/uploads\/2016\/06\/Prestashop-Code-Snippet.png","contentUrl":"http:\/\/webkul.com\/blog\/wp-content\/uploads\/2016\/06\/Prestashop-Code-Snippet.png"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/create-custom-pdf-prestashop\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Custom PDF in prestashop using TCPDF library"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/06a72f75a5d335e9751297fb9839ef68","name":"Deepak","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/067dbf448c072fa8c6cb14b2e26949dc29c46c534e586b915b56f39c95cb2b95?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/067dbf448c072fa8c6cb14b2e26949dc29c46c534e586b915b56f39c95cb2b95?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Deepak"},"description":"I love the web. Coding is my passion and love the learn new technologies.","url":"https:\/\/webkul.com\/blog\/author\/deepak037\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/52912","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/81"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=52912"}],"version-history":[{"count":8,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/52912\/revisions"}],"predecessor-version":[{"id":54598,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/52912\/revisions\/54598"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=52912"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=52912"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=52912"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}