Skip to main content

Adds numbering to pdf file

Project description

numbering2pdf adds numbering to pdf file

Example:

from numbering2pdf import add_numbering_to_pdf

add_numbering_to_pdf("old_file.pdf", "new_file.pdf")

Parameters:

pdf_file - string or bytes

add_numbering_to_pdf("old_file.pdf", "new_file.pdf")
file = open("new.pdf", "br")
read_file = file.read()
file.close()
add_numbering_to_pdf(read_file, "new_file.pdf")
new_file = add_numbering_to_pdf("old_file.pdf")

new_pdf_file_path - path to new pdf file

add_numbering_to_pdf("old_file.pdf", "test/new_file.pdf")

position - position on screen (left, center, right)

add_numbering_to_pdf("old_file.pdf", "new_file.pdf", position="left")
add_numbering_to_pdf("old_file.pdf", "new_file.pdf", position="center")
add_numbering_to_pdf("old_file.pdf", "new_file.pdf", position="right")

start_page - from which page number will the numbering be added

add_numbering_to_pdf("old_file.pdf", "new_file.pdf", start_page=3)

end_page - on which page number will the numbering be completed

add_numbering_to_pdf("old_file.pdf", "new_file.pdf", end_page=10)

start_index - which number will the page numbering start from

add_numbering_to_pdf("old_file.pdf", "new_file.pdf", start_index=4)

size - number size

add_numbering_to_pdf("old_file.pdf", "new_file.pdf", size=25)

font - font type

Courier, Courier-Bold, Courier-Oblique, Courier-BoldOblique, Helvetica, Helvetica-Bold, Helvetica-Oblique, Helvetica-BoldOblique, Times-Roman, Times-Bold, Times-Italic, Times-BoldItalic, Symbol, ZapfDingbats

add_numbering_to_pdf("old_file.pdf", "new_file.pdf", font="Courier")

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

numbering2pdf-1.0.3.tar.gz (2.8 kB view hashes)

Uploaded Source

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