Supported File Formats
Leave feedback
The following table indicates the file formats that GroupDocs.Signature for Python via .NET can work with. Here’s a simple example of how to check if a file format is supported:
import groupdocs.signature as signature
# Check if file format is supported
file_path = "document.pdf"
if signature.FileType.from_extension(file_path).is_supported():
print(f"File format {file_path} is supported")
else:
print(f"File format {file_path} is not supported")
Format | Description | Barcode | Digital | FormField | Image | Metadata | QRβcode | Stamp | Text |
---|---|---|---|---|---|---|---|---|---|
BMP | Bitmap Picture (BMP) | β | β | β | β | β | |||
CDR | CorelDraw Vector Graphic Drawing (CDR) | β | β | β | β | β | |||
CMX | Corel Metafile eXchange Image | β | β | β | β | β | |||
DJVU | Deja Vu (DjVu) | β | β | β | β | β | |||
GIF | Graphics Interchange Format (GIF) | β | β | β | β | β | |||
JPG/JPEG | Joint Photographic Experts Group (JPEG) | β | β | β | β | β | β | ||
PNG | Portable Network Graphics (PNG) | β | β | β | β | β | β | ||
PSD | Adobe Photoshop Document (PSD) | β | β | β | β | β | β | ||
SVG | Scalable Vector Graphics (SVG) | β | β | β | β | β | β | ||
TIF/TIFF | Tagged Image File Format (TIFF) | β | β | β | β | β | β | ||
WEBP | WebP Image | β | β | β | β | β | |||
WMF | Windows Metafile (WMF) | β | β | β | β | β | |||
Adobe Portable Document Format (PDF) | β | β | β | β | β | β | β | β | |
ODP | OpenDocument Presentation | β | β | β | β | β | β | β | |
OTP | OpenDocument Presentation Template | β | β | β | β | β | β | ||
POTM | PowerPoint MacroβEnabled Template (POTM) | β | β | β | β | β | β | ||
POTX | PowerPoint Template (POTX) | β | β | β | β | β | β | ||
PPS | PowerPoint 97β2003 Slide Show (PPS) | β | β | β | β | β | β | ||
PPSM | MacroβEnabled Slide Show (PPSM) | β | β | β | β | β | β | ||
PPSX | Slide Show (PPSX) | β | β | β | β | β | β | ||
PPT | PowerPoint 97β2003 Presentation (PPT) | β | β | β | β | β | β | ||
PPTM | MacroβEnabled Presentation (PPTM) | β | β | β | β | β | β | ||
PPTX | Presentation (PPTX) | β | β | β | β | β | β | ||
ODS | OpenDocument Spreadsheet | β | β | β | β | β | β | β | β |
OTS | ODS Template (OTS) | β | β | β | β | β | β | β | β |
XLSX | Microsoft Excel Worksheet (XLSX) | β | β | β | β | β | β | β | β |
XLS | Excel 97β2003 Worksheet (XLS) | β | β | β | β | β | β | β | β |
XLSB | Excel Binary Worksheet (XLSB) | β | β | β | β | β | β | β | β |
XLSM | MacroβEnabled Worksheet (XLSM) | β | β | β | β | β | β | β | β |
XLTX | Excel Template (XLTX) | β | β | β | β | β | β | β | β |
XLTM | MacroβEnabled Template (XLTM) | β | β | β | β | β | β | β | β |
DOC | Word 97β2003 Document (DOC) | β | β | β | β | β | β | β | β |
DOCM | MacroβEnabled Document (DOCM) | β | β | β | β |
Here’s an example of how to work with different file formats in Python:
import groupdocs.signature as signature
def sign_document(input_path, output_path, signature_type="text"):
# Initialize signature handler
signature_handler = signature.Signature(input_path)
if signature_type == "text":
# Create text signature options
options = signature.TextSignOptions("John Smith")
options.set_left(100)
options.set_top(100)
elif signature_type == "image":
# Create image signature options
options = signature.ImageSignOptions("signature.png")
options.set_left(100)
options.set_top(100)
elif signature_type == "digital":
# Create digital signature options
options = signature.DigitalSignOptions("certificate.pfx", "password")
# Sign document
signature_handler.sign(output_path, options)
print(f"Document signed successfully: {output_path}")
# Example usage
sign_document("document.pdf", "signed.pdf", "text")
sign_document("document.docx", "signed.docx", "image")
sign_document("document.xlsx", "signed.xlsx", "digital")
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.