gws.lib.pdf

Source code: gws.lib.pdf

Package Contents

gws.lib.pdf.concat(paths: [str], out_path: str) str

Concatenates multiple pdfs into one. The order of the pages are the same as the order of the paths in the list.

Parameters:
  • paths – Paths to the pdfs.

  • out_path – Path to the output pdf.

Returns:

Path to the concatenated pdf.

gws.lib.pdf.overlay(a_path: str, b_path: str, out_path: str) str

Overlay two pdfs page-wise.

Parameters:
  • a_path – Path to pdf a.

  • b_path – Path to pdf b, which will be placed on top.

  • out_path – Path to the output pdf.

Returns:

Path to the output pdf.

gws.lib.pdf.page_count(path: str) int

Returns the amount of pages for a given pdf.

Parameters:

path – Path to the pdf.

Returns:

Amount of pages in the pdf.