Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.
/ Zave2Pdf Public archive

A Python script converts zave file into pdf file

License

Notifications You must be signed in to change notification settings

imesut/Zave2Pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Zave2Pdf

Zave2Pdf is a Python script that, converts a zave file into a pdf file, by using reportlab, pdfrw and Python xml library. To use this script, reportlab and pdfrw should be installed. And pdfrw requires a patch before install.

IMPORTANT: Script requires to apply developer's patch to pdfrw, because related pull request hasn't merged to master repository. For detailed information and application steps look at Prepare pdfrw title.

Running Script

Zave2Pdf work with two parameters; -zave to indicate zave file and -s to indicate (optional) output pdf file.

Usage;

 Zave2Pdf.py -zave /Path/of/ZaveFile.zave

Indicating the save path and file name(optional);

 Zave2Pdf.py -zave /Path/of/ZaveFile.zave -s /Save/Directory/FileName.pdf

Prepare pdfrw

Download pdfrw

Original git repository of pdfrw master is pmaupin/pdfrw/. And clone url can be found from Clone or Download button as https://github.com/pmaupin/pdfrw.git

And related patch file can be found as https://github.com/pmaupin/pdfrw/pull/63.patch

First go your local folder

cd /Users/user_name/Downloads/

An get pdfrw master,

git clone https://github.com/pmaupin/pdfrw.git

Master is here. Now go into folder,

cd pdfrw

Create .patch file by curl, from github's patch file url (pmaupin/pdfrw/pull/63.patch) which can be found at 63rd pull request page.

curl -0 https://patch-diff.githubusercontent.com/raw/pmaupin/pdfrw/pull/63.patch

And apply patch file,

git apply 63.patch

After patch, pdfrw is ready!

Install pdfrw

python setup.py build
sudo python setup.py install

Some Notes

  • Zave files can consist scrollable contents. But pdfs can't, in traditional ways. Zave2Pdf adds scrollable content as following page and prints a message into scroll area as "You can view the content at the following page"
  • This script based on zave files which contains pdf and png files. This kind of zave files is the majortiy of zave files. When any problems occured, please use issues or send an e-mail to me.

Releases

No releases published

Packages

No packages published

Languages