Skip to content
Guides

Samples

The Samples use preset parameters and documentation to call the API of ComPDFKit PDF SDK for each function without UI interaction or parameter settings. This is achieved through modular code examples. The functions include creating, getting, and deleting various types of annotations and forms, extracting text and images, encrypting and decrypting documents, adding watermarks and bates numbers, and more.

These projects not only demonstrate the best practices for each function but also provide detailed introductions. The impact of each function on PDF documents can be observed in the output directory. With the help of the Samples, you can quickly learn how to use the functions you need and apply them to your projects.

NameDescription
BookmarkCreate a new bookmark, and access the existing bookmark.
OutlineCreate a new outline, and get existing outline information.
PDFToImageConvert PDF pages to PNG.
TextSearchPerform full-text search and highlight keywords.
AnnotationPrint the annotation list information, set the annotations (including markup, note, ink, free text, circle, square, line, stamp, and sound annotations), and delete the annotations.
AnnotationImportExportExport and import annotations with an xfdf file.
InteractiveFormsPrint form list information, set up interactive forms (including text, checkbox, radio button, button, list, combo boxes, signing and deleting forms), and fill out form information.
PDFPageManipulate PDF pages, including inserting, splitting, merging, rotating, and replacing, etc.
ImageExtractExtract images from a PDF document.
DocumentInfoDisplay the information of PDF files like the author, created time, etc.
WatermarkCreate text/image watermarks and delete watermarks.
BackgroundCreate a color/image background and delete the background.
BatesCreate and remove bates numbers.
PDFRedactCreate redaction to remove sensitive information or private data, which cannot be viewed and searched once applied.
EncryptSet passwords to encrypt PDFs and set document permissions. Allow decrypting PDFs.
PDFAConvert PDF to PDF/A-1a and PDF/A-1b.
FlattenFlatten PDF annotations and forms, and merge all layouts as one layout.
DocumentCompareCompare different documents and show the result in new documents.
DigitalSignaturesCreate, fill, and verify the signatures and certificates. Read the details of signatures and certificates. Remove digital signatures.