Why PDF Services API?
Create, secure, and convert PDF documents
Create a PDF from Microsoft Office documents, protect the content, and convert to other formats.
Modify PDFs and optimize output
Programmatically alter a document, such as reordering, inserting, and rotating pages, as well as compressing the file.
Leverage Adobe's cloud-based services
Access the same cloud-based APIs that power Adobe's end user applications to quickly deliver scalable, secure solutions.
Key features of Adobe PDF Services API
PDF content extraction
Extract text, images, tables, and more from native and scanned PDFs into a structured JSON file. PDF Extract API leverages AI technology to accurately identify text objects and understand the natural reading order of different elements such as headings, lists, and paragraphs spanning multiple columns or pages. Extract font styles with identification of metadata such as bold and italic text and their position within your PDF. Extracted content is output in a structured JSON file format with tables in CSV or XLSX and images saved as PNG.
See our public API Reference and quickly try our APIs using the Postman collections
Copied to your clipboard1curl --location --request POST 'https://cpf-ue1.adobe.io/ops/:create' \2--header 'Accept: application/json, text/plain, /' \3--header 'Authorization: Bearer ' \4--header 'x-api-key: ' \5--form 'contentAnalyzerRequests={6 \"cpf:engine\": {7 \"repo:assetId\": \"urn:aaid:cpf:58af6e2c-1f0c-400d-9188-078000185695\"8 },9 \"cpf:inputs\": {10 \"documentIn\": {11 \"cpf:location\": \"fileInput1\",12 \"dc:format\": \"application/pdf\"13 },14 \"params\": {15 \"cpf:inline\": {16 \"elementsToExtract\": [17 \"text\", \"tables\"18 ],19 \"renditionsToExtract\": [ \"tables\", \"figures\"]20 }21 }22 },23 \"cpf:outputs\": {24 \"elementsInfo\": {25 \"cpf:location\": \"jsonoutput\",26 \"dc:format\": \"application/json\"27 },28 \"elementsRenditions\": {29 \"cpf:location\": \"fileoutpart\",30 \"dc:format\": \"text/directory\"31 }32 }33}' \34--form 'fileInput1=@""'
Copied to your clipboard1// Create an ExecutionContext using credentials2const executionContext = PDFServicesSdk.ExecutionContext.create(credentials);34// Create a new operation instance.5const extractPDFOperation = PDFServicesSdk.ExtractPDF.Operation.createNew(),6 input = PDFServicesSdk.FileRef.createFromLocalFile(7 'resources/extractPDFInput.pdf',8 PDFServicesSdk.ExtractPDF.SupportedSourceFormat.pdf9 );1011// Set operation input from a source file.12extractPDFOperation.setInput(input);1314// Build and set extractPDF options15const options = new PDFServicesSdk.ExtractPDF.options.ExtractPdfOptions.Builder()16 .addElementsToExtract(17 PDFServicesSdk.ExtractPDF.options.ExtractElementType.TEXT)18 .addElementsToExtractRenditions(19 PDFServicesSdk.ExtractPDF.options.ExtractRenditionsElementType.FIGURES)20 .addCharInfo(true)21 .build()22extractPDFOperation.setOptions(options);2324// Execute the operation and Save the result to the specified location.25extractPDFOperation.execute(executionContext)26 .then(result => result.saveAsFile('output/extractPdf.zip'))
Copied to your clipboard1//Create an ExecutionContext using credentials and create a new operation instance.2ExecutionContext executionContext = ExecutionContext.Create(credentials);3ExtractPDFOperation extractPdfOperation = ExtractPDFOperation.CreateNew();45// Set operation input from a source file.6FileRef sourceFileRef = FileRef.CreateFromLocalFile(@"extractPDFInput.pdf");7extractPdfOperation.SetInputFile(sourceFileRef);89// Build ExtractPDF options and set them into the operation10ExtractPDFOptions extractPdfOptions = ExtractPDFOptions.ExtractPDFOptionsBuilder()11 .AddElementsToExtract(new List<ExtractElementType>(new []{ExtractElementType.TEXT, ExtractElementType.TABLES}))12 .AddElementsToExtractRenditions(new List<ExtractRenditionsElementType> (new []{ExtractRenditionsElementType.TABLES, ExtractRenditionsElementType.FIGURES}))13 .AddCharsInfo(true)14 .Build();15extractPdfOperation.SetOptions(extractPdfOptions);1617// Execute the operation.18FileRef result = extractPdfOperation.Execute(executionContext);1920// Save the result to the specified location.21result.SaveAs(Directory.GetCurrentDirectory() + "/output/extractPdf.zip");
Copied to your clipboard1// Create an ExecutionContext using credentials and create a new operation instance2ExecutionContext executionContext = ExecutionContext.create(credentials);3ExtractPDFOperation extractPDFOperation = ExtractPDFOperation.createNew();45// Set operation input from a source file6FileRef source = FileRef.createFromLocalFile("src/test/resources/extractPdfInput.pdf");7extractPDFOperation.setInputFile(source);89// Build ExtractPDF options and set them into the operation10ExtractPDFOptions extractPDFOptions = ExtractPDFOptions.extractPdfOptionsBuilder()11 .addElementsToExtract(Arrays.asList(PDFElementType.TEXT, PDFElementType.TABLES))12 .addElementsToExtractRenditions(Arrays.asList(PDFElementType.TABLES, PDFElementType.FIGURES))13 .addCharInfo(Boolean.TRUE)14 .build();15extractPDFOperation.setOptions(extractPDFOptions);1617// Execute the operation18FileRef result = extractPDFOperation.execute(executionContext);1920// Save the result at the specified location21result.saveAs("output/extractPdf.zip");
Copied to your clipboard1#Create an ExecutionContext using credentials and create a new operation instance.2execution_context = ExecutionContext.create(credentials)3extract_pdf_operation = ExtractPDFOperation.create_new()45#Set operation input from a source file.6source = FileRef.create_from_local_file(base_path + "/resources/extractPdfInput.pdf")7extract_pdf_operation.set_input(source)89# Build ExtractPDF options and set them into the operation10extract_pdf_options: ExtractPDFOptions = ExtractPDFOptions.builder() \11 .with_elements_to_extract([PDFElementType.TEXT, PDFElementType.TABLES]) \12 .with_elements_to_extract_renditions([PDFElementType.TABLES, PDFElementType.FIGURES]) \13 .with_get_char_info(True) \14 .build()15extract_pdf_operation.set_options(extract_pdf_options)1617#Execute the operation.18result: FileRef = extract_pdf_operation.execute(execution_context)1920# Save the result to the specified location.21result.save_as(base_path + "/output/extractPdf.zip")
Create a PDF file
Create PDFs from a variety of formats, including static and dynamic HTML; Microsoft Word, PowerPoint, and Excel; as well as text, image, Zip, and URL. Support for HTML to PDF, DOC to PDF, DOCX to PDF, PPT to PDF, PPTX to PDF, XLS to PDF, XLSX to PDF, TXT to PDF, RTF to PDF, BMP to PDF, JPEG to PDF, GIF to PDF, TIFF to PDF, PNG to PDF
See our public API Reference and quickly try our APIs using the Postman collections
Copied to your clipboard1curl --location --request POST 'https://cpf-ue1.adobe.io/ops/:create?respondWith=%7B%22reltype%22%3A%20%22http%3A%2F%2Fns.adobe.com%2Frel%2Fprimary%22%7D' \2 --header 'Authorization: Bearer ' \3 --header 'Accept: application/json, text/plain, */*' \4 --header 'x-api-key: ' \5 --header 'Prefer: respond-async,wait=0' \6 --form 'contentAnalyzerRequests="{7 \"cpf:inputs\": {8 \"documentIn\": {9 \"cpf:location\": \"InputFile0\",10 \"dc:format\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"11 }12 },13 \"cpf:engine\": {14 \"repo:assetId\": \"urn:aaid:cpf:Service-1538ece812254acaac2a07799503a430\"15 },16 \"cpf:outputs\": {17 \"documentOut\": {18 \"cpf:location\": \"multipartLabelOut\",19 \"dc:format\": \"application/pdf\"20 }21 }22 }"' \23 --form 'InputFile0=@""'
Copied to your clipboard1// Create an ExecutionContext using credentials and create a new operation instance.2const executionContext = PDFServicesSdk.ExecutionContext.create(credentials),3 createPdfOperation = PDFServicesSdk.CreatePDF.Operation.createNew();45// Set operation input from a source file.6const input = PDFServicesSdk.FileRef.createFromLocalFile('resources/createPDFInput.docx');7createPdfOperation.setInput(input);89// Execute the operation and Save the result to the specified location.10createPdfOperation.execute(executionContext)11 .then(result => result.saveAsFile('output/createPDFFromDOCX.pdf'))12
Copied to your clipboard1//Create an ExecutionContext using credentials and create a new operation instance.2ExecutionContext executionContext = ExecutionContext.Create(credentials);3CreatePDFOperation createPdfOperation = CreatePDFOperation.CreateNew();45// Set operation input from a source file.6FileRef source = FileRef.CreateFromLocalFile(@"createPdfInput.docx");7createPdfOperation.SetInput(source);89// Execute the operation.10FileRef result = createPdfOperation.Execute(executionContext);1112// Save the result to the specified location.13result.SaveAs(Directory.GetCurrentDirectory() + "/output/createPdfOutput.pdf");
Copied to your clipboard1//Create an ExecutionContext using credentials and create a new operation instance.2ExecutionContext executionContext = ExecutionContext.create(credentials);3CreatePDFOperation createPdfOperation = CreatePDFOperation.createNew();45// Set operation input from a source file.6FileRef source = FileRef.createFromLocalFile("src/main/resources/createPDFInput.docx");7createPdfOperation.setInput(source);89// Execute the operation.10FileRef result = createPdfOperation.execute(executionContext);1112// Save the result to the specified location.13result.saveAs("output/createPDFFromDOCX.pdf");
Create a PDF file from HTML
Create PDFs from static and dynamic HTML, Zip, and URL.
See our public API Reference and quickly try our APIs using the Postman collections
Copied to your clipboard1curl --location --request POST 'https://cpf-ue1.adobe.io/ops/:create?respondWith=%7B%22reltype%22%3A%20%22http%3A%2F%2Fns.adobe.com%2Frel%2Fprimary%22%7D' \2 --header 'Authorization: Bearer ' \3 --header 'Accept: application/json, text/plain, */*' \4 --header 'x-api-key: ' \5 --header 'Prefer: respond-async,wait=0' \6 --form 'contentAnalyzerRequests="{7 \"cpf:inputs\": {8 \"documentIn\": {9 \"cpf:location\": \"InputFile0\",10 \"dc:format\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"11 }12 },13 \"cpf:engine\": {14 \"repo:assetId\": \"urn:aaid:cpf:Service-1538ece812254acaac2a07799503a430\"15 },16 \"cpf:outputs\": {17 \"documentOut\": {18 \"cpf:location\": \"multipartLabelOut\",19 \"dc:format\": \"application/pdf\"20 }21 }22 }"' \23 --form 'InputFile0=@""'
Copied to your clipboard1// Create an ExecutionContext using credentials and create a new operation instance2const executionContext = PDFServicesSdk.ExecutionContext.create(credentials),3 createPDF = PDFServicesSdk.CreatePDF,4 htmlToPDFOperation = createPDF.Operation.createNew();56// Set operation input from a source URL.7const input = PDFServicesSdk.FileRef.createFromURL(8 "https://www.adobe.io"9);10htmlToPDFOperation.setInput(input);1112// Provide any custom configuration options for the operation.13setCustomOptions(htmlToPDFOperation);1415// Execute the operation and Save the result to the specified location.16htmlToPDFOperation.execute(executionContext)17 .then(result => result.saveAsFile('output/createPdfFromURLOutput.pdf'))
Copied to your clipboard1//Create an ExecutionContext using credentials and create a new operation instance.2ExecutionContext executionContext = ExecutionContext.Create(credentials);3CreatePDFOperation htmlToPDFOperation = CreatePDFOperation.CreateNew();45// Set operation input from a source URL.6FileRef source = FileRef.CreateFromURI(new Uri("https://www.adobe.io"));7htmlToPDFOperation.SetInput(source);89// Provide any custom configuration options for the operation.10SetCustomOptions(htmlToPDFOperation);1112// Execute the operation.13FileRef result = htmlToPDFOperation.Execute(executionContext);1415// Save the result to the specified location.16result.SaveAs(Directory.GetCurrentDirectory() + "/output/createPdfFromURLOutput.pdf");
Copied to your clipboard1//Create an ExecutionContext using credentials and create a new operation instance.2ExecutionContext executionContext = ExecutionContext.create(credentials);3CreatePDFOperation htmlToPDFOperation = CreatePDFOperation.createNew();45// Set operation input from a source file.6FileRef source = FileRef.createFromURL(new URL("https://www.adobe.io"));7htmlToPDFOperation.setInput(source);89// Provide any custom configuration options for the operation.10CreatePDFOptions htmlToPdfOptions = CreatePDFOptions.htmlOptionsBuilder()11 .includeHeaderFooter(true)12 .build();13htmlToPDFOperation.setOptions(htmlToPdfOptions);1415// Provide any custom configuration options for the operation.16setCustomOptions(htmlToPDFOperation);1718// Execute the operation.19FileRef result = htmlToPDFOperation.execute(executionContext);2021// Save the result to the specified location.22result.saveAs("output/createPDFFromURLOutput.pdf");
Copied to your clipboard1curl --location --request POST 'https://cpf-ue1.adobe.io/ops/:create?respondWith=%7B%22reltype%22%3A%20%22http%3A%2F%2Fns.adobe.com%2Frel%2Fprimary%22%7D' \2 --header 'Authorization: Bearer ' \3 --header 'Accept: application/json, text/plain, */*' \4 --header 'x-api-key: ' \5 --header 'Prefer: respond-async,wait=0' \6 --form 'contentAnalyzerRequests="{7 \"cpf:engine\":{8 \"repo:assetId\":\"urn:aaid:cpf:Service-52d5db6097ed436ebb96f13a4c7bf8fb\"9 },10 \"cpf:inputs\":{11 \"documentIn\":{