aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_polyglot_pdfzip.py
blob: f4a3ff20639489dabfd0d7262bcc4d3051474d63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys
sys.path.append("../")

from PdfFileTransformer import Pdf
from ZipFileTransformer import Zip
from PolyglotFile import PolyglotPdfZip
import logging

input_file_pdf = "./samples/test1.pdf"
input_file_zip = "./samples/test1.zip"
output_file = "./samples/test1_out.pdf"

logging.basicConfig(level=logging.DEBUG)


p = Pdf(input_file_pdf)
z = Zip(input_file_zip)
a = PolyglotPdfZip(p, z)
a.generate()
a.write(output_file)