Skip to content

Latest commit

 

History

93 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDFix SDK example for Python

For more information please visit https://pdfix.net.

Installation

Initialize and activate a Python virtual environment:

python3 -m venv env

Linux, macOS:

source env/bin/activate

Windows (PowerShell):

.\env\Scripts\Activate.ps1

Windows (Command Prompt):

env\Scripts\activate.bat

Installation using requirements

pip install -r requirements.txt

Manual installation

pip3 install pdfix-sdk

Code example

from pdfixsdk import *

pdfix = GetPdfix()
if pdfix is None:
    raise RuntimeError("Pdfix initialization failed")

doc = pdfix.OpenDoc("test.pdf", "")
if doc is None:
    raise RuntimeError(f"Unable to open PDF: {pdfix.GetError()}")

print(f"Number of pages: {doc.GetNumPages()}")
doc.Close()

Other Python projects with PDFix SDK

https://github.com/topics/pdfix-actions

Have a question? Need help?

Let us know and we’ll get back to you. Write to support@pdfix.net or use the contact form.

About

PDFix SDK samples for Python. PDF manipulation, content extraction, conversion , accessibility and more...

Resources

Stars

30 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages