ByteScout Cloud API Server - PDF Text Search API - PowerShell - PDF Text Search from URL - ByteScout

ByteScout Cloud API Server – PDF Text Search API – PowerShell – PDF Text Search from URL

  • Home
  • /
  • Articles
  • /
  • ByteScout Cloud API Server – PDF Text Search API – PowerShell – PDF Text Search from URL

How to PDF text search API in PowerShell with ByteScout Cloud API Server

Learning is essential in computer world and the tutorial below will demonstrate how to PDF text search API in PowerShell

The sample shows instructions and algorithm of how to PDF text search API and how to make it run in your PowerShell application. What is ByteScout Cloud API Server? It is API server that is ready to use and can be installed and deployed in less than 30 minutes on your own Windows server or server in a cloud. It can save data and files on your local server-based file storage or in Amazon AWS S3 storage. Data is processed solely on the API server and is powered by ByteScout engine, no cloud services or Internet connection is required for data processing.. It can help you to PDF text search API in your PowerShell application.

These PowerShell code samples for PowerShell guide developers to speed up coding of the application when using ByteScout Cloud API Server. Just copy and paste the code into your PowerShell application’s code and follow the instructions. Enjoy writing a code with ready-to-use sample PowerShell codes.

The trial version of ByteScout Cloud API Server can be downloaded for free from our website. It also includes source code samples for PowerShell and other programming languages.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

GetPdfTextSearchFromUrl.ps1
      
# Please NOTE: In this sample we're assuming Cloud Api Server is hosted at "https://localhost". # If it's not then please replace this with with your hosting url. # Direct URL of PDF file to get information $SourceFileURL = "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-to-text/sample.pdf" # Comma-separated list of page indices (or ranges) to process. Leave empty for all pages. Example: '0,2-5,7-'. $Pages = "" # PDF document password. Leave empty for unprotected documents. $Password = "" # Search string. $SearchString = '\d{1,}\.\d\d' #Regular expression to find numbers like '100.00' # Enable regular expressions (Regex) $RegexSearch = 'True' # Prepare URL for PDF text search API call. $query = "https://localhost/pdf/find?password=$($Password)&pages=$($Pages)&url=$($SourceFileURL)&searchString=$($SearchString)&regexSearch=$($RegexSearch)" $query = [System.Uri]::EscapeUriString($query) try { # Execute request $jsonResponse = Invoke-RestMethod -Method Get -Uri $query if ($jsonResponse.error -eq $false) { # Display search information foreach ($item in $jsonResponse.body) { Write-Host "Found text $($item.text) at coordinates $($item.left), $($item.top)" } } else { # Display service reported error Write-Host $jsonResponse.message } } catch { # Display request error Write-Host $_.Exception }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Cloud API Server Home Page

Explore ByteScout Cloud API Server Documentation

Explore Samples

Sign Up for ByteScout Cloud API Server Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

run.bat
      
@echo off powershell -NoProfile -ExecutionPolicy Bypass -Command "& .\GetPdfTextSearchFromUrl.ps1" echo Script finished with errorlevel=%errorlevel% pause

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Cloud API Server Home Page

Explore ByteScout Cloud API Server Documentation

Explore Samples

Sign Up for ByteScout Cloud API Server Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Cloud API Server Home Page

Explore ByteScout Cloud API Server Documentation

Explore Samples

Sign Up for ByteScout Cloud API Server Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next