Skip to content

Commit

Permalink
Merge pull request #25 from kcroker/maintenance
Browse files Browse the repository at this point in the history
Maintenance
  • Loading branch information
v-- committed Feb 24, 2024
2 parents 3d4c8c3 + b4a51e4 commit 843328b
Show file tree
Hide file tree
Showing 5 changed files with 586 additions and 349 deletions.
4 changes: 2 additions & 2 deletions dpsprep.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "DPS" "1" "October 2023" ""
.TH "DPS" "1" "January 2024" ""
.SH "NAME"
\fBdps\fR \- a DjVu to PDF converter
.SH "SYNOPSIS"
Expand Down Expand Up @@ -58,7 +58,7 @@ dpsprep \-\-pool=16 input\.djvu
Produce an output file by disregarding the text layer and running OCRmyPDF instead:
.IP "" 4
.nf
dpsprep \-\-ocr \'{"languages": ["rus", "eng"]}\' input\.djvu
dpsprep \-\-ocr \'{"language": ["rus", "eng"]}\' input\.djvu
.fi
.IP "" 0
.P
Expand Down
2 changes: 1 addition & 1 deletion dpsprep.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Produce an output file using a large pool of workers:

Produce an output file by disregarding the text layer and running OCRmyPDF instead:

dpsprep --ocr '{"languages": ["rus", "eng"]}' input.djvu
dpsprep --ocr '{"language": ["rus", "eng"]}' input.djvu

Or simply disregard the text layer without OCR:

Expand Down
2 changes: 1 addition & 1 deletion dpsprep/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def draw_text(self, x1: int, x2: int, y1: int, y2: int, text: str):
self.pdf.set_font('Invisible', size=int(BASE_FONT_SIZE * desired_width / actual_width))

try:
self.pdf.text(x=x1, y=page_height - y1, txt=text)
self.pdf.text(x=x1, y=page_height - y1, text=text)
except TypeError as err:
logger.warning(f'FPDF refuses to draw {repr(text)}: {err}')

Expand Down

0 comments on commit 843328b

Please sign in to comment.