Summary: | PDF Interpreter : Not handled Acroform flag "NeedAppearances" | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Elamathi <mathi> |
Component: | PDF Interpreter | Assignee: | Alex Cherepanov <alex> |
Status: | NOTIFIED FIXED | ||
Severity: | enhancement | CC: | alex, mathi, ray.johnston |
Priority: | P3 | ||
Version: | 8.14 | ||
Hardware: | All | ||
OS: | Windows 2000 | ||
Customer: | Word Size: | --- | |
Attachments: |
sample pdf giving problem
patch |
Description
Elamathi
2004-06-03 02:04:01 UTC
Created attachment 699 [details]
sample pdf giving problem
Ghostscript doesn't handle this, nor does xpdf. This is an enhancement that we may get to some day. If someone wants to pay for the development of this feature, we will do this, since it may be useful to others. The action that is needed for this case (/Tx == Text Field) is: for each object in the Annots entry of the /Page object if Annot, SubType Widget has a /Parent that is a member of the Fields object of the AcroForm object of the Catalog, then Display the /V (value) text using the /DA (default appearance) setup to the graphics state General handling of other /FT values such as /Btn == button, /Ch == Choice and /Sig == Signature require different handling. I haven't investigates these. This is an extension to the /drawannot procedure defined in lib/pdf_draw.ps and probably isn't too terribly difficult for someone knowledgeable about the PDF interpreter implementation such as myself or Alex (alexcher@coscript.com). Created attachment 1615 [details]
patch
Ray,
This is a 1st version of the fix. Please review the general structure of the
program, such as formatting the text in a new text rendering operator.
Although the customer's file renders identically to Adobe Acrobat,
there are many things that are not yet coded.
1. Other types of annotations
2. XML formatting
3. Multi-line text fields
4. Combed text fields
5. Right-aligned or centered text with non-0 word and character spacing
6. Automatic font size selection
Item 6 causes incorrect rendering of the sample file attached to this bug
bug 587498.
The patch mainly good except few minor things. 1. Please replace dash with underscore in names according to Ghostscript tradition. 2. Not clear why undef is applied to draw-terminal-field-dict and isn't applied to draw-form-field, draw-terminal-field. If it doesn't cause a regression, please commit with minor changes and with qouting Comment #4 in the log message. Assigning the bug to Alex since Ray passed it to me. An improved path that supports automatic font size selection has been committed as rev. 7878. The sample file now renders correctly. Ghostscript generates many warnings that indicate real problems with the file: - 0 text size is permitted in the AcroForm fields but not in regular anniotations. - The file has unbalanced Q and q operators. |