Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lyrapdf/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ def extract_and_process(input_dir, pdf_path, json_output):
print("PDFSyntaxError: Is this really a PDF? ", pdf_path)
except PDFTextExtractionNotAllowed as e:
print(e)
except Exception as e:
print(e)


def get_file_list(input_dir):
Expand Down
1 change: 1 addition & 0 deletions lyrapdf/pre_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ def analyze_font_size(text):
total = sum(font_size_dict.values())
percentage_sum = 0
max_quote = 0
font_threshold = 0
i = 0 # Keep track of the index
for key in sorted_font_size_dict:
# Update accumulated percentage
Expand Down