{"id":4754,"date":"2021-11-11T08:00:24","date_gmt":"2021-11-11T08:00:24","guid":{"rendered":"https:\/\/www.codexworld.com\/?p=4754"},"modified":"2025-08-26T14:39:36","modified_gmt":"2025-08-26T14:39:36","slug":"extract-text-from-pdf-using-php","status":"publish","type":"post","link":"https:\/\/www.codexworld.com\/extract-text-from-pdf-using-php\/","title":{"rendered":"Extract Text from PDF using PHP"},"content":{"rendered":"<p>The PDF (Portable Document Format) file is used to save text\/image data for offline use. Sometimes PDF files are used to display text\/graphics content on the web page for online use. Generally, a web viewer is used to embed PDF files in the browser. When a PDF file is embedded on the web page, the text\/graphics content is not appended to the HTML page. Since the PDF content is not rendered on the web page, it causes a negative impact on SEO. To overcome this issue, you can <b>extract text content from PDF<\/b> and include it on the web page.<\/p>\n<p>The PDF Parser library is very helpful for extracting elements from PDF files using PHP. This PHP library parses PDF files and extracts text content from all the pages. The object, headers, metadata, and text can be parsed from the PDF file using PHP. This tutorial will show you how to <b>extract text from PDF files using PHP<\/b>.<\/p>\n<p>In this example script, we will use the <b>PDF Parser library<\/b> to extract text from PDF with PHP. Also, we will show how you can upload PDF files and extract text data on the fly using PHP.<\/p>\n<h2>Install PDF Parser Library<\/h2>\n<p>Run the following command to install PDF Parser library using composer.<\/p>\n<pre>composer require smalot\/pdfparser<\/pre>\n<p><span class=\"note\">Note that:<\/span> You don&#8217;t need to download the PDF Parser library separately, all the required files are included in the source code. Download the source code if you want to <b>install and use PDF Parser without composer<\/b>.<\/p>\n<p>Include autoloader to load PDF Parser library and helper functions in the PHP script.<\/p>\n<pre><span style=\"color: #007700\">include&nbsp;<\/span><span style=\"color: #DD0000\">'vendor\/autoload.php'<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<h2>Extract Text from PDF<\/h2>\n<p>The following code snippet extracts all the <b>text content from PDF file using PHP<\/b>.<\/p>\n<ul class=\"bullet_disk_list\">\n<li>Initialize and load PDF Parser library.<\/li>\n<li>Specify the source PDF file from where the text content will retrieve.<\/li>\n<li>Parse PDF file using <code>parseFile()<\/code> function of the PDF Parser class.<\/li>\n<li>Extract text from PDF using <code>getText()<\/code> method of the PDF Parser class.<\/li>\n<\/ul>\n<pre><span style=\"color: #FF8000\">\/\/&nbsp;Initialize&nbsp;and&nbsp;load&nbsp;PDF&nbsp;Parser&nbsp;library <br \/><\/span><span style=\"color: #0000BB\">$parser&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;new&nbsp;\\<\/span><span style=\"color: #0000BB\">Smalot<\/span><span style=\"color: #007700\">\\<\/span><span style=\"color: #0000BB\">PdfParser<\/span><span style=\"color: #007700\">\\<\/span><span style=\"color: #0000BB\">Parser<\/span><span style=\"color: #007700\">(); <br \/> <br \/><\/span><span style=\"color: #FF8000\">\/\/&nbsp;Source&nbsp;PDF&nbsp;file&nbsp;to&nbsp;extract&nbsp;text <br \/><\/span><span style=\"color: #0000BB\">$file&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'path-to-file\/Brochure.pdf'<\/span><span style=\"color: #007700\">; <br \/> <br \/><\/span><span style=\"color: #FF8000\">\/\/&nbsp;Parse&nbsp;pdf&nbsp;file&nbsp;using&nbsp;Parser&nbsp;library <br \/><\/span><span style=\"color: #0000BB\">$pdf&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$parser<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">parseFile<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$file<\/span><span style=\"color: #007700\">); <br \/> <br \/><\/span><span style=\"color: #FF8000\">\/\/&nbsp;Extract&nbsp;text&nbsp;from&nbsp;PDF <br \/><\/span><span style=\"color: #0000BB\">$textContent&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$pdf<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">getText<\/span><span style=\"color: #007700\">();<\/span><\/pre>\n<h2>Upload PDF File and Extract Text<\/h2>\n<p>This example code snippet shows you the step-by-step process to upload PDF files and extract the text using PHP.<\/p>\n<p><b>PDF File Upload Form:<\/b><br \/>\nDefine HTML elements for file uploading form.<\/p>\n<pre style=\"color: rgb(95, 94, 78);\"><span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">form<\/span> <span class=\"hljs-attr\">action<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"submit.php\"<\/span> <span class=\"hljs-attr\">method<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"post\"<\/span> <span class=\"hljs-attr\">enctype<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"multipart\/form-data\"<\/span>&gt;<\/span>\r\n    <span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"form-input\"<\/span>&gt;<\/span>\r\n        <span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">label<\/span> <span class=\"hljs-attr\">for<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"pdf_file\"<\/span>&gt;<\/span>PDF File<span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;\/<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">label<\/span>&gt;<\/span>\r\n        <span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">input<\/span> <span class=\"hljs-attr\">type<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"file\"<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"pdf_file\"<\/span> <span class=\"hljs-attr\">placeholder<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"Select a PDF file\"<\/span> <span class=\"hljs-attr\">required<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"\"<\/span>&gt;<\/span>\r\n    <span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;\/<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">div<\/span>&gt;<\/span>\r\n    <span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">input<\/span> <span class=\"hljs-attr\">type<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"submit\"<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"submit\"<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"btn\"<\/span> <span class=\"hljs-attr\">value<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"Extract Text\"<\/span>&gt;<\/span>\r\n<span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;\/<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">form<\/span>&gt;<\/span><\/pre>\n<p>On form submission, the selected file is submitted to the server-side script for process further.<\/p>\n<p><b>Server-side Script (submit.php) to Extract Text from Uploaded PDF:<\/b><br \/>\nThe following code is used to upload the submitted file and extract text from PDF.<\/p>\n<ul class=\"bullet_disk_list\">\n<li>Retrieve file name using <b>$_FILES in PHP<\/b>.<\/li>\n<li>Get file extention using <code>pathinfo()<\/code> function with PATHINFO_EXTENSION filter.<\/li>\n<li>Validate the file to check whether it is a valid PDF file.<\/li>\n<li>Retrieve file path using <code>tmp_name<\/code> in $_FILES.<\/li>\n<li>Parse uploaded PDF file and extract text content using PDF Parser library.<\/li>\n<li>Format text content by replacing the new line (<code>\\n<\/code>) with line break (<span style=\"color: rgb(186, 98, 54);\">&lt;<span style=\"color: rgb(186, 98, 54);\">br<\/span>\/&gt;<\/span>) using <b>nl2br() function in PHP<\/b>.<\/li>\n<\/ul>\n<pre><span style=\"color: #0000BB\">$pdfText&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">''<\/span><span style=\"color: #007700\">; <br \/>if(isset(<\/span><span style=\"color: #0000BB\">$_POST<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'submit'<\/span><span style=\"color: #007700\">])){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;If&nbsp;file&nbsp;is&nbsp;selected <br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #007700\">if(!empty(<\/span><span style=\"color: #0000BB\">$_FILES<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">\"pdf_file\"<\/span><span style=\"color: #007700\">][<\/span><span style=\"color: #DD0000\">\"name\"<\/span><span style=\"color: #007700\">])){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;File&nbsp;upload&nbsp;path <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$fileName&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">basename<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$_FILES<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">\"pdf_file\"<\/span><span style=\"color: #007700\">][<\/span><span style=\"color: #DD0000\">\"name\"<\/span><span style=\"color: #007700\">]); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$fileType&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">pathinfo<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$fileName<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">PATHINFO_EXTENSION<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Allow&nbsp;certain&nbsp;file&nbsp;formats <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$allowTypes&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;array(<\/span><span style=\"color: #DD0000\">'pdf'<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(<\/span><span style=\"color: #0000BB\">in_array<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$fileType<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$allowTypes<\/span><span style=\"color: #007700\">)){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Include&nbsp;autoloader&nbsp;file <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #007700\">include&nbsp;<\/span><span style=\"color: #DD0000\">'vendor\/autoload.php'<\/span><span style=\"color: #007700\">; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Initialize&nbsp;and&nbsp;load&nbsp;PDF&nbsp;Parser&nbsp;library <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$parser&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;new&nbsp;\\<\/span><span style=\"color: #0000BB\">Smalot<\/span><span style=\"color: #007700\">\\<\/span><span style=\"color: #0000BB\">PdfParser<\/span><span style=\"color: #007700\">\\<\/span><span style=\"color: #0000BB\">Parser<\/span><span style=\"color: #007700\">(); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Source&nbsp;PDF&nbsp;file&nbsp;to&nbsp;extract&nbsp;text <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$file&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$_FILES<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">\"pdf_file\"<\/span><span style=\"color: #007700\">][<\/span><span style=\"color: #DD0000\">\"tmp_name\"<\/span><span style=\"color: #007700\">]; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Parse&nbsp;pdf&nbsp;file&nbsp;using&nbsp;Parser&nbsp;library <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$pdf&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$parser<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">parseFile<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$file<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Extract&nbsp;text&nbsp;from&nbsp;PDF <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$text&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$pdf<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">getText<\/span><span style=\"color: #007700\">(); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Add&nbsp;line&nbsp;break <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$pdfText&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">nl2br<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$text<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}else{ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$statusMsg&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;p&gt;Sorry,&nbsp;only&nbsp;PDF&nbsp;file&nbsp;is&nbsp;allowed&nbsp;to&nbsp;upload.&lt;\/p&gt;'<\/span><span style=\"color: #007700\">; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br \/>&nbsp;&nbsp;&nbsp;&nbsp;}else{ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$statusMsg&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;p&gt;Please&nbsp;select&nbsp;a&nbsp;PDF&nbsp;file&nbsp;to&nbsp;extract&nbsp;text.&lt;\/p&gt;'<\/span><span style=\"color: #007700\">; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;} <br \/>} <br \/> <br \/><\/span><span style=\"color: #FF8000\">\/\/&nbsp;Display&nbsp;text&nbsp;content <br \/><\/span><span style=\"color: #007700\">echo&nbsp;<\/span><span style=\"color: #0000BB\">$pdfText<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<h2>Advanced Usage of PDF Parser Library<\/h2>\n<p>You can use this PDF parser library for various needs. Here are some advanced uses to further customize the PDF parser and text output.<\/p>\n<p><b><u>Extract the text of a specific page from PDF:<\/u><\/b><\/p>\n<pre><span style=\"color: #FF8000\">\/\/&nbsp;extract&nbsp;the&nbsp;text&nbsp;of&nbsp;a&nbsp;specific&nbsp;page&nbsp;(in&nbsp;this&nbsp;case&nbsp;the&nbsp;first&nbsp;page) <br \/><\/span><span style=\"color: #0000BB\">$text&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$pdf<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">getPages<\/span><span style=\"color: #007700\">()[<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">]-&gt;<\/span><span style=\"color: #0000BB\">getText<\/span><span style=\"color: #007700\">();<\/span><\/pre>\n<p><b><u>Extract text positions in PDF:<\/u><\/b><br \/>\nTo display text in the same position as the PDF, you can extract the transformation matrix (indexes 0-3) and the x,y position of text objects (indexes 4,5) using the <code>getDataTm()<\/code> method of the PDF Parser class.<\/p>\n<pre><span style=\"color: #0000BB\">$data&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$pdf<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">getPages<\/span><span style=\"color: #007700\">()[<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">]-&gt;<\/span><span style=\"color: #0000BB\">getDataTm<\/span><span style=\"color: #007700\">();<\/span><\/pre>\n<pre style=\"color: rgb(68, 68, 68);\"><span class=\"hljs-attribute\" style=\"font-weight: 700;\">Array<\/span>\r\n(\r\n    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">0<\/span>] =&gt; Array\r\n        (\r\n            [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">0<\/span>] =&gt; Array\r\n                (\r\n                    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">0<\/span>] =&gt; 0.878529\r\n                    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">1<\/span>] =&gt; 0\r\n                    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">2<\/span>] =&gt; 0\r\n                    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">3<\/span>] =&gt; 1\r\n                    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">4<\/span>] =&gt; 325.75\r\n                    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">5<\/span>] =&gt; 670.90\r\n                )\r\n\r\n            [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">1<\/span>] =&gt; Document title\r\n        )\r\n\r\n    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">1<\/span>] =&gt; Array\r\n        (\r\n            [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">0<\/span>] =&gt; Array\r\n                (\r\n                    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">0<\/span>] =&gt; 0.879104\r\n                    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">1<\/span>] =&gt; 0\r\n                    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">2<\/span>] =&gt; 0\r\n                    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">3<\/span>] =&gt; 1\r\n                    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">4<\/span>] =&gt; 80.9\r\n                    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">5<\/span>] =&gt; 573.89\r\n                )\r\n\r\n            [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">1<\/span>] =&gt; Contrary : Lorem Ipsum is simply dummy text of the printing\r\n        )\r\n)<\/pre>\n<p><b><u>Extract the text of a limited amount of pages from PDF:<\/u><\/b><\/p>\n<pre><span style=\"color: #FF8000\">\/\/&nbsp;extract&nbsp;text&nbsp;of&nbsp;a&nbsp;limited&nbsp;amount&nbsp;of&nbsp;pages.&nbsp;here,&nbsp;it&nbsp;will&nbsp;only&nbsp;use&nbsp;the&nbsp;first&nbsp;two&nbsp;pages. <br \/><\/span><span style=\"color: #0000BB\">$text&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$pdf<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">getText<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">2<\/span><span style=\"color: #007700\">);<\/span><\/pre>\n<p><b><u>Extract metadata from PDF:<\/u><\/b><\/p>\n<pre><span style=\"color: #0000BB\">$metaData&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$pdf<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">getDetails<\/span><span style=\"color: #007700\">();&nbsp;<\/span><\/pre>\n<pre style=\"color: rgb(68, 68, 68);\"><span class=\"hljs-attribute\" style=\"font-weight: 700;\">Array<\/span>\r\n(\r\n    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">Title<\/span>] =&gt; Brochure\r\n    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">Producer<\/span>] =&gt; Skia\/PDF m94 Google Docs Renderer\r\n    [<span class=\"hljs-attribute\" style=\"font-weight: 700;\">Pages<\/span>] =&gt; 2\r\n    ...\r\n)<\/pre>\n<p class=\"seeAlso\"><span><\/span><a href=\"https:\/\/www.codexworld.com\/add-watermark-to-existing-pdf-using-php\/\">Add Watermark to Existing PDF using PHP<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The PDF (Portable Document Format) file is used to save text\/image data for offline use. Sometimes PDF files are used to display text\/graphics content on the web page for online use. Generally, a web viewer <\/p>\n","protected":false},"author":1,"featured_media":5628,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4],"tags":[166,383,181,14],"class_list":["post-4754","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-library","tag-parser","tag-pdf","tag-php","cat-4-id","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Extract Text from PDF using PHP - CodexWorld<\/title>\n<meta name=\"description\" content=\"Extract text content from PDF file with PDF Parser library using PHP. Example code snippet to extract text from PDF using PHP. Upload PDF files and extract text data on the fly in PHP.\" \/>\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.codexworld.com\/extract-text-from-pdf-using-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Extract Text from PDF using PHP - CodexWorld\" \/>\n<meta property=\"og:description\" content=\"Extract text content from PDF file with PDF Parser library using PHP. Example code snippet to extract text from PDF using PHP. Upload PDF files and extract text data on the fly in PHP.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codexworld.com\/extract-text-from-pdf-using-php\/\" \/>\n<meta property=\"og:site_name\" content=\"CodexWorld\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:published_time\" content=\"2021-11-11T08:00:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-26T14:39:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2021\/11\/extract-text-from-pdf-using-php-parser-library-codexworld.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"CodexWorld\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codexworldblog\" \/>\n<meta name=\"twitter:site\" content=\"@codexworldweb\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CodexWorld\" \/>\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:\\\/\\\/www.codexworld.com\\\/extract-text-from-pdf-using-php\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/extract-text-from-pdf-using-php\\\/\"},\"author\":{\"name\":\"CodexWorld\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\"},\"headline\":\"Extract Text from PDF using PHP\",\"datePublished\":\"2021-11-11T08:00:24+00:00\",\"dateModified\":\"2025-08-26T14:39:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/extract-text-from-pdf-using-php\\\/\"},\"wordCount\":571,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/extract-text-from-pdf-using-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/extract-text-from-pdf-using-php-parser-library-codexworld.png\",\"keywords\":[\"Library\",\"Parser\",\"PDF\",\"PHP\"],\"articleSection\":[\"PHP\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/extract-text-from-pdf-using-php\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/extract-text-from-pdf-using-php\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/extract-text-from-pdf-using-php\\\/\",\"name\":\"Extract Text from PDF using PHP - CodexWorld\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/extract-text-from-pdf-using-php\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/extract-text-from-pdf-using-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/extract-text-from-pdf-using-php-parser-library-codexworld.png\",\"datePublished\":\"2021-11-11T08:00:24+00:00\",\"dateModified\":\"2025-08-26T14:39:36+00:00\",\"description\":\"Extract text content from PDF file with PDF Parser library using PHP. Example code snippet to extract text from PDF using PHP. Upload PDF files and extract text data on the fly in PHP.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/extract-text-from-pdf-using-php\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/extract-text-from-pdf-using-php\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/extract-text-from-pdf-using-php\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/extract-text-from-pdf-using-php-parser-library-codexworld.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/extract-text-from-pdf-using-php-parser-library-codexworld.png\",\"width\":1920,\"height\":1080,\"caption\":\"extract-text-from-pdf-using-php-parser-library-codexworld\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/extract-text-from-pdf-using-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.codexworld.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Extract Text from PDF using PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"name\":\"CodexWorld\",\"description\":\"Web &amp; Mobile App Development Company\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.codexworld.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\",\"name\":\"CodexWorld\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"width\":200,\"height\":19,\"caption\":\"CodexWorld\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldweb\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/codexworld\",\"https:\\\/\\\/www.youtube.com\\\/codexworld\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\",\"name\":\"CodexWorld\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"caption\":\"CodexWorld\"},\"description\":\"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.\",\"sameAs\":[\"http:\\\/\\\/www.codexworld.com\",\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldblog\"],\"url\":\"https:\\\/\\\/www.codexworld.com\\\/author\\\/nitya192265\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Extract Text from PDF using PHP - CodexWorld","description":"Extract text content from PDF file with PDF Parser library using PHP. Example code snippet to extract text from PDF using PHP. Upload PDF files and extract text data on the fly in PHP.","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.codexworld.com\/extract-text-from-pdf-using-php\/","og_locale":"en_US","og_type":"article","og_title":"Extract Text from PDF using PHP - CodexWorld","og_description":"Extract text content from PDF file with PDF Parser library using PHP. Example code snippet to extract text from PDF using PHP. Upload PDF files and extract text data on the fly in PHP.","og_url":"https:\/\/www.codexworld.com\/extract-text-from-pdf-using-php\/","og_site_name":"CodexWorld","article_publisher":"https:\/\/www.facebook.com\/codexworld","article_author":"https:\/\/www.facebook.com\/codexworld","article_published_time":"2021-11-11T08:00:24+00:00","article_modified_time":"2025-08-26T14:39:36+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2021\/11\/extract-text-from-pdf-using-php-parser-library-codexworld.png","type":"image\/png"}],"author":"CodexWorld","twitter_card":"summary_large_image","twitter_creator":"@codexworldblog","twitter_site":"@codexworldweb","twitter_misc":{"Written by":"CodexWorld","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codexworld.com\/extract-text-from-pdf-using-php\/#article","isPartOf":{"@id":"https:\/\/www.codexworld.com\/extract-text-from-pdf-using-php\/"},"author":{"name":"CodexWorld","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0"},"headline":"Extract Text from PDF using PHP","datePublished":"2021-11-11T08:00:24+00:00","dateModified":"2025-08-26T14:39:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codexworld.com\/extract-text-from-pdf-using-php\/"},"wordCount":571,"commentCount":2,"publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"image":{"@id":"https:\/\/www.codexworld.com\/extract-text-from-pdf-using-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2021\/11\/extract-text-from-pdf-using-php-parser-library-codexworld.png","keywords":["Library","Parser","PDF","PHP"],"articleSection":["PHP"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.codexworld.com\/extract-text-from-pdf-using-php\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.codexworld.com\/extract-text-from-pdf-using-php\/","url":"https:\/\/www.codexworld.com\/extract-text-from-pdf-using-php\/","name":"Extract Text from PDF using PHP - CodexWorld","isPartOf":{"@id":"https:\/\/www.codexworld.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codexworld.com\/extract-text-from-pdf-using-php\/#primaryimage"},"image":{"@id":"https:\/\/www.codexworld.com\/extract-text-from-pdf-using-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2021\/11\/extract-text-from-pdf-using-php-parser-library-codexworld.png","datePublished":"2021-11-11T08:00:24+00:00","dateModified":"2025-08-26T14:39:36+00:00","description":"Extract text content from PDF file with PDF Parser library using PHP. Example code snippet to extract text from PDF using PHP. Upload PDF files and extract text data on the fly in PHP.","breadcrumb":{"@id":"https:\/\/www.codexworld.com\/extract-text-from-pdf-using-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codexworld.com\/extract-text-from-pdf-using-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/extract-text-from-pdf-using-php\/#primaryimage","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2021\/11\/extract-text-from-pdf-using-php-parser-library-codexworld.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2021\/11\/extract-text-from-pdf-using-php-parser-library-codexworld.png","width":1920,"height":1080,"caption":"extract-text-from-pdf-using-php-parser-library-codexworld"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codexworld.com\/extract-text-from-pdf-using-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codexworld.com\/"},{"@type":"ListItem","position":2,"name":"Extract Text from PDF using PHP"}]},{"@type":"WebSite","@id":"https:\/\/www.codexworld.com\/#website","url":"https:\/\/www.codexworld.com\/","name":"CodexWorld","description":"Web &amp; Mobile App Development Company","publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codexworld.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codexworld.com\/#organization","name":"CodexWorld","url":"https:\/\/www.codexworld.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","width":200,"height":19,"caption":"CodexWorld"},"image":{"@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldweb","https:\/\/www.linkedin.com\/company\/codexworld","https:\/\/www.youtube.com\/codexworld"]},{"@type":"Person","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0","name":"CodexWorld","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","caption":"CodexWorld"},"description":"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.","sameAs":["http:\/\/www.codexworld.com","https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldblog"],"url":"https:\/\/www.codexworld.com\/author\/nitya192265\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2021\/11\/extract-text-from-pdf-using-php-parser-library-codexworld.png","jetpack_shortlink":"https:\/\/wp.me\/p6bxIh-1eG","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/4754","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/comments?post=4754"}],"version-history":[{"count":5,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/4754\/revisions"}],"predecessor-version":[{"id":5865,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/4754\/revisions\/5865"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media\/5628"}],"wp:attachment":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media?parent=4754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/categories?post=4754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/tags?post=4754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}