Supported File Formats

The following table lists the file formats that GroupDocs.Signature for Python via .NET works with, and the signature types each format supports.

FormatDescriptionBarcodeDigitalFormFieldImageMetadataQR‑codeStampText
BMPBitmap Picture (BMP)✅✅✅✅✅
CDRCorelDraw Vector Graphic Drawing (CDR)✅✅✅✅✅
CMXCorel Metafile eXchange Image✅✅✅✅✅
DJVUDeja Vu (DjVu)✅✅✅✅✅
GIFGraphics Interchange Format (GIF)✅✅✅✅✅
JPG/JPEGJoint Photographic Experts Group (JPEG)✅✅✅✅✅✅
PNGPortable Network Graphics (PNG)✅✅✅✅✅✅
PSDAdobe Photoshop Document (PSD)✅✅✅✅✅✅
SVGScalable Vector Graphics (SVG)✅✅✅✅✅✅
TIF/TIFFTagged Image File Format (TIFF)✅✅✅✅✅✅
WEBPWebP Image✅✅✅✅✅
WMFWindows Metafile (WMF)✅✅✅✅✅
PDFAdobe Portable Document Format (PDF)✅✅✅✅✅✅✅✅
ODPOpenDocument Presentation✅✅✅✅✅✅✅
OTPOpenDocument Presentation Template✅✅✅✅✅✅
POTMPowerPoint Macro‑Enabled Template (POTM)✅✅✅✅✅✅
POTXPowerPoint Template (POTX)✅✅✅✅✅✅
PPSPowerPoint 97‑2003 Slide Show (PPS)✅✅✅✅✅✅
PPSMMacro‑Enabled Slide Show (PPSM)✅✅✅✅✅✅
PPSXSlide Show (PPSX)✅✅✅✅✅✅
PPTPowerPoint 97‑2003 Presentation (PPT)✅✅✅✅✅✅
PPTMMacro‑Enabled Presentation (PPTM)✅✅✅✅✅✅✅
PPTXPresentation (PPTX)✅✅✅✅✅✅✅
ODSOpenDocument Spreadsheet✅✅✅✅✅✅✅✅
OTSODS Template (OTS)✅✅✅✅✅✅✅✅
XLSXMicrosoft Excel Worksheet (XLSX)✅✅✅✅✅✅✅✅
XLSExcel 97‑2003 Worksheet (XLS)✅✅✅✅✅✅✅✅
XLSBExcel Binary Worksheet (XLSB)✅✅✅✅✅✅✅✅
XLSMMacro‑Enabled Worksheet (XLSM)✅✅✅✅✅✅✅✅
XLTXExcel Template (XLTX)✅✅✅✅✅✅✅✅
XLTMMacro‑Enabled Template (XLTM)✅✅✅✅✅✅✅✅
DOCWord 97‑2003 Document (DOC)✅✅✅✅✅✅✅✅
DOCMMacro‑Enabled Document (DOCM)✅✅✅✅✅✅✅✅
DOCXWord Document (DOCX)✅✅✅✅✅✅✅✅
DOTWord 97‑2003 Template (DOT)✅✅✅✅✅✅✅✅
DOTMMacro‑Enabled Template (DOTM)✅✅✅✅✅✅✅✅
DOTXWord Template (DOTX)✅✅✅✅✅✅✅✅
ODTOpenDocument Text (ODT)✅✅✅✅✅✅✅
OTTOpenDocument Text Template (OTT)✅✅✅✅✅✅

Get the Supported File Types in Code

FileType.get_supported_file_types() returns every file type that the installed version can open. To check a single file, pass its extension to FileType.from_extension, which returns FileType.UNKNOWN for an extension the library does not support:

import os

from groupdocs.signature.domain import FileType

# Every file type the installed version can open
for file_type in FileType.get_supported_file_types():
    print(f"{file_type.extension}: {file_type.file_format}")

# Check whether one file is supported
extension = os.path.splitext("contract.pdf")[1]
if FileType.from_extension(extension) == FileType.UNKNOWN:
    print(f"{extension} files are not supported")
else:
    print(f"{extension} files are supported")

Example: Working with Different File Formats

The same code signs every supported format; the library detects the format from the file:

import os

from groupdocs.signature import Signature
from groupdocs.signature.options import TextSignOptions

# The same code signs every supported format
for source in ("sample.pdf", "sample.docx", "sample.xlsx"):
    name, extension = os.path.splitext(source)
    with Signature(source) as signature:
        options = TextSignOptions("John Smith")
        options.left = 100
        options.top = 100
        result = signature.sign(f"{name}_signed{extension}", options)
    print(f"{source}: {len(result.succeeded)} signature(s) added")
Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.