Expand my Community achievements bar.

SOLVED

How to center chars inside of cells of the comb field (text field)?

Avatar

Former Community Member

Hello gurus,

[Intro]

I'm working on preparation of the legal form for tax return.  Due to sophisticated form structure and customer's demand to prepare return of enourmous size (more than thusand pages) I decided to remake obsolete form using "comb of" option in order to reduce size of the source and prevent memory allocation issues on customer side.

[Issue details]

Legal requirement is to have typeface Courier New 16pt-18pt and cells of the certain size.

This is how the form provided by tax authorities looks like:

adobe1.png

Here you can see that chars are somehow centered inside of the cells but when I create comb in my livecycle designer it is not the case and I have different layout:

adobe2.png

Look how letters are placed inside of the cells. After some research I've found out that there is a left margin which always exists in every cell of the comb, most probably triggered by the border. Tried to edit XML source but didn't achieve any significant success. The issue is not caused by the narrowness of the cells and reproductible even with extra wide ones.

Here is my current XML:            

          <field h="5.7mm" name="STR_230_TOT_TX" w="60mm" x="4.264278in" y="4.458417in" anchorType="middleCenter">

               <ui>

                  <textEdit hScrollPolicy="off">

                     <border hand="right">

                        <edge stroke="dotted"/>

                        <corner stroke="dotted" thickness="0.176mm"/>

                     </border>

                     <margin bottomInset="0mm" leftInset="0mm" rightInset="0mm" topInset="0mm"/>

                     <para hAlign="left" vAlign="top"/>

                     <comb numberOfCells="15"/>

                  </textEdit>

               </ui>

               <font size="16pt" typeface="Courier New"/>

               <margin bottomInset="0mm" leftInset="0mm" rightInset="0mm" topInset="0mm"/>

               <bind match="dataRef" ref="N140_TAX_AMOUNT"/>

               <assist>

                  <speak disable="1"/>

               </assist>

            </field>

This is how comb field is supposed to be rendered (screenshot from the documentation):

adobe3.png

Everything is centered and it is a behaviour I supposed to see.

Are there any possible solutions how to place chars at center of the cells?

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi Igor,

It's the font that you are using that causes the problem. 

I found it weird, your problem, so I quickly made a form with a text field with a comb.  I did not have the problem.

So I took your snippet and added it to my form, then I have the same problem.  You are using Courier New, a font that has the same width for all characters.  I don't know why the problem is there as for me it should be in the center as with all other fonts.  I would report this as a bug to support.

I know it's not a solution for you, but that seems to be the root of the problem.  Maybe you can look for another font, similar to Courier New, but that does not have a fixed width.  I looked it up and it appears that there's a font called Hellschreiber, that uses the same letterforms, but is proportional.  The font is not freely downloadable, so I cannot test for the moment.  Another page says this: "There is a proportional font that kinda looks like Courier. It is called American Typewriter. "  Again, I have not tested.

http://en.wikipedia.org/wiki/Courier_(typeface)

View solution in original post

5 Replies

Avatar

Correct answer by
Level 2

Hi Igor,

It's the font that you are using that causes the problem. 

I found it weird, your problem, so I quickly made a form with a text field with a comb.  I did not have the problem.

So I took your snippet and added it to my form, then I have the same problem.  You are using Courier New, a font that has the same width for all characters.  I don't know why the problem is there as for me it should be in the center as with all other fonts.  I would report this as a bug to support.

I know it's not a solution for you, but that seems to be the root of the problem.  Maybe you can look for another font, similar to Courier New, but that does not have a fixed width.  I looked it up and it appears that there's a font called Hellschreiber, that uses the same letterforms, but is proportional.  The font is not freely downloadable, so I cannot test for the moment.  Another page says this: "There is a proportional font that kinda looks like Courier. It is called American Typewriter. "  Again, I have not tested.

http://en.wikipedia.org/wiki/Courier_(typeface)

Avatar

Former Community Member

First of all I would like to thank you for your response.

In my case I'm very limited with opportunities to change the typeface because I'm working on a machine-readable form and Courier New is set in law on which the form is based in. It will be huge issue if tax authorities will reject the form because of different typeface. Thank you for the proposal, I'm going to consider it.

Many legal forms in Russia should be filled using font Courier New and it is actually a big problem if livecycle designer have this bug for that font.

Avatar

Level 2

You are welcome. 

Probably there is going to be a scan with OCR ?  If that is the case, tax authorities should actually consider using barcoded forms.

If I were you, and you have access to enterprise support from Adobe, I would report this.  Maybe they have another solution.

Avatar

Former Community Member

I will definitely do it. Since I use corporate account in huge company it takes significant time. Thank you for your support again.

Avatar

Level 2

Tell them I told you to contact them.  I hope they still remember me  :-)