PDF Make Text Searchable or Unsearchable
Related Knowledgebase-Explore Samples
These methods helps to turn PDF and scanned JPG, PNG images into text-searchable PDF. MakeUnSearchable method is doing the opposite: converts PDF document into a “scanned” pdf document is it was printed and then scanned back.
Available Methods
- [POST] /pdf/makesearchable (Scanned PDF to Text Searchable PDF)
- [POST] /pdf/makesearchable (PNG to Text Searchable PDF)
- [POST] /pdf/makesearchable (JPG to Text Searchable PDF)
- [POST] /pdf/makesearchable (TIF to Text Searchable PDF)
- [POST] /pdf/makeunsearchable (PDF to Scanned PDF)
[POST] /pdf/makesearchable (Scanned PDF to Text Searchable PDF)
This method converts scanned PDF documents (where pages are fully or partially made from scanned images) into a text-searchable pdf. It runs OCR and adds an invisible text layer on top of your document that can be used for text search, text indexing etc.
url
required. URL to the source file (PDF, JPG, PNG, TIF, TIFF). Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section. If you are randomly gettingToo Many Requests
orAccess Denied
error for your input url, please try to addcache:
to enable built-in url caching.httpusername
(optional) - http auth user name if required to access sourceurl
.httppassword
(optional) - http auth password if required to access sourceurl
.lang
optional. Sets language for OCR (text from image) to use for scanned PDF, PNG, JPG documents input when extracting text. Default is “eng”. Other languages are also supported:deu
,spa
,chi_sim
,jpn
and many others (full list of supported OCR languages is here. You can also use 2 languages simultaneously like this:eng+deu
orjpn+kor
(any combination).pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.password
optional. Password of PDF file. Must be a String.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
(legacy, now all files are stored at the encrypted cloud storage by default.
Important: you can also encrypt output files and decrypt input files with user-controlled data encryption (strong AES
encryption + custom keys). Click here to learn more.
name
optional. File name for generated output. Must be a String.expiration
(optional). Output link expiration in minutes. Default is60
(i.e. 60 minutes or 1 hour). After this delay generated output file(s) (if any) will be auto-removed from PDF.co temporary files storage. Max allowed expiration period depends on your current subscription plan. To store permanent input files (e.g. re-usable images, pdf, documents), please use PDF.co built-in Files Storage instead.profiles
optional. Must be a String. Use this param to set additional configuration for fine tuning and extra options. Explore PDF.co knowledgebase for profile examples.- Method: POST
- URL: /v1/pdf/makesearchable
Query parameters
No query parameters accepted.
Body payload
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-make-searchable/sample.pdf",
"lang": "eng",
"pages": "",
"name": "result.pdf",
"password": "",
"async": "false",
"encrypt": false,
"profiles": ""
}
Example responses
/pdf/makesearchable (Scanned PDF to Text Searchable PDF)
{
"url": "https://pdf-temp-files.s3.amazonaws.com/a0d52f35504e47148d1771fce875db7b/result.pdf",
"pageCount": 1,
"error": false,
"status": 200,
"name": "result.pdf",
"remainingCredits": 99033681,
"credits": 35
}
Code Snippet
CURL
curl --location --request POST 'https://api.pdf.co/v1/pdf/makesearchable' \
--header 'x-api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-make-searchable/sample.pdf",
"lang": "eng",
"pages": "",
"name": "result.pdf",
"password": "",
"async": "false",
"encrypt": false,
"profiles": ""
}'
[POST] /pdf/makesearchable (PNG to Text Searchable PDF)
This method converts scanned PDF documents (where pages are fully or partially made from scanned images) into a text-searchable pdf. It runs OCR and adds an invisible text layer on top of your document that can be used for text search, text indexing etc.
url
required. URL to the source file (PDF, JPG, PNG, TIF, TIFF). Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section. If you are randomly gettingToo Many Requests
orAccess Denied
error for your input url, please try to addcache:
to enable built-in url caching.httpusername
(optional) - http auth user name if required to access sourceurl
.httppassword
(optional) - http auth password if required to access sourceurl
.lang
optional. Sets language for OCR (text from image) to use for scanned PDF, PNG, JPG documents input when extracting text. Default is “eng”. Other languages are also supported:deu
,spa
,chi_sim
,jpn
and many others (full list of supported OCR languages is here. You can also use 2 languages simultaneously like this:eng+deu
orjpn+kor
(any combination).pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.password
optional. Password of PDF file. Must be a String.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
(legacy, now all files are stored at the encrypted cloud storage by default.
Important: you can also encrypt output files and decrypt input files with user-controlled data encryption (strong AES
encryption + custom keys). Click here to learn more.
name
optional. File name for generated output. Must be a String.expiration
(optional). Output link expiration in minutes. Default is60
(i.e. 60 minutes or 1 hour). After this delay generated output file(s) (if any) will be auto-removed from PDF.co temporary files storage. Max allowed expiration period depends on your current subscription plan. To store permanent input files (e.g. re-usable images, pdf, documents), please use PDF.co built-in Files Storage instead.profiles
optional. Must be a String. Use this param to set additional configuration for fine tuning and extra options. Explore PDF.co knowledgebase for profile examples.- Method: POST
- URL: /v1/pdf/makesearchable
Query parameters
No query parameters accepted.
Body payload
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image1.png",
"lang": "eng",
"pages": "",
"name": "result.pdf",
"password": "",
"async": "false",
"encrypt": false,
"profiles": ""
}
Example responses
/pdf/makesearchable (PNG to Text Searchable PDF)
{
"url": "https://pdf-temp-files.s3.amazonaws.com/cd2613bd41d44e81b3f989bf25c69bf3/result.pdf",
"pageCount": 1,
"error": false,
"status": 200,
"name": "result.pdf",
"remainingCredits": 99078416,
"credits": 35
}
Code Snippet
CURL
curl --location --request POST 'https://api.pdf.co/v1/pdf/makesearchable' \
--header 'x-api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image1.png",
"lang": "eng",
"pages": "",
"name": "result.pdf",
"password": "",
"async": "false",
"encrypt": false,
"profiles": ""
}'
[POST] /pdf/makesearchable (JPG to Text Searchable PDF)
This method converts scanned PDF documents (where pages are fully or partially made from scanned images) into a text-searchable pdf. It runs OCR and adds an invisible text layer on top of your document that can be used for text search, text indexing etc.
url
required. URL to the source file (PDF, JPG, PNG, TIF, TIFF). Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section. If you are randomly gettingToo Many Requests
orAccess Denied
error for your input url, please try to addcache:
to enable built-in url caching.httpusername
(optional) - http auth user name if required to access sourceurl
.httppassword
(optional) - http auth password if required to access sourceurl
.lang
optional. Sets language for OCR (text from image) to use for scanned PDF, PNG, JPG documents input when extracting text. Default is “eng”. Other languages are also supported:deu
,spa
,chi_sim
,jpn
and many others (full list of supported OCR languages is here. You can also use 2 languages simultaneously like this:eng+deu
orjpn+kor
(any combination).pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.password
optional. Password of PDF file. Must be a String.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
(legacy, now all files are stored at the encrypted cloud storage by default.
Important: you can also encrypt output files and decrypt input files with user-controlled data encryption (strong AES
encryption + custom keys). Click here to learn more.
name
optional. File name for generated output. Must be a String.expiration
(optional). Output link expiration in minutes. Default is60
(i.e. 60 minutes or 1 hour). After this delay generated output file(s) (if any) will be auto-removed from PDF.co temporary files storage. Max allowed expiration period depends on your current subscription plan. To store permanent input files (e.g. re-usable images, pdf, documents), please use PDF.co built-in Files Storage instead.profiles
optional. Must be a String. Use this param to set additional configuration for fine tuning and extra options. Explore PDF.co knowledgebase for profile examples.- Method: POST
- URL: /v1/pdf/makesearchable
Query parameters
No query parameters accepted.
Body payload
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image2.jpg",
"lang": "eng",
"pages": "",
"name": "result.pdf",
"password": "",
"async": "false",
"encrypt": false,
"profiles": ""
}
Example responses
/pdf/makesearchable (JPG to Text Searchable PDF)
{
"url": "https://pdf-temp-files.s3.amazonaws.com/26ef98ed86ff4a27a3c840ab7785e25a/result.pdf",
"pageCount": 1,
"error": false,
"status": 200,
"name": "result.pdf",
"remainingCredits": 99078346,
"credits": 35
}
Code Snippet
CURL
curl --location --request POST 'https://api.pdf.co/v1/pdf/makesearchable' \
--header 'x-api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image2.jpg",
"lang": "eng",
"pages": "",
"name": "result.pdf",
"password": "",
"async": "false",
"encrypt": false,
"profiles": ""
}'
[POST] /pdf/makesearchable (TIF to Text Searchable PDF)
This method converts scanned PDF documents (where pages are fully or partially made from scanned images) into a text-searchable pdf. It runs OCR and adds an invisible text layer on top of your document that can be used for text search, text indexing etc.
url
required. URL to the source file (PDF, JPG, PNG, TIF, TIFF).. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section. If you are randomly gettingToo Many Requests
orAccess Denied
error for your input url, please try to addcache:
to enable built-in url caching.httpusername
(optional) - http auth user name if required to access sourceurl
.httppassword
(optional) - http auth password if required to access sourceurl
.lang
optional. Sets language for OCR (text from image) to use for scanned PDF, PNG, JPG documents input when extracting text. Default is “eng”. Other languages are also supported:deu
,spa
,chi_sim
,jpn
and many others (full list of supported OCR languages is here. You can also use 2 languages simultaneously like this:eng+deu
orjpn+kor
(any combination).pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.password
optional. Password of PDF file. Must be a String.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
(legacy, now all files are stored at the encrypted cloud storage by default.
Important: you can also encrypt output files and decrypt input files with user-controlled data encryption (strong AES
encryption + custom keys). Click here to learn more.
name
optional. File name for generated output. Must be a String.expiration
(optional). Output link expiration in minutes. Default is60
(i.e. 60 minutes or 1 hour). After this delay generated output file(s) (if any) will be auto-removed from PDF.co temporary files storage. Max allowed expiration period depends on your current subscription plan. To store permanent input files (e.g. re-usable images, pdf, documents), please use PDF.co built-in Files Storage instead.profiles
optional. Must be a String. Use this param to set additional configuration for fine tuning and extra options. Explore PDF.co knowledgebase for profile examples.- Method: POST
- URL: /v1/pdf/makesearchable
Query parameters
No query parameters accepted.
Body payload
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image2.jpg",
"lang": "eng",
"pages": "",
"name": "result.pdf",
"password": "",
"async": "false",
"encrypt": false,
"profiles": ""
}
Example responses
/pdf/makesearchable (TIF to Text Searchable PDF)
{
"url": "https://pdf-temp-files.s3.amazonaws.com/d5a27d3d1e9a4ef7be31f513a95cef7b/result.pdf",
"pageCount": 1,
"error": false,
"status": 200,
"name": "result.pdf",
"remainingCredits": 99078311,
"credits": 35
}
Code Snippet
CURL
curl --location --request POST 'https://api.pdf.co/v1/pdf/makesearchable' \
--header 'x-api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image2.jpg",
"lang": "eng",
"pages": "",
"name": "result.pdf",
"password": "",
"async": "false",
"encrypt": false,
"profiles": ""
}'
[POST] /pdf/makeunsearchable (PDF to Scanned PDF)
This method converts PDF files into “text unsearchable” pdf which are the same as if you printed and then scanned your PDF. In other words, this method converts your pdf into a “scanned” pdf file where everything is turned into an image.
url
required. URL to the sourcePDF
file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section. If you are randomly gettingToo Many Requests
orAccess Denied
error for your input url, please try to addcache:
to enable built-in url caching.httpusername
(optional) - http auth user name if required to access sourceurl
.httppassword
(optional) - http auth password if required to access sourceurl
.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.password
optional. Password of PDF file. Must be a String.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
(legacy, now all files are stored at the encrypted cloud storage by default.
Important: you can also encrypt output files and decrypt input files with user-controlled data encryption (strong AES
encryption + custom keys). Click here to learn more.
name
optional. File name for generated output. Must be a String.expiration
(optional). Output link expiration in minutes. Default is60
(i.e. 60 minutes or 1 hour). After this delay generated output file(s) (if any) will be auto-removed from PDF.co temporary files storage. Max allowed expiration period depends on your current subscription plan. To store permanent input files (e.g. re-usable images, pdf, documents), please use PDF.co built-in Files Storage instead.profiles
optional. Must be a String. Use this param to set additional configuration for fine tuning and extra options. Explore PDF.co knowledgebase for profile examples.- Method: POST
- URL: /v1/pdf/makeunsearchable
Query parameters
No query parameters accepted.
Body payload
{
"url": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-to-text/sample.pdf",
"pages": "",
"name": "result.pdf",
"password": "",
"async": "false",
"encrypt": false,
"profiles": ""
}
Example responses
/pdf/makeunsearchable (PDF to Scanned PDF)
{
"url": "https://pdf-temp-files.s3.amazonaws.com/6b755238963a472abf67fd5e7ffafd79/result.pdf",
"pageCount": 1,
"error": false,
"status": 200,
"name": "result.pdf",
"remainingCredits": 327244,
"credits": 35
}
Code Snippet
CURL
curl --location --request POST 'https://api.pdf.co/v1/pdf/makeunsearchable' \
--header 'x-api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-to-text/sample.pdf",
"pages": "",
"name": "result.pdf",
"password": "",
"async": "false",
"encrypt": false,
"profiles": ""
}'
Knowledgebase
Samples
- C# - Advanced Conversion Options
- C# - Make Searchable PDF From URL
- C# - Make Searchable PDF From URL Asynchronously
- C# - Make Searchable PDF From Uploaded File
- Java - Advanced Conversation Options
- Java - Make Searchable PDF From URL
- Java - Make Searchable PDF From Uploaded File
- JavaScript - Advanced Conversion Options
- JavaScript - Make Searchable PDF From URL (Node.js)
- JavaScript - Make Searchable PDF From URL (Node.js) - Async API
- JavaScript - Make Searchable PDF From Uploaded File (Node.js)
- JavaScript - Make Searchable PDF From Uploaded File (Node.js) - Async API
- JavaScript - Make UnSearchable PDF From URL (Node.js)
- JavaScript - Make UnSearchable PDF From URL (Node.js) - Async API
- JavaScript - Make UnSearchable PDF From Uploaded File (Node.js)
- JavaScript - Make UnSearchable PDF From Uploaded File (Node.js) - Async API
- PHP - Make Searchable PDF Asynchronously
- PHP - Make Searchable PDF From Uploaded File
- PowerShell - Advanced Conversion Options
- PowerShell - Make Searchable PDF From URL
- PowerShell - Make Searchable PDF From URL Asynchronously
- PowerShell - Make Searchable PDF From Uploaded File
- Python - Advanced Conversation Options
- Python - Make Searchable PDF From URL
- Python - Make Searchable PDF From URL Asynchronously
- Python - Make Searchable PDF From Uploaded File
- VB.NET - Advanced Conversion Options
- VB.NET - Make Searchable PDF From URL
- VB.NET - Make Searchable PDF From URL Asynchronously
- VB.NET - Make Searchable PDF From Uploaded File
- cURL - PDF to Text Searchable
Copyright © 2016 - 2022 PDF.co