I have tried flattening and it seems to clear the fields and leave them
empty and editable. L
I don't get it.
Kostas
From: Iliadis Yannis [mailto:ilyan...@gmail.com]
Sent: Monday, September 30, 2013 10:53 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Problem with fonts (?) in TextFields.
Hi,
Do you flatten your pdf? If not then use the setFormFlattening to true
e.g. stamper.setFormFlattening(true);
Unless you want to keep your pdf editable, then the above code will not work
for you.
Yannis
2013/9/30 Kostas <k...@dataverse.gr>
Hello.
Thanks for the answer, but this didn't seem to help. L
Kostas
From: Iliadis Yannis [mailto:ilyan...@gmail.com]
Sent: Thursday, September 26, 2013 4:53 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Problem with fonts (?) in TextFields.
Hi Kosta.
Try using BaseFont.NOT_EMBEDDED in your basefont creation and set the Subset
to true.
e.g.
bfont = BaseFont.createFont(UnicodePath, BaseFont.IDENTITY_H,
BaseFont.NOT_EMBEDDED);
bfont.setSubset(true);
Yannis
2013/9/26 Kostas <k...@dataverse.gr>
Hello.
I have a PDF where I add some TextFields.
var txtFld = new
TextField(stamper.Writer, new Rectangle(cRightX - cWidthX, cTopY3, cRightX,
cTopY), FieldNameProtocol) { Font = bf, FontSize = cHeaderFontSize,
Alignment = Element.ALIGN_RIGHT, Options = PdfFormField.FF_MULTILINE };
stamper.AddAnnotation(txtFld.GetTextField(), 1);
The 'bf' above is a Unicode font that gets embedded in the PDF:
BaseFont bf =
BaseFont.CreateFont(UnicodeFontPath, BaseFont.IDENTITY_H,
BaseFont.EMBEDDED); // Create a Unicode font to write in Greek...
Later-on I fill those fields with greek text.
var acrof = stamper.AcroFields;
acrof.SetField(fieldName,
field.Value/*, field.Value*/); // Set the text of the form field.
acrof.SetFieldProperty(fieldName, "setfflags", PdfFormField.FF_READ_ONLY,
null); // Make it readonly.
When I view the PDF, most of the times the text is missing and if I click on
the (invisible) TextField in Acrobat, then the text becomes visible (until
it loses focus again).
Any idea what is going on here?
Thanks in advance,
Kostas
----------------------------------------------------------------------------
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471
<http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
> &iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a
reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php
----------------------------------------------------------------------------
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471
<http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
> &iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a
reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php