Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set outlines of PDF #91

Merged
merged 4 commits into from
Jul 28, 2024
Merged

Set outlines of PDF #91

merged 4 commits into from
Jul 28, 2024

Conversation

TD-Sky
Copy link
Contributor

@TD-Sky TD-Sky commented Jul 4, 2024

TODO APIs

  • PdfDocument::delete_outlines
  • PdfDocument::set_outlines

Resolve #54 .

@TD-Sky
Copy link
Contributor Author

TD-Sky commented Jul 7, 2024

@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.

@messense
Copy link
Owner

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

I don't know either.

@TD-Sky
Copy link
Contributor Author

TD-Sky commented Jul 27, 2024

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 TD-Sky marked this pull request as ready for review July 27, 2024 03:23
@TD-Sky
Copy link
Contributor Author

TD-Sky commented Jul 27, 2024

May you release a new version after this PR merged?

@messense messense merged commit 69aded2 into messense:main Jul 28, 2024
7 checks passed
@messense
Copy link
Owner

Published in v0.4.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is there a way to replace the outline of pdf ?
2 participants