Skip to content

Commit

Permalink
Specify width and color for stamp box
Browse files Browse the repository at this point in the history
Width alone does not change width [1], although from looking at our
other code it looks like we were already aware of this.

[1] pymupdf/PyMuPDF#1913
  • Loading branch information
cbm755 committed Nov 22, 2022
1 parent df9b38d commit b95df7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plom/create/mergeAndCodePages.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def pdf_page_add_labels_QRs(page, shortname, stamp, qr_code, odd=True):
r = fitz.Rect(
pg_width // 2 - r.width / 2, my, pg_width // 2 + r.width / 2, my + r.height
)
page.draw_rect(r)
page.draw_rect(r, color=(0, 0, 0), width=0.5)
tw.write_text(page)

# special code to skip staple mark and QR codes
Expand All @@ -205,7 +205,7 @@ def pdf_page_add_labels_QRs(page, shortname, stamp, qr_code, odd=True):
shape.draw_line(rDNW.top_right, rDNW.bottom_left)
else:
shape.draw_line(rDNW.top_right, rDNW.bottom_right)
shape.finish(width=0.5, color=[0, 0, 0], fill=[0.75, 0.75, 0.75])
shape.finish(width=0.5, color=(0, 0, 0), fill=(0.75, 0.75, 0.75))
shape.commit()

tw = fitz.TextWriter(page.rect)
Expand Down

0 comments on commit b95df7f

Please sign in to comment.