ByteScout Cloud API Server - Barcode Reader API - PowerShell - Read Barcode From URL - ByteScout

ByteScout Cloud API Server – Barcode Reader API – PowerShell – Read Barcode From URL

  • Home
  • /
  • Articles
  • /
  • ByteScout Cloud API Server – Barcode Reader API – PowerShell – Read Barcode From URL

How to read barcode from URL for barcode reader API in PowerShell with ByteScout Cloud API Server

How to read barcode from URL in PowerShell with easy ByteScout code samples to make barcode reader API. Step-by-step tutorial

Every ByteScout tool includes sample PowerShell source codes that you can find here or in the folder with installed ByteScout product. ByteScout Cloud API Server helps with barcode reader API in PowerShell. ByteScout Cloud API Server is the ready to use Web API Server that can be deployed in less than 30 minutes into your own in-house server or into private cloud server. Can store data on in-house local server based storage or in Amazon AWS S3 bucket. Processing data solely on the server using buil-in ByteScout powered engine, no cloud services are used to process your data!.

Want to learn quickly? These fast application programming interfaces of ByteScout Cloud API Server for PowerShell plus the instruction and the code below will help to learn how to read barcode from URL. This sample code in PowerShell is all you need. Just copy-paste it to the code editor, then add a reference to ByteScout Cloud API Server and you are ready to try it! This basic programming language sample code for PowerShell will do the whole work for you in implementing barcode reader API in your app.

Trial version of ByteScout is available for free download from our website. This and other source code samples for PowerShell and other programming languages are available.

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

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

ReadBarcodeFromURL.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 source file to search barcodes in. $SourceFileURL = "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf" # Comma-separated list of barcode types to search. $BarcodeTypes = "Code128,Code39,Interleaved2of5,EAN13" # Comma-separated list of page indices (or ranges) to process. Leave empty for all pages. Example: '0,2-5,7-'. $Pages = "" # Prepare URL for `Barcode Reader` API call $query = "https://localhost/barcode/read/from/url?types=$($BarcodeTypes)&pages=$($Pages)&url=$($SourceFileURL)" $query = [System.Uri]::EscapeUriString($query) try { # Execute request $jsonResponse = Invoke-RestMethod -Method Get -Uri $query if ($jsonResponse.error -eq $false) { # Display found barcodes in console foreach ($barcode in $jsonResponse.barcodes) { Write-Host "Found barcode:" Write-Host " Type: " $barcode.TypeName Write-Host " Value: " $barcode."Value" Write-Host " Document Page Index: " $barcode."Page" Write-Host " Rectangle: " $barcode."Rect" Write-Host " Confidence: " $barcode."Confidence" Write-Host "" } } 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 "& .\ReadBarcodeFromURL.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