Extract PDF is a software tool or application designed to extract specific pages from PDF (Portable Document Format) files. This extraction enables users to isolate and save only the pages they need, making it easier to share, organize, or repurpose parts of a larger document. The tool supports both single-page and multi-page PDFs and offers options to customize the output, including selecting page ranges and choosing the desired format for the extracted pages. This ensures a simple and efficient way to manage and separate content from any PDF file.
Try it in Live Tool| Feature | Us | Other APIs |
|---|---|---|
| Credit-Based Pricing | Yes | Limited or confusing |
| Transparent Billing | Yes | Surprise charges |
| Dev-Focused Docs | Yes | Sparse examples |
| Free Credits | Yes | Paywall from day 1 |
| Fast Support | Yes | 3+ day wait time |
This example will sign your document with a Nutrient certificate.

Sign up and receive 100 credits for free, or log in to automatically add your API key to sample code. If you are not sure how credits are consumed read more in our pricing documentation , or check out this guide on calculating credit usage.

Add a PDF named document. pdf to your project folder. You can use our sample document.

Copy the code and run it from the same folder you added the files to. For more information, see our language-specific getting started guides.

Open result.pdf in your project folder to view the results.
curl -X POST "https://api.skynyx.dev/v1/extract_pdf" -H "apiKey: your_default_api_key" -F "pdf_file=@/c/Users/YourName/Downloads/sample.pdf" -F "page=10-13" -o result.jsoncurl -X POST https://api.skynyx.dev/v1/extract_pdf ^
-H "apiKey: your_default_api_key" ^
-F "pdf_file=@\"C:/Users/YourName/Downloads/sample.pdf\"" ^
-F "page=10-13" ^
-o result.jsonimport java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import okhttp3.*;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
public class Program {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient();
File file = new File("C:/Users/YourName/Downloads/sample.pdf");
RequestBody requestBody = new MultipartBody.Builder()
.setType(MultipartBody.FORM)
.addFormDataPart("pdf_file", file.getName(),
RequestBody.create(file, MediaType.parse("application/pdf")))
.addFormDataPart("page", "10-13") // single page: "10", range: "10-13"
.build();
Request request = new Request.Builder()
.url("https://api.skynyx.dev/v1/extract_pdf")
.addHeader("apiKey", "your_default_api_key")
.post(requestBody)
.build();
try (Response response = client.newCall(request).execute()) {
if (response.body() != null) {
String responseBody = response.body().string();
JsonObject json = JsonParser.parseString(responseBody).getAsJsonObject();
if (json.has("status") && json.get("status").getAsInt() == 200) {
try (FileOutputStream outputStream = new FileOutputStream("result.json")) {
outputStream.write(responseBody.getBytes());
}
System.out.println("Response saved to result.json");
System.out.println("Extracted PDF URL: " + json.get("result").getAsString());
} else {
System.out.println("API returned error: " + json.toString());
}
} else {
System.out.println("Empty response from server");
}
}
}
}const fs = require('fs');
const axios = require('axios');
const FormData = require('form-data');
async function main() {
const filePath = "C:/Users/YourName/Downloads/sample.pdf";
const form = new FormData();
form.append('pdf_file', fs.createReadStream(filePath));
form.append('page', '10-13'); // single page: "10", range: "10-13"
try {
const response = await axios.post(
'https://api.skynyx.dev/v1/extract_pdf',
form,
{
headers: {
...form.getHeaders(),
'apiKey': 'your_default_api_key',
}
}
);
const data = response.data;
if (data.status === 200) {
fs.writeFileSync('result.json', JSON.stringify(data, null, 2));
console.log('Response saved to result.json');
console.log('Extracted PDF URL:', data.result);
} else {
console.log('API returned error:', data);
}
} catch (error) {
console.error('Request error:', error.message);
}
}
main();using System;
using System.IO;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var filePath = @"C:\Users\YourName\Downloads\sample.pdf";
var apiUrl = "https://api.skynyx.dev/v1/extract_pdf";
using var client = new HttpClient();
using var form = new MultipartFormDataContent();
var fileBytes = File.ReadAllBytes(filePath);
var fileContent = new ByteArrayContent(fileBytes);
fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("application/pdf");
form.Add(fileContent, "pdf_file", Path.GetFileName(filePath));
form.Add(new StringContent("10-13"), "page"); // single page: "10", range: "10-13"
client.DefaultRequestHeaders.Add("apiKey", "your_default_api_key");
var response = await client.PostAsync(apiUrl, form);
var responseBody = await response.Content.ReadAsStringAsync();
var json = JsonSerializer.Deserialize<JsonElement>(responseBody);
if (json.GetProperty("status").GetInt32() == 200) {
await File.WriteAllTextAsync("result.json", responseBody);
Console.WriteLine("Response saved to result.json");
Console.WriteLine("Extracted PDF URL: " + json.GetProperty("result").GetString());
} else {
Console.WriteLine("API returned error: " + responseBody);
}
}
}import requests
import json
file_path = "C:/Users/YourName/Downloads/sample.pdf"
url = "https://api.skynyx.dev/v1/extract_pdf"
headers = {"apiKey": "your_default_api_key"}
with open(file_path, "rb") as f:
files = {"pdf_file": (file_path.split('/')[-1], f, "application/pdf")}
data = {"page": "10-13"} # single page: "10", range: "10-13"
response = requests.post(url, headers=headers, files=files, data=data)
if response.status_code == 200:
json_data = response.json()
if json_data.get("status") == 200:
with open("result.json", "w") as out_file:
json.dump(json_data, out_file, indent=2)
print("Response saved to result.json")
print("Extracted PDF URL:", json_data.get("result"))
else:
print("API returned error:", json_data)
else:
print("HTTP request failed with status:", response.status_code)<?php
$filePath = 'C:/Users/YourName/Downloads/sample.pdf';
$url = 'https://api.skynyx.dev/v1/extract_pdf';
$apiKey = 'your_default_api_key';
$ch = curl_init();
$postFields = [
'pdf_file' => new CURLFile($filePath, 'application/pdf', basename($filePath)),
'page' => '10-13' // single page: "10", range: "10-13"
];
$headers = ['apiKey: ' . $apiKey];
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($httpCode === 200) {
$json = json_decode($response, true);
if ($json['status'] === 200) {
file_put_contents('result.json', $response);
echo "Response saved to result.json
";
echo "Extracted PDF URL: " . $json['result'];
} else {
echo "API returned error: " . $response;
}
} else {
echo "HTTP request failed with code: $httpCode";
}
curl_close($ch);POST /v1/extract_pdf HTTP/1.1
Host: api.skynyx.dev
apiKey: your_default_api_key
Content-Type: multipart/form-data; boundary=----BOUNDARY
------BOUNDARY
Content-Disposition: form-data; name="pdf_file"; filename="sample.pdf"
Content-Type: application/pdf
<binary content of sample.pdf>
------BOUNDARY
Content-Disposition: form-data; name="page"
10-13
------BOUNDARY--