ComPDFKit PDF SDK
ComprehensivePDF SDK Solutionsfor {Developers}
Companies, organizations, smallbusinesses and developers are alreadyusing our view, annotate, edit, form, andsign libraries to create amazingapplications
The Best Tools for Developers
Powerful PDF APIs for Fast Integration
Exclusively designed for developers. With few lines of code, developers use the modern PDF tech stack to integrate complex components on the platforms you're working on.
JavaScript
// Import ComPDFKit WebViewer into your component.
import ComPDFKitViewer from '/@compdfkit/webviewer';
const viewer = document.getElementById('webviewer');
// Initialize ComPDFKit Web viewer and load your pdf
ComPDFKitViewer.init({
pdfUrl: 'Your PDF Url',
}, viewer)
.then((core) => {
const docViewer = core.docViewer;
docViewer.addEvent('documentloaded', () => {
console.log('ComPDFKit Web Viewer loaded');
})
})
C# WPF
using ComPDFKitViewer.PdfViewer;
// Load a document
CPDFViewer pdfViewer = new CPDFViewer();
pdfViewer.InitDocument("Test.pdf");
// A Grid named "PDFGrid" from xaml used to display PDF document
PDFGrid.Children.Add(pdfViewer);
C# UWP
using ComPDFKitViewer.PdfViewer;
// Load a document
CPDFViewer pdfViewer = new CPDFViewer();
var localFile = new Uri("ms-appx:///Assets/Test.pdf");
StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(localFile);
pdfViewer.OpenFile(file);
// A Grid named "PDFGrid" from xaml used to display PDF document
PDFGrid.Children.Add(pdfViewer);
Java
import com.compdfkit.core.document.CPDFDocument;
import com.compdfkit.ui.reader.CPDFReaderView;
CPDFReaderView readerView = findViewById(R.id.reader_view);
// Load a document
CPDFDocument document = new CPDFDocument(this);
File file = new File("Test.pdf");
document.open(file.getAbsolutePath());
readerView.setPDFDocument(document);
Kotlin
import com.compdfkit.core.document.CPDFDocument
import com.compdfkit.ui.reader.CPDFReaderView
val readerView = findViewByIdCPDFReaderView>(R.id.reader_view)
// Load a document.
val document = CPDFDocument(this)
document.open(File("Test.pdf").absolutePath)
readerView.pdfDocument = document
Swift
import ComPDFKit
guard let pdfPath = Bundle.main.path(forResource: "Test", ofType: "pdf") else {
fatalError("PDF file not found")
}
let url = URL(fileURLWithPath: pdfPath)
let document = CPDFDocument(url: url)
// Initialize a CPDFView object with the size of the entire screen.
let rect = UIScreen.main.bounds
let pdfView = CPDFView(frame: rect)
pdfView.document = document
Objective-C
#import ComPDFKit/ComPDFKit.h>
// Load a document.
// This is the container for your PDF file. It can also manage multiple files.
NSBundle *bundle = [NSBundle mainBundle];
NSString *pdfPath= [bundle pathForResource:@"Test" ofType:@"pdf"];
NSURL *url = [NSURL fileURLWithPath:pdfPath];
CPDFDocument *document = [[CPDFDocument alloc] initWithURL:url];
// Initialize a CPDFView object with the size of the entire screen.
CGRect rect = [[UIScreen mainScreen] bounds];
CPDFView *pdfView = [[CPDFView alloc] initWithFrame:rect];
pdfView.document = document;
Swift
import ComPDFKit
// Load a document.
// This is the container for your PDF file. It can also manage multiple files.
let bundle = Bundle.main
let pdfPath = bundle.path(forResource: "Test", ofType: "pdf")
let url = URL(fileURLWithPath: pdfPath!)
let document = CPDFDocument(url: url)
// Initialize a CPDFView object to fit the entire screen size.
let rect = NSApp.mainWindow?.frame ?? NSRect.zero
let pdfView = CPDFView(frame: rect)
pdfView.document = document
Objective-C
#import ComPDFKit/ComPDFKit.h>
// Load a document.
// This is the container for your PDF file. It can also manage multiple files.
NSBundle *bundle = [NSBundle mainBundle];
NSString *pdfPath= [bundle pathForResource:@"Test" ofType:@"pdf"];
NSURL *url = [NSURL fileURLWithPath:pdfPath];
CPDFDocument *document = [[CPDFDocument alloc] initWithURL:url];
// Initialize a CPDFView object to fit the entire screen size.
NSRect rect = [NSApp mainWindow].frame;
CPDFView *pdfView = [[CPDFView alloc] initWithFrame:rect];
pdfView.document = document;
Java
import com.compdfkit.core.document.CPDFDocument;
// Load a document.
CPDFDocument document = new CPDFDocument(this);
File file = new File("Test.pdf");
document.open(file.getAbsolutePath());
.NET
using ComPDFKitViewer.PDFDocument;
// Load a document.
CPDFDocument document = CPDFDocument.InitWithFilePath("Test.pdf");
Curl
curl --location --request POST 'https://api-server.compdf.com/server/v1/file/upload' \
--header 'Authorization: Bearer accessToken' \
--form 'file=@"test.pdf"' \
--form 'taskId="taskId"' \
--form 'password=""' \
--form 'parameter="{ \"isContainAnnot\": 1 , \"isContainImg\":1,\"wordLayoutMode\":1,\"isAllowOcr\":0,\"isContainOcrBg\":0,\"isOnlyAiTable\":0}"' \
--form 'language=""'
Java
import java.io.*;
import okhttp3.*;
public class main {
public static void main(String []args) throws IOException{
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("file","{{file}}",
RequestBody.create(MediaType.parse("application/octet-stream"),
new File("file>")))
.addFormDataPart("taskId","{{taskId}}")
.addFormDataPart("language","{{language}}")
.addFormDataPart("password","")
.addFormDataPart("parameter","{ \"isFlowLayout\": \"1\", \"isContainImg\": \"1\"}")
.build();
Request request = new Request.Builder()
.url("https://api-server.compdf.com/server/v1/file/upload")
.method("POST", body)
.addHeader("Authorization", "Bearer {{accessToken}}")
.build();
Response response = client.newCall(request).execute();
}
}
PDF SDK
Our PDF SDK renders PDFs at the fastest speed and provides rich and reliable functionalities including viewing, markup, editing, signing, and conversion, satisfying the needs of processing PDFs in different scenarios.
PDF Server
Batch process PDF documents on our server, on-premises, or the third party cloud depending on your demands. ComPDFKit for Servers can be easily performed on Linux, Windows, and macOS with PDF libraries for Java and .NET.
PDF API
The robust online API simplifies the conversion, editing, management, and watermarking of PDF documents with HTML API requests. Liberating developers from platform and server restrictions.
PDF Solutions for Industries
Tailored Solutions for Unique Business Demands
No matter in construction, education, or any other industry, our specialized solutions streamline your workflows. Whether integrating PDF features into apps or collaborating on PDF editing with teams, we have the ideal solutions tailored for you.
AI-driven IDP Solution
Leverage AI technology to intelligently process documents for training LLMs, automating enterprise systems, streamlining workflows, and enhancing efficiency.
Construction
Precisely render and measure design drawings and easily edit and sign bids for a smoother workflow on construction projects.
Education
Enables students and teachers to view and edit learning materials during or after class, digitizing the classroom and improving learning efficiency.
Aviation
Quickly create, annotate, and sign pre-flight safety checklists and passenger/cargo manifests across all devices to ensure the safety of passengers' lives.
Government
ComPDFKit enables government departments to sign various documents, ensuring the security and integrity of confidential data through encryption and permission control.
Our Clients & Awards
Our exceptional quality has gained global trust, while our partners receive the best assurance.
Supports for Developers
Get the Latest Solutions and Supports
Contact Support >>
SDK Documentation
Extensive and understandable documentation and guides for SDK integration.
API Documentation
Comprehensive API guides for seamless calls and development.
Blog
Learn about our latest releases, tutorials, reviews, etc.
© Copyright 2000-2023 COGITO SOFTWARE CO.,LTD. All rights reserved