Thanks for your answer. I confirm: if I replace "W f" by "W n" in the original document then the rendering is OK. Anyway, for me it is strange that the expansion is only in the vertical axis (and not in the horizontal axis).
I can create a bug report if you want. For my use case I can solve the issue with a workaround. ________________________________ De: Tilman Hausherr <thaush...@t-online.de> Enviado: viernes, 4 de julio de 2025 13:36 Para: users@pdfbox.apache.org <users@pdfbox.apache.org> Asunto: Re: Rendering issue with type 2 shading: vertical expansion Hi, It is related to having "W f" instead of "W n" (it works the expected way when having "W n"). I think we're not fully correct when handling the "n" operator, that one does the handling of the clipping path which (maybe) should have been done earlier when handling the "W" operator. (Usually "W n" come together) My understanding of the "n" description is that it should consume the path. Tilman On 7/4/2025 3:08 PM, Esteban R wrote: > Hello. For the following pdf (which is a simplification of a real life > example) the shading is expanded vertically all the page. Other viewers show > a rectangle. > https://drive.google.com/file/d/1bocFsJbOFAlRijKnBUfSBdQ_GVX3oSUQ/view?usp=drive_link > > Is it an issue from pdfbox or maybe it is a problem with the document > itself? > > Content stream: > q > 0.5 0.5 0.5 rg > 396 615 171 28 re > W > f > /SHQZavYQee sh > Q > > > Esteban Ruiz > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org For additional commands, e-mail: users-h...@pdfbox.apache.org