incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 114010] Text entry Fields too small in forms exported to PDF
Date Fri, 15 Jun 2012 18:47:38 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=114010

--- Comment #18 from Fulvio <zydio@users.sf.net> ---
Created attachment 78344
  --> https://issues.apache.org/ooo/attachment.cgi?id=78344&action=edit
Set of problematic and gradually fixed ODT and PDF made with OOo 3.2, OOo 3.4
and manual edits

I've tried to make sense of this bug today, while working with and comparing
results of tests made in parallel with Apache OpenOffice 3.4 and OpenOffice.org
3.2 (both on Windows)..and I've observed the following facts:

1) There are at least two distinct problems: one related to font sizes and the
other to text alignment

2) The problem depends little on the OOo version exporting the file to PDF. It
seems to be strictly dependant upon the content of the ODT file itself (more on
this later)

3) If you have a "proper" ODT file, the exported PDF file looks like almost
(while still not 100%) the same in all recent OOo versions (>= 3.2)

4) Both problem seems to be due to a change in how missing style values
(defaults) inside the ODT are dealt with in different OOo versions.


1a) THE ALIGNMENT ISSUE
=======================
When you added Text Edit Fields with OpenOffice 3.2, it didn't write two
attributes inside the style:style/style:graphic-properties tag (reference
inside the draw:control property "draw:style-name"), that OpenOffice 3.4
instead writes by default inside the ODT.
The properties are: draw:wrap-influence-on-position="once-concurrent"
style:flow-with-text="false"

If you manually edit the content.xml of the ODT posted by uwslothman
(https://issues.apache.org/ooo/show_bug.cgi?id=114010#c8) to add those
properties, and export the file to PDF with OOo 3.4 you get (almost) the same
result as the original file exported with OOo 3.2.

What does this mean to me? 
--------------------------
It means that OOo 3.2 automatically applied the
wrap-influence-on-position="once-concurrent" and flow-with-text="false"
properties if they were missing inside the ODT (and they were missing by
default for fields added in OOo 3.2), while OOo 3.4 doesn't automatically apply
those properties (neither during the export nor saving the ODT) if they are
missing inside the ODT (and they wouldn't be missing if the field were added in
OOo 3.4).

Conclusions
-----------
Once a field is added in OOo 3.2 will not be exported fine in later versions
until it is:
- deleted and added again in that later version
- someone finds what UI actions are needed to make OOo 3.4 add those properties
inside the ODT
- the content.xml is edited by hand to add those properties



1b) THE FONT SIZE ISSUES
========================
1a.I) If you have an ODT created with OpenOffice 3.2 (where you didn't
customize the font) and you export it with OpenOffice 3.4, the text inside the
Text Edit Fields will display differently compared to the PDF exported by
OpenOffice 3.2.
1a.II) And, if you create a new ODT with OpenOffice 3.4 the text inside the
Text Edit Fields is almost unreadable (truncated at the top).

When you added Text Edit Fields with OpenOffice 3.2, it didn't write three
attributes to the style:style/style:text-properties tag (reference inside the
draw:control property "draw:text-style-name"), that OpenOffice 3.4 instead
writes by default inside the ODT.
The attributes are: font-size, font-weight and font-name.

Origin and workaround for the size issue
----------------------------------------
1a.I) This is again due to OpenOffice versions handling differently the missing
tag attributes inside the ODT. While OOo 3.2 used something like Arial 9pt by
default if the font attributes were missing, OOo 3.4 uses the Default Font that
is SegoeUI 9pt (at least on my system!). Manually specifying the font solves
the problem.
1aII) The default OOo 3.4 font is Arial 14pt which is way too big to fit inside
a Text Edit Field spanning only one line (svg:height="0.5cm"). Manually
specifying a smaller font (even Arial, but with a font size of 8pt or 9pt)
solves the problem.

Comments
--------
I think that newer OOo versions should use a smaller font by default, or
determine a proper font to fit the Text Box when it gets resized
(proportionally to its height).



ATTACHMENT INFO
===============
I've made a zip with a few ODT an PDF I used to make the tests.

1a) The Alignment Issue folder inside the zip contains uwslothman's original
ODT and problematic PDF, and an EDITED one were I manually added the missing
properties inside the content.xml, and PDF export from the edited PDF with both
3.2 and 3.4 versions.
1b) The Font Size Issue folder contains a series of incrementally modified
documents:
  1 => Created with OOo 3.4, with a single field
  2 => Added a field with OOo 3.2 and exported to PDF with both versions: both
PDF look wrong.
  3 => Changed the first field font with OOo 3.4 and exported the file.
  4 => Changed the font to both fields with OOo 3.4 to be specified (not
undefined), and exported with both versions: the PDF looks the same!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Mime
View raw message