Skip to content

Commit

Permalink
feat (cli): add support for non-pdf/a document; style fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
reycn committed Dec 19, 2024
1 parent 6b293ab commit 1e8ca49
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pdf2zh/high_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ def convert_to_pdfa(input_path, output_path):
Args:
input_path: Path to source PDF file
output_path: Path to save PDF/A file
"""
import pikepdf
"""pikepdf
from pikepdf import Dictionary, Name, Pdf

# Open the PDF file
Expand Down Expand Up @@ -347,7 +346,7 @@ def translate(
filename = os.path.splitext(os.path.basename(file))[0]

# If the commandline has specified converting to PDF/A format
## --compatible / -cp
# --compatible / -cp
if compatible:
file_pdfa = file.replace(".pdf", "-pdfa.pdf")
print(f"Converting {file} to PDF/A format...")
Expand Down

0 comments on commit 1e8ca49

Please sign in to comment.