speedata / xts

XML typesetting system
BSD 3-Clause "New" or "Revised" License
6 stars 0 forks source link

`visiblebox` for `<Image>` #9

Closed pr-apes closed 1 year ago

pr-apes commented 1 year ago

@pgundlach,

visiblebox should be implemented as attribute for <Image>.

It would be great that it would default (as in all PDF handling) to media box.

If this is not possible (or you simply prefer to stick to crop box, as in Publisher), media box values should be preferred when these are exceeded by values from the crop box.

We already discussed that (speedata/publisher#468). As tricky as it might seem, crop box values larger than the ones for the media box are valid.

In that case, the spec specifically states that the former should be ignored in favor of the latter (https://opensource.adobe.com/dc-acrobat-sdk-docs/standards/pdfstandards/pdf/PDF32000_2008.pdf#page=636).

Many thanks for your help.

pgundlach commented 1 year ago

I am not sure if the MediaBox should be the default box for all the layout functions and for the image inclusion. CropBox is what the user should see in the PDF when included and not the media box?! If this is true, I think it makes sense to have the crop box as a default for the other functions.

pgundlach commented 1 year ago

Next version of XTS implements that the boxes should not be larger than the mediabox.

pr-apes commented 1 year ago

Great news!

Many thanks for the new release too!

pgundlach commented 1 year ago

Release will be uploaded as soon as possible