Code Monkey home page Code Monkey logo

zave2pdf's Introduction

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.

zave2pdf's People

Contributors

imesut avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.