Skip to main content

Composes one PDF from the given pdf files, in the given sequence.

Project description

Gumshoe PDF Composer

Composes one PDF from the given pdf files, in the given sequence, then writes it to the given outfile.

Installation

To install, run pip install pdfcomposer

Examples

Call the default from the command line

pdfcomposer --outputer index

# index outputers  
# ('compose', 'index') 

Call a plugin (compose) from the command line

pdfcomposer --outputer compose \
  --args 'outfile.pdf' 'infile1.pdf' 'infile2.pdf'\
  --kwargs title="My PDF" author="John Doe" subject="My first PDF" creator="John Doe"

# composes a PDF with the content of infile1.pdf then infile2.pdf
# sets the PDF info with the given kwargs
# writes the PDF to ./outfile.pdf

From a script

from pdfcomposer import Api

composer = Api()


# index
args = []

kws = dict(path='index')

result = composer(*args, **kws)

print(result)



# compose
args = ['./outfile.pdf', './infile1.pdf', './infile2.pdf']

kws = dict(path='compose',
           title="My PDF",
           author="John Doe",
           subject="My first PDF",
           creator="John Doe")

result = composer(*args, **kws)

print(result)


# composes a PDF with the content of infile1.pdf then infile2.pdf
# sets the PDF info with the given kwargs
# writes the PDF to ./outfile.pdf

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdfcomposer-1.0.0.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

pdfcomposer-1.0.0-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page