Giter Site home page Giter Site logo

office-pdf's Introduction

What is office_pdf.py.

The scripts that generates PDF files from MS Office files and manipulate them.

Installation

This document describes how to set up the environment for the application.

Install Python 3.

Install Python 3.10 from https://www.python.org/downloads/.
Add python3 to the PATH environment.

Install packages using requirement.txt

All the below packages can be install by following commands. Or each package can be installed one by one.

pip install -r requirement.txt

Python + Windows COM

https://pbpython.com/windows-com.html

PDF + Python

https://johannesfilter.com/python-and-pdf-a-review-of-existing-tools/ https://nanonets.com/blog/pypdf2-library-working-with-pdf-files-in-python/ https://realpython.com/pdf-python/

Directory structure

The structure of the application.

Application design

There are several command patterns and two of them produce PDFs from Access and Word files. Others like gen_pdf_cmd, combine_pdf_cmd and impose_pdf_cmd manipulate PDF and produce another PDF. CommandExecutor manages all these and produces the final output the developer wants to produce.

base_pdf_cmd

The base_pdf_cmd is the base class for all the xxx_pdf_cmd that has input parameters and output PDF files.

access_pdf_cmd

This command produces PDF file from a Access report.

word_pdf_cmd

This command produces PDF files from Word document files by creating a docx file first and exporting the range as a PDF.

gen_pdf_cmd

The gen_pdf_cmd command generates PDF from scratch using reportlab.

combine_pdf_cmd

The combine_pdf_cmd combines multiple pdfs into one by choosing specified ranges of PDF pages. It uses PyPDF2 to do the job.

impose_pdf_cmd

The impose_pdf_cmd command imposes source PDF and produced imposed PDF. i.e. Perfect or Saddle Stitch.

CommandExecutor

The CommandExecutor manages list of xxx_pdf_cmds and run them based on their dependency and produce the final output PDF.

office-pdf's People

Contributors

juria90 avatar snts-james avatar juria90ddl avatar

Watchers

 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.