Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
C++ and Python APIs for MuPDF | ||||||||
Line: 12 to 12 | ||||||||
The C++ MuPDF API | ||||||||
Deleted: | ||||||||
< < |
| |||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
The Python MuPDF API | ||||||||
Line: 143 to 143 | ||||||||
[SWIG build files] | ||||||||
Added: | ||||||||
> > |
Artifex LicensingArtifex offers a dual licensing model for MuPDF. Meaning we offer both commercial licenses or the GNU Affero General Public License (AGPL). While Open Source software may be free to use, that does not mean it is free of obligation. To determine whether your intended use of MuPDF is suitable for the AGPL, please read the full text of the AGPL license agreement on the FSF web site![]() ![]() ![]() | |||||||
Please send any questions, comments or suggestions about this page to: julian.smith@artifex.com |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
C++ and Python APIs for MuPDF | ||||||||
Line: 25 to 25 | ||||||||
The Python MuPDF API
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Building the C++ and Python MuPDF APIs | ||||||||
Line: 37 to 37 | ||||||||
| ||||||||
Changed: | ||||||||
< < | Build C++ and Python MuPDF APIs and run basic tests: | |||||||
> > | Build MuPDF shared library, C++ and Python MuPDF APIs, and run basic tests: | |||||||
git clone --recursive git://git.ghostscript.com/mupdf.git | ||||||||
Line: 82 to 82 | ||||||||
(This enables Python to find the mupdf module, and enables the system dynamic linker to find the shared libraries that implement the underlying C, C++ and Python MuPDF APIs.) | ||||||||
Changed: | ||||||||
< < | Minimal example Python code: | |||||||
> > | Minimal Python code that uses the mupdf module: | |||||||
import mupdf document = mupdf.Document('foo.pdf') | ||||||||
Changed: | ||||||||
< < | Detailed usage of the Python API can be found in: | |||||||
> > | A simple example Python test script (run by scripts/mupdfwrap.py -t ) is:
| |||||||
Added: | ||||||||
> > | More detailed usage of the Python API can be found in: | |||||||
| ||||||||
Line: 131 to 132 | ||||||||
platform/ c++/ include/ | ||||||||
Changed: | ||||||||
< < | mupdf/ [C++ MuPDF API] | |||||||
> > | mupdf/ [C++ MuPDF API header files] | |||||||
classes.h exceptions.h functions.h internal.h | ||||||||
Deleted: | ||||||||
< < |
Other internal generated files:
mupdf/ build/ platform/ c++/ | |||||||
implementation/ | ||||||||
Changed: | ||||||||
< < | *.cpp [MuPDF C++ implementation] | |||||||
> > | *.cpp [MuPDF C++ implementation files] | |||||||
python/ | ||||||||
Changed: | ||||||||
< < | [SWIG files] | |||||||
> > | [SWIG build files] | |||||||
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
C++ and Python APIs for MuPDF | ||||||||
Line: 8 to 8 | ||||||||
API Stability | ||||||||
Changed: | ||||||||
< < | The C++ and Python MuPDF APIs are currently liable to change. | |||||||
> > | The C++ and Python MuPDF APIs are currently an alpha release and liable to change. | |||||||
The C++ MuPDF API |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Changed: | ||||||||
< < | C++ and Python APIs for MuPDF. | |||||||
> > | C++ and Python APIs for MuPDF | |||||||
Changed: | ||||||||
< < | Overview: | |||||||
> > | Overview | |||||||
Changed: | ||||||||
< < | The C++ MuPDF API: | |||||||
> > | API Stability | |||||||
Changed: | ||||||||
< < |
| |||||||
> > | The C++ and Python MuPDF APIs are currently liable to change.
The C++ MuPDF API
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Changed: | ||||||||
< < | The Python MuPDF API: | |||||||
> > | The Python MuPDF API | |||||||
Changed: | ||||||||
< < | ||||||||
> > |
| |||||||
Changed: | ||||||||
< < | Building the C++ and Python MuPDF APIs: | |||||||
> > | Building the C++ and Python MuPDF APIs | |||||||
Changed: | ||||||||
< < | We require:
| |||||||
> > | Requirements: | |||||||
Changed: | ||||||||
< < | All building is done with the scripts/mupdfwrap.py script. | |||||||
> > |
| |||||||
Changed: | ||||||||
< < | Build C++ and Python MuPDF APIs and run basic tests with:
| |||||||
> > | Build C++ and Python MuPDF APIs and run basic tests:
git clone --recursive git://git.ghostscript.com/mupdf.git | |||||||
cd mupdf ./scripts/mupdfwrap.py -b all -t | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Changed: | ||||||||
< < | Debug build:
cd mupdf | |||||||
> > | As above but do a debug build: | |||||||
./scripts/mupdfwrap.py -d build/shared-debug -b all -t | ||||||||
Changed: | ||||||||
< < | ||||||||
> > |
For more information:
| |||||||
Changed: | ||||||||
< < | For more details, run ./scripts/mupdfwrap.py -h to see help, or look at the doc-string at beginning of the script directly. | |||||||
> > | Building auto-generated documentation | |||||||
Changed: | ||||||||
< < | Using the Python API: | |||||||
> > | Build HTML documentation for the C, C++ and Python APIs (using Doxygen and pydoc):
./scripts/mupdfwrap.py --doc allThis will generate these documentation roots:
Using the Python API | |||||||
Run python code with:
PYTHONPATH=build/shared-release LD_LIBRARY_PATH=build/shared-release | ||||||||
Changed: | ||||||||
< < | (This enables Python to find the mupdf module, and enables the system dynamic linker to find the shared libraries that implement the underlying C, C++ and Python MuPDF APIs.) | |||||||
> > | (This enables Python to find the mupdf module, and enables the system dynamic linker to find the shared libraries that implement the underlying C, C++ and Python MuPDF APIs.) | |||||||
Changed: | ||||||||
< < | Example Python code: | |||||||
> > | Minimal example Python code: | |||||||
Changed: | ||||||||
< < |
| |||||||
> > | ||||||||
import mupdf | ||||||||
Changed: | ||||||||
< < | document = mupdf.Document("foo.pdf") | |||||||
> > | document = mupdf.Document('foo.pdf') | |||||||
Detailed usage of the Python API can be found in: | ||||||||
Line: 76 to 95 | ||||||||
| ||||||||
Changed: | ||||||||
< < | How the build works: | |||||||
> > | How the build works | |||||||
Changed: | ||||||||
< < | Building of MuPDF shared library: | |||||||
> > | Building of MuPDF shared library: | |||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Changed: | ||||||||
< < | mupdfwrap.py 's generation of the C++ MuPDF API: | |||||||
> > | Generation of the C++ MuPDF API: | |||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < | mupdfwrap.py 's generation of the Python MuPDF API: | |||||||
> > | Generation of the Python MuPDF API: | |||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Changed: | ||||||||
< < | Generated files: | |||||||
> > | Generated files | |||||||
Changed: | ||||||||
< < |
| |||||||
> > | ||||||||
mupdf/ build/ | ||||||||
Changed: | ||||||||
< < | shared-release/ [Files needed at runtime.] | |||||||
> > | shared-release/ [Files needed at runtime] | |||||||
libmupdf.so [implements C MuPDF API] libmupdfcpp.so [implements C++ MuPDF API] mupdf.py [implements Python MuPDF API] | ||||||||
Line: 119 to 136 | ||||||||
exceptions.h functions.h internal.h | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Other internal generated files: | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > | ||||||||
mupdf/ build/ platform/ c++/ implementation/ | ||||||||
Changed: | ||||||||
< < | *.cpp [MuPDF C++ implementation.] | |||||||
> > | *.cpp [MuPDF C++ implementation] | |||||||
python/ | ||||||||
Changed: | ||||||||
< < | [SWIG files.] | |||||||
> > | [SWIG files] | |||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Please send any questions, comments or suggestions about this page to: julian.smith@artifex.com | ||||||||
Added: | ||||||||
> > |
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
C++ and Python APIs for MuPDF.Overview:The C++ MuPDF API:
The Python MuPDF API:
Building the C++ and Python MuPDF APIs:We require:
scripts/mupdfwrap.py script.
Build C++ and Python MuPDF APIs and run basic tests with:
cd mupdf ./scripts/mupdfwrap.py -b all -tDebug build: cd mupdf ./scripts/mupdfwrap.py -d build/shared-debug -b all -tFor more details, run ./scripts/mupdfwrap.py -h to see help, or look at the doc-string at beginning of the script directly.
Using the Python API:Run python code with:PYTHONPATH=build/shared-release LD_LIBRARY_PATH=build/shared-release
(This enables Python to find the mupdf module, and enables the system dynamic linker to find the shared libraries that implement the underlying C, C++ and Python MuPDF APIs.)
Example Python code:
import mupdf document = mupdf.Document("foo.pdf")Detailed usage of the Python API can be found in:
How the build works:Building of MuPDF shared library:
mupdfwrap.py 's generation of the C++ MuPDF API:
mupdfwrap.py 's generation of the Python MuPDF API:
Generated files:mupdf/ build/ shared-release/ [Files needed at runtime.] libmupdf.so [implements C MuPDF API] libmupdfcpp.so [implements C++ MuPDF API] mupdf.py [implements Python MuPDF API] _mupdf.so [implements Python MuPDF API internals] shared-debug/ [as shared-release but debug build] platform/ c++/ include/ mupdf/ [C++ MuPDF API] classes.h exceptions.h functions.h internal.hOther internal generated files: mupdf/ build/ platform/ c++/ implementation/ *.cpp [MuPDF C++ implementation.] python/ [SWIG files.] Please send any questions, comments or suggestions about this page to: julian.smith@artifex.com |