Skip to content

Add support for writing xref streams - #74

Merged
laurmaedje merged 6 commits into
typst:mainfrom
LaurenzV:xref_s
Jan 15, 2026
Merged

Add support for writing xref streams#74
laurmaedje merged 6 commits into
typst:mainfrom
LaurenzV:xref_s

Conversation

@LaurenzV

@LaurenzV LaurenzV commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@LaurenzV

Copy link
Copy Markdown
Contributor Author

I think this should work now. I've added some tests and also tried integrating it into krilla and throwing the gnereated PDFs at the different renderers, no one seems to complain about corrputed xref tables or anything. I've also verified that there are no regressions in the test suite when choosing the normal xref table.

@LaurenzV
LaurenzV marked this pull request as ready for review October 17, 2025 08:40
@laurmaedje
laurmaedje requested a review from saecki October 27, 2025 14:48
@saecki

saecki commented Oct 27, 2025

Copy link
Copy Markdown
Member

I still have some reading up to do, but I'll leave the review tomorrow :)

@saecki saecki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so I think I understand what's happening and everything looks good! I have just one minor comment about determining the field width.

Comment thread src/lib.rs

@laurmaedje laurmaedje left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the idea of the hook that pdf-writer doesn't need to deal with compression itself?

Comment thread src/lib.rs Outdated
Comment thread src/lib.rs Outdated
Comment thread src/lib.rs Outdated
Comment thread src/lib.rs
@LaurenzV

Copy link
Copy Markdown
Contributor Author

Is the idea of the hook that pdf-writer doesn't need to deal with compression itself?

Yep, exactly.

@laurmaedje

Copy link
Copy Markdown
Member

Nice, I like that.

@LaurenzV

LaurenzV commented Jan 1, 2026

Copy link
Copy Markdown
Contributor Author

I've rebased onto newest main now.

@laurmaedje
laurmaedje merged commit bc50aca into typst:main Jan 15, 2026
2 checks passed
@laurmaedje

Copy link
Copy Markdown
Member

Thank you. :)

Sorry for the slowdown, I forgot about this. If you need something merged more quickly in the future, just ping me!

@LaurenzV
LaurenzV deleted the xref_s branch January 15, 2026 13:47
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.

3 participants