Add possibility to adjust the font size for PDF form filling
Andy Sardina
andysardina22 at gmail.com
Tue Jul 23 11:46:59 BST 2024
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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20240723/6bd4a030/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: form-show.png
Type: image/png
Size: 254322 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20240723/6bd4a030/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: form-hidden.png
Type: image/png
Size: 246738 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20240723/6bd4a030/attachment-0003.png>
More information about the Okular-devel
mailing list