Skip to content

Commit

Permalink
PDF: fix link rectangle
Browse files Browse the repository at this point in the history
  • Loading branch information
tdewolff committed Mar 5, 2024
1 parent 9862223 commit 9a377e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion renderers/pdf/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ func (w *pdfPageWriter) AddURIAction(uri string, rect canvas.Rect) {
"Type": pdfName("Annot"),
"Subtype": pdfName("Link"),
"Border": pdfArray{0, 0, 0},
"Rect": pdfArray{rect.X, rect.Y, rect.W, rect.H},
"Rect": pdfArray{rect.X * ptPerMm, rect.Y * ptPerMm, (rect.X + rect.W) * ptPerMm, (rect.Y + rect.H) * ptPerMm},
"Contents": uri,
"A": pdfDict{
"S": pdfName("URI"),
Expand Down

0 comments on commit 9a377e2

Please sign in to comment.