ByteScout Cloud API Server - PDF Merging API - PowerShell - Merge PDF Documents From URLs - ByteScout

ByteScout Cloud API Server – PDF Merging API – PowerShell – Merge PDF Documents From URLs

  • Home
  • /
  • Articles
  • /
  • ByteScout Cloud API Server – PDF Merging API – PowerShell – Merge PDF Documents From URLs

How to merge PDF documents from urls for PDF merging API in PowerShell with ByteScout Cloud API Server

Step-by-step tutorial:How to merge PDF documents from urls to have PDF merging API in PowerShell

Writing of the code to merge PDF documents from urls in PowerShell can be done by developers of any level using ByteScout Cloud API Server. ByteScout Cloud API Server was designed to assist PDF merging API in PowerShell. ByteScout Cloud API Server is the ready to deploy Web API Server that can be deployed in less than thirty minutes into your own in-house Windows server (no Internet connnection is required to process data!) 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 built-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 merge PDF documents from urls. Open your PowerShell project and simply copy & paste the code and then run your app! Enjoy writing a code with ready-to-use sample PowerShell codes to add PDF merging API functions using ByteScout Cloud API Server in PowerShell.

Our website provides free trial version of ByteScout Cloud API Server that gives source code samples to assist with your PowerShell project.

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

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

MergePdfDocumentsFromUrls.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 URLs of PDF documents to merge $SourceFiles = @( "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-merge/sample1.pdf", "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-merge/sample2.pdf" ) # Destination PDF file name $DestinationFile = ".\result.pdf" # Prepare URL for `Merge PDF` API call $query = "https://localhost/pdf/merge?name={0}&url={1}" -f ` $(Split-Path $DestinationFile -Leaf), $($SourceFiles -join ",") $query = [System.Uri]::EscapeUriString($query) try { # Execute request $jsonResponse = Invoke-RestMethod -Method Get -Uri $query if ($jsonResponse.error -eq $false) { # Get URL of generated PDF file $resultFileUrl = $jsonResponse.url; # Download PDF file Invoke-WebRequest -OutFile $DestinationFile -Uri $resultFileUrl Write-Host "Generated PDF file saved as `"$($DestinationFile)`" file." } 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 "& .\MergePdfDocumentsFromUrls.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