We're currently working on filling PDF forms in our software and we seem to have found a few bugs related to rendering of vertical form fields.
I have attached the source PDF file I created to illustrate the issue, the results after filling the values programmatically, and also the results after filling the values programmatically and flattening the resulting file. The issues are illustrated separately on each page.
Page one contains 3 text fields that are set to be on 90 degree orientation, and Helvetica size 40 font. All three fields are marked read only. As you can see in both the regular and flat results, the text renders horizontally. Note that all three fields have the same name ("VERTICAL").
Page two contains 3 text fields that are also set to be on 90 degree orientation, and Helvetica size 40 fonts. However, these fields are NOT marked as read only. As you can see in the results. These actually seem to render fine and were included to demonstrate that the bug seems to be happening only on read-only fields and flattened fields (more on this later).
Page three has 2 text fields, both have 90 degree orientation and Helvetica size 40 font. The first one ("VERTICAL-REG") is not marked as read-only. The second one ("VERTICAL-RO") is marked read only. For some reason both of them display differently from the ones in page 1 and 2. If you notice, it looks like Aspose internally changed the font size to "Auto" and then tried to render the text so that it would fit on the field's width instead of the height (since it's a vertical field after all). What I find interesting on this case is that it seems to be handled differently than when fields have the same name.
I expected all three cases to display the "This text should display vertically" text in 40 Helvetica font, vertically. As you can see, none of the test scenarios I'm providing are displaying as expected.
This gets further confusing when we flatten the file. If you take a look at the flat output file, you'll notice that the text in page 1 and page 2 are both being rendered horizontally. The text in page 3 is rendering consistent with the results we got from the first tests. Please keep in mind that the fields in page 3 have different names, as opposed to the fields in page 1 and 2.
In conclusion I believe there are issues with the following:
- Rendering vertical text horizontally when the fields are set read-only or flattened, and also share a field name with another field.
- Rendering vertical text in the wrong size, as if it were set to "Auto" font size (and then also incorrectly taking the width into account instead of the height).
We need to be able to fill text fields this way (vertical, read-only or flat) because of a requirement in our products and the resulting PDFs. We didn't have these issues with the previous PDF filling library we were using before we converted our products to use Aspose.Pdf.
The C# code we use to fill the values is very straight forward and only contains code to fill in the values (meaning we don't mess with formatting, nor orientation in code). Any help would be greatly appreciated considering that we're nearing the final days of our evaluation license and we need to know if Aspose.Pdf is the right product for our use case.
Thanks!