Replace the PDPageContentStream methods PDFBox 3.0 removed
MSALPDFBox 3.0 removed the PDPageContentStream methods and constructors that PDFBox 2 deprecated. This calls their replacements as the PDFBox 2 methods did: showText for drawString, newLineAtOffset for moveTextPositionByAmount, setTextMatrix(Matrix) and transform(Matrix) for the text and transformation methods that took numbers, float arguments where they took double, the fill, fillEvenOdd, clip and clipEvenOdd methods for a winding rule, and an AppendMode for the boolean that said whether to append. Color components in 0..255 become the fractions of 255 that the float methods take, since the int overloads PDFBox 3.0 removed would otherwise be called with the float overloads, which reject values above 1. drawLine, addLine and fillRect become the moveTo, lineTo, addRect, stroke and fill calls they made.
org. openrewrite. apache. pdfbox. MigratePageContentStreammod run . --recipe= org. openrewrite. apache. pdfbox. MigratePageContentStreamInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.