Bug 246196 - When filling in forms, make it possible to set the font size of the forms
Summary: When filling in forms, make it possible to set the font size of the forms
Status: CONFIRMED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
: 372581 420729 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-07-29 23:05 UTC by Michael
Modified: 2023-08-29 18:39 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
The example of wrong formatting of form texts (476.49 KB, image/png)
2013-06-19 07:17 UTC, Dan
Details
The form filled in the previous example (66.72 KB, application/pdf)
2013-06-19 07:18 UTC, Dan
Details
Hardcode a reasonable default max font size for form fields if autosize=on (3.54 KB, patch)
2016-10-09 00:15 UTC, Carl-Daniel Hailfinger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael 2010-07-29 23:05:58 UTC
Version:           unspecified (using KDE 4.4.5) 
OS:                Linux

When filling in forms using Okular, there is no way to change the font size. This is unfortunate because after the text fills up the form, the rest of the text is cut off.

Reproducible: Always

Steps to Reproduce:
1) Open document
2) Click on "Show Forms"
3) Fill in form

Actual Results:  
There's no way to change the font size and sometimes there isn't enough room to fit all of the text inside the form.

Expected Results:  
There should be a way to change the font size to ensure that your text can fit inside the forms.
Comment 1 Morten Sjoegren 2011-09-05 19:14:33 UTC
I can confirm this problem, I thinks poppler who is to blame since evince does the same thing.
Comment 2 qingping hou 2012-03-28 01:04:59 UTC
Confirmed under KDE 4.8.1, Okular 0.14.1. The font is too large when I was trying to fill one of my PDF file, which makes it unusable. :(
Comment 3 Dan 2013-06-19 07:17:18 UTC
Created attachment 80625 [details]
The example of wrong formatting of form texts

Confirming for okular 0.16.1 from KDE 4.10.2.

The texts were:
1st line:
Text, Speech and Dialogue. Proceedings of
the 16th International Conference TSD 2013, Plzen, Czech Republic,
September 2013

2nd line:
Vaclav Matousek et al

3rd line:
University of Vest Bohemia, Univerzitni 8, 30614Plzen
Comment 4 Dan 2013-06-19 07:18:00 UTC
Created attachment 80626 [details]
The form filled in the previous example
Comment 5 Tristan Miller 2016-01-04 10:42:03 UTC
*** This bug has been confirmed by popular vote. ***
Comment 6 Carl-Daniel Hailfinger 2016-10-08 19:19:56 UTC
In this bug, the form fields have no font size (size 0) specified, and no prerendered appearance exists for the fields in question.

Bug #363768 is related. In Bug #363768, the font size in the prerendered appearance /AP object is not used as a hint for font size selection. Given that solving this bug #246196 would also allow to work around bug #363768, I'm setting #246196 as blocker for #363768.
Comment 7 Luigi Toscano 2016-10-08 20:35:14 UTC
(In reply to Carl-Daniel Hailfinger from comment #6)
> In this bug, the form fields have no font size (size 0) specified, and no
> prerendered appearance exists for the fields in question.
> 
> Bug #363768 is related. In Bug #363768, the font size in the prerendered
> appearance /AP object is not used as a hint for font size selection. Given
> that solving this bug #246196 would also allow to work around bug #363768,
> I'm setting #246196 as blocker for #363768.

They are related, but you can solve 363768 without 246196. So no blocker, but I can fill the "See also" field.
Comment 8 Carl-Daniel Hailfinger 2016-10-08 23:23:15 UTC
Working on this... right now I can set a max font size for forms where the font size is not specified. No GUI, and still requires recompilation of libpoppler if you want a different size. Then again, that's probably a lot better than nothing.
Comment 9 Carl-Daniel Hailfinger 2016-10-09 00:15:09 UTC
Created attachment 101493 [details]
Hardcode a reasonable default max font size for form fields if autosize=on

This patch solves the immediate problem for me, but obviously hardcoding a max font size of 12 for all form fields with unspecified font size is not optimal for everyone.

Options are either a setting per form field, or a global setting. Given that most forms are designed for uniform font size, a global setting is probably sufficient and simplifies the UI.

If anyone knows poppler well enough to make this a settable attribute of the document instead of a hardcoded constant in two functions, please tell me.
Comment 10 Albert Astals Cid 2016-10-09 15:37:36 UTC
Please reviewboard.kde.org for patches
Comment 11 Carl-Daniel Hailfinger 2016-10-09 16:03:54 UTC
Which component?
Comment 12 Albert Astals Cid 2016-10-09 20:23:01 UTC
okular?
Comment 13 Albert Astals Cid 2016-10-09 20:23:28 UTC
Oh that's a patch for poppler, then what about using the poppler bugtracker?
Comment 14 Carl-Daniel Hailfinger 2016-10-09 20:51:38 UTC
Patch for poppler is now in https://bugs.freedesktop.org/show_bug.cgi?id=60836
Comment 15 Sebastian 2018-11-17 19:20:06 UTC
Migrated Bug report in poppler:
https://gitlab.freedesktop.org/poppler/poppler/issues/284

As far as I can tell and test the bug still exists and is not fixed yet.
Comment 16 Sebastian 2018-11-17 19:37:07 UTC
*** Bug 372581 has been marked as a duplicate of this bug. ***
Comment 17 Yuri Chornoivan 2020-04-29 06:05:12 UTC
*** Bug 420729 has been marked as a duplicate of this bug. ***
Comment 18 Shmerl 2020-06-07 21:16:36 UTC
So currently there is no way to change form font size in Okular? This truncation makes this feature rather broken.