mupdf-rs icon indicating copy to clipboard operation
mupdf-rs copied to clipboard

Set outlines of PDF

Open TD-Sky opened this issue 1 year ago • 1 comments
trafficstars

TODO APIs

  • [x] PdfDocument::delete_outlines
  • [x] PdfDocument::set_outlines

Resolve https://github.com/messense/mupdf-rs/issues/54 .

TD-Sky avatar Jul 04 '24 16:07 TD-Sky

@messense Outline.x and Outline.y are different from Destination.left and Destination.top, which causes PDF viewer jumps to a wrong position in a correct page. Do you know the mapping between them? This is the last problem to be solved.

TD-Sky avatar Jul 07 '24 06:07 TD-Sky

Do you know the mapping between them? This is the last problem to be solved.

I don't know either.

messense avatar Jul 26 '24 03:07 messense

Fixed. The key is that fitz point is in a coordinate system different from destination point of PDF. We need to transform it via page transform matrix.

TD-Sky avatar Jul 27 '24 03:07 TD-Sky

May you release a new version after this PR merged?

TD-Sky avatar Jul 27 '24 03:07 TD-Sky

Published in v0.4.4.

messense avatar Jul 28 '24 09:07 messense