Skip to content

Commit 0be99b6

Browse files
committed
Remove limitation on font-size writing in PdfCanvas
This check originated from iText 5, where it was statedthat some viewers might crash because of the too small font-size. However it's convenient to write /DA key for acro fields via PdfCanvas and in this content zero font-size is absolutely valid value. In general it seems that it's should be user responsibility to care of such things. DEVSIX-1916 DEVSIX-1861
1 parent 77ceb67 commit 0be99b6

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/src/main/java/com/itextpdf/kernel/pdf/canvas/PdfCanvas.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,6 @@ public PdfCanvas endVariableText() {
438438
* @return The edited canvas.
439439
*/
440440
public PdfCanvas setFontAndSize(PdfFont font, float size) {
441-
if (size < 0.0001f && size > -0.0001f)
442-
throw new PdfException(PdfException.FontSizeIsTooSmall, size);
443441
currentGs.setFontSize(size);
444442
PdfName fontName = resources.addFont(document, font);
445443
currentGs.setFont(font);

0 commit comments

Comments
 (0)