You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by Emmeran Seehuber <ro...@rototor.de> on 2021/04/03 11:46:35 UTC
PDFBox 3.0.0-RC1 future test results with openhtmltopdf
Hi,
I did try to port openhtmltopdf to PDBox 3.0.0-RC1 in this branch (https://github.com/rototor/openhtmltopdf/tree/open-dev-v1-pdfbox-3.0.0 <https://github.com/rototor/openhtmltopdf/tree/open-dev-v1-pdfbox-3.0.0>):
While porting I noted the following, which you may want to update in the Migration Guide:
- Breaking Change: setNonStrokingColor() and setStrokingColor() have no longer integer overloads. It will always call the float-versions and throw exceptions as the usual 0..255 int ranged values are outside of 0..1. That change is in so far bad, as it does not cause compile errors and just causes surprises. Have does int variants been deprecated?
- PDPushButton.setPushButton has been removed as it was redundant. If you construct a PDPushButton it will now always be a PDPushButton.
- All uses of org.apache.pdfbox.util.Charsets should migrate to java.nio.charset.StandardCharsets.
- Usage fo RandomAccessBuffer has been replaced be Loader.
It would be good if you mention what FDF is in the API docs at least of the FDFDocument and maybe Loader as you stumble across it in the Loader. Never heard of it before, had to lookup it in the Wikipedia. And as far as I can see only the german Wikipedia has an entry on it, the english one doesn’t. FDF is likely something the „normal“ user doesn’t want / need.
I’ve still this problems with openhtmltopdf:
- PDVariableTest.getDefaultAppearanceString() throws an IllegalArgumentException with the text " /DA is a required entry“ while trying to set a value.
The tests com.openhtmltopdf.nonvisualregressiontests.NonVisualRegressionTest#testInputWithoutNameAttribute, com.openhtmltopdf.testcases.CssPropertiesTest#testFormControls and com.openhtmltopdf.testcases.TestcaseRunnerTest#runTestcaseRunner causes the „field.setValue()“ on a PDComboBox in https://github.com/rototor/openhtmltopdf/blob/open-dev-v1-pdfbox-3.0.0/openhtmltopdf-pdfbox/src/main/java/com/openhtmltopdf/pdfboxout/PdfBoxForm.java#L363 <https://github.com/rototor/openhtmltopdf/blob/open-dev-v1-pdfbox-3.0.0/openhtmltopdf-pdfbox/src/main/java/com/openhtmltopdf/pdfboxout/PdfBoxForm.java#L363> to throw this exception:
java.lang.IllegalArgumentException: /DA is a required entry
at org.apache.pdfbox.pdmodel.interactive.form.PDDefaultAppearanceString.<init>(PDDefaultAppearanceString.java:78)
at org.apache.pdfbox.pdmodel.interactive.form.PDVariableText.getDefaultAppearanceString(PDVariableText.java:93)
at org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.<init>(AppearanceGeneratorHelper.java:115)
at org.apache.pdfbox.pdmodel.interactive.form.PDComboBox.constructAppearances(PDComboBox.java:82)
at org.apache.pdfbox.pdmodel.interactive.form.PDTerminalField.applyChange(PDTerminalField.java:210)
at org.apache.pdfbox.pdmodel.interactive.form.PDChoice.setValue(PDChoice.java:381)
at com.openhtmltopdf.pdfboxout.PdfBoxForm.processSelectControl(PdfBoxForm.java:363)
at com.openhtmltopdf.pdfboxout.PdfBoxForm.process(PdfBoxForm.java:807)
at com.openhtmltopdf.pdfboxout.PdfBoxPerDocumentFormState.processControls(PdfBoxPerDocumentFormState.java:179)
at com.openhtmltopdf.pdfboxout.PdfBoxFastOutputDevice.processControls(PdfBoxFastOutputDevice.java:299)
at com.openhtmltopdf.pdfboxout.PdfBoxFastOutputDevice.finish(PdfBoxFastOutputDevice.java:904)
Do you want me to create an Jira Issue for that?
All other tests run fine. But I did not yet inspect the generated files.
Greetings
Emmeran
Mit freundlichen Grüßen aus Augsburg
Emmeran Seehuber
Dipl. Inf. (FH)
Schrannenstraße 8
86150 Augsburg
USt-IdNr.: DE266070804
Re: PDFBox 3.0.0-RC1 future test results with openhtmltopdf
Posted by Tilman Hausherr <TH...@t-online.de>.
Am 03.04.2021 um 13:46 schrieb Emmeran Seehuber:
> The tests com.openhtmltopdf.nonvisualregressiontests.NonVisualRegressionTest#testInputWithoutNameAttribute, com.openhtmltopdf.testcases.CssPropertiesTest#testFormControls and com.openhtmltopdf.testcases.TestcaseRunnerTest#runTestcaseRunner causes the „field.setValue()“ on a PDComboBox inhttps://github.com/rototor/openhtmltopdf/blob/open-dev-v1-pdfbox-3.0.0/openhtmltopdf-pdfbox/src/main/java/com/openhtmltopdf/pdfboxout/PdfBoxForm.java#L363 <https://github.com/rototor/openhtmltopdf/blob/open-dev-v1-pdfbox-3.0.0/openhtmltopdf-pdfbox/src/main/java/com/openhtmltopdf/pdfboxout/PdfBoxForm.java#L363> to throw this exception:
>
> java.lang.IllegalArgumentException: /DA is a required entry
> at org.apache.pdfbox.pdmodel.interactive.form.PDDefaultAppearanceString.<init>(PDDefaultAppearanceString.java:78)
> at org.apache.pdfbox.pdmodel.interactive.form.PDVariableText.getDefaultAppearanceString(PDVariableText.java:93)
> at org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.<init>(AppearanceGeneratorHelper.java:115)
> at org.apache.pdfbox.pdmodel.interactive.form.PDComboBox.constructAppearances(PDComboBox.java:82)
> at org.apache.pdfbox.pdmodel.interactive.form.PDTerminalField.applyChange(PDTerminalField.java:210)
> at org.apache.pdfbox.pdmodel.interactive.form.PDChoice.setValue(PDChoice.java:381)
> at com.openhtmltopdf.pdfboxout.PdfBoxForm.processSelectControl(PdfBoxForm.java:363)
> at com.openhtmltopdf.pdfboxout.PdfBoxForm.process(PdfBoxForm.java:807)
> at com.openhtmltopdf.pdfboxout.PdfBoxPerDocumentFormState.processControls(PdfBoxPerDocumentFormState.java:179)
> at com.openhtmltopdf.pdfboxout.PdfBoxFastOutputDevice.processControls(PdfBoxFastOutputDevice.java:299)
> at com.openhtmltopdf.pdfboxout.PdfBoxFastOutputDevice.finish(PdfBoxFastOutputDevice.java:904)
>
> Do you want me to create an Jira Issue for that?
Yes
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
Re: PDFBox 3.0.0-RC1 future test results with openhtmltopdf
Posted by Tilman Hausherr <TH...@t-online.de>.
Am 03.04.2021 um 13:46 schrieb Emmeran Seehuber:
> - Breaking Change: setNonStrokingColor() and setStrokingColor() have no longer integer overloads. It will always call the float-versions and throw exceptions as the usual 0..255 int ranged values are outside of 0..1. That change is in so far bad, as it does not cause compile errors and just causes surprises. Have does int variants been deprecated?
I think I removed some of these... IIRC some had already been removed
earlier, some hadn't, so I removed the rest. Yeah it's annoying but it
would break immediately on the first run. This aligns with the idea that
PDFBox is low level, and in PDF color values are between 0..1.
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org