Add possibility to adjust the font size for PDF form filling
Albert Astals Cid
aacid at kde.org
Tue Jul 23 23:11:23 BST 2024
El dimarts, 23 de juliol del 2024, a les 12:46:59 (CEST), Andy Sardina va
escriure:
> Hi,
>
> I have used Okular recently to fill a PDF form and I haven't found a way
> (in the UI) to adjust the font size for text fields. This is a problem
> because for some text fields, specially the ones where one has to write an
> address, even if the text fits perfectly in the Okular::FormLineEdit, when
> it gets rendered, the text could be cut.
>
> For example:
>
> [image: form-show.png]
>
> but when the form is hidden:
>
> [image: form-hidden.png]
>
> The problem seems to be that the font (and font size) for the
> Okular::FormLineEdit is different from the one in the Default Appearance
> (DA) in the PDF.
>
> My proposal is to take advantage of the method
> Poppler::FormFieldText::setTextFontSize to adjust the font size in
> the PopplerFormFieldText (Poppler Generator).
>
> Ideally, Poppler::FormFieldText could have a member function that returns a
> pointer (to avoid duplicating the same object if many text files share the
> same font) to
> the font defined in the DA (implies changes in Poppler itself). This font
> can then be used on the constructor of Okular::FormLineEdit to "sync" both
> fonts.
>
> What do you think? Is this a change that could be accepted?
Setting the font & font size is possibly a valid feature, we do that already
for annotations so i don't see why we would not do it for Forms.
What you suggest of sharing pointers between poppler and okular, that's
possibly a bad idea.
Cheers,
Albert
More information about the Okular-devel
mailing list