Regeneration of content streams is tracked by the page and page object collection objects, not by the individual objects themselves. This means it's possible to mutate a page object (e.g. by applying a transform) and have the containing page object collection (and therefore the containing page) be unaware of the mutation, and therefore not regenerate the page content streams.
It should be possible to use the page index cache to our advantage. Adding an additional flag there to indicate that a page is "dirty" and needs to have its content streams regenerated would allow objects to directly inform a page of the need to regenerate.
Expanded PdfPageIndexCache to store property structs instead of raw PdfPageIndex values, and implemented in-place mutation of previously cached properties.
Regeneration of content streams is tracked by the page and page object collection objects, not by the individual objects themselves. This means it's possible to mutate a page object (e.g. by applying a transform) and have the containing page object collection (and therefore the containing page) be unaware of the mutation, and therefore not regenerate the page content streams.
It should be possible to use the page index cache to our advantage. Adding an additional flag there to indicate that a page is "dirty" and needs to have its content streams regenerated would allow objects to directly inform a page of the need to regenerate.