[
https://issues.apache.org/jira/browse/PDFBOX-1419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990924#comment-13990924
]
Akshay Rawat edited comment on PDFBOX-1419 at 5/6/14 7:06 PM:
--------------------------------------------------------------
Is there a fix for this?
Setting a font size like this:
{code:borderStyle=solid}
pdfFormField.getDictionary.setString(COSName.DA, "/Helvetica 10 Tf 0 g”)
{code}
causes the behavior mentioned above
_Starts out with incorrect font size. If I click into the field, it displays
correctly. Click outside the field, it reverts back to the wrong display._
I've also asked this question here -
http://stackoverflow.com/questions/23501637/set-a-pdfformfields-value-with-a-specific-font-size
Any help would be much appreciated. Thanks.
was (Author: akshayrawat):
Is there a fix for this?
Setting a font size like this:
{code:borderStyle=solid}
pdfFormField.getDictionary.setString(COSName.DA, "/Helv 10 Tf 0 g”)
{code}
causes the behavior mentioned above
_Starts out with incorrect font size. If I click into the field, it displays
correctly. Click outside the field, it reverts back to the wrong display._
I've also asked this question here -
http://stackoverflow.com/questions/23501637/set-a-pdfformfields-value-with-a-specific-font-size
Any help would be much appreciated. Thanks.
> PDField.setValue is not behave correctly
> ----------------------------------------
>
> Key: PDFBOX-1419
> URL: https://issues.apache.org/jira/browse/PDFBOX-1419
> Project: PDFBox
> Issue Type: Bug
> Components: Writing
> Affects Versions: 1.7.0
> Environment: JavaEE 1.6 project developed under Window system, will
> deploy to Unix Weblogic server
> Reporter: Joe Lee
>
> Use a template PDF file to write value into different fields (type of
> PDTextbox, PDCheckbox, PDChoiceField). The PDTextbox displays either very
> large font or not show anything. If click into the field, it displays
> correctly. Click outside the field, it reverts back to the wrong display. The
> same logic of code works well with iText library. The code similar to:
>
> PDFTemplate = PDDocument.load("myTemplate.pdf");
> PDDocumentCatalog docCatalog = PDFTemplate.getDocumentCatalog();
> PDAcroForm acroForm = docCatalog.getAcroForm();
> :
> try { PDField pdField = acroForm.getField(field);
> if (pdField != null) pdField.setValue(value);
> } catch(...){}
> :
--
This message was sent by Atlassian JIRA
(v6.2#6252)