Open reingart opened 1 year ago
Hi, fpdf2
maintainer here 😊
Thank you for making this compatibility test and sharing the results.
Regarding this ValueError: I is not a valid Align
, I don't understand how this can be a valid value for align
...
I don't see it documented anywhere, or even appearing in the code of https://github.com/reingart/pyfpdf.
I think it must fall in the else
case there: https://github.com/reingart/pyfpdf/blob/master/fpdf/fpdf.py#L760
If you have an explanation for the meaning of this value of align='I'
, we could consider adding backward-compatible support for it in fpdf2
. But right now it seems more relevant to fix https://github.com/PyAr/pyafipws code to get rid of this strange value of align='I'
😅
Late to the party, but anyway...
align="I"
is obviously a client-side bug, and was probably meant to read align="J"
.
On the library side, silently ignoring an invalid parameter value - as the legacy version does - should also be considered a bug.
Fix both bugs, (and any similar ones that may come up), and the transition should proceed rather smoothly.
For your convenience: A List of API differences between PyFPDF and fpdf2
To bump fpdf library some changes are needed as new version is backward incompatible
Errors
python pyfepdf.py --prueba
Proper Unit Test should be written comparing current PDF with the one generated by the new library