Do the fields need to be editable after you are done filling in the data? If
not, then you can use flattening and the methods described earlier to achieve
what you want.
From: Wyatt Biker [mailto:[email protected]]
Sent: Sunday, February 13, 2011 3:45 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] PDFReader getPageContent() method returning
weird escape codes
This is what I need to do.
I am displaying the field names from a PDF as prompts in my application. The
user enters information, saves and then views the PDF file.
I need to give them the option to space out the text that was entered in case
they don't like they look of it. For example make wider spaces on between
characters and then preview again.
They may want to also change the font, color, position, etc which I see there
are methods to do that.
Basically I am looking for something like a pseudo method
setFieldKerning("Name",pos1, pos2, kernValue)
How can i do this?
On Sun, Feb 13, 2011 at 4:46 PM, Leonard Rosenthol
<[email protected]<mailto:[email protected]>> wrote:
If you are not flattening the field, then you can't manually set the kerning.
It's not part of the PDF spec for form fields.
What sort of system are you building that requires manual kerning (as opposed
to using the kerning tables in the font)?
Leonard
From: Wyatt Biker [mailto:[email protected]<mailto:[email protected]>]
Sent: Sunday, February 13, 2011 10:30 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] PDFReader getPageContent() method returning
weird escape codes
The file is not flattened, so no problem there. But I am a little confused.
I need to manually allow the user to modify the kerning of the text inside the
field. I don't see in Ch 8 how FieldPosition would help. I guess I am looking
for a method that sets the kerning of the text that is used on the field.
I tried using getKernArray(text, bf) but I didnt see any set kern information.
Do I manully adust the array returned below?
PdfTextArray pdftxtarr= PdfContentByte.getKernArray(acr, bf);
Thanks
On Sun, Feb 13, 2011 at 10:17 AM, 1T3XT BVBA
<[email protected]<mailto:[email protected]>> wrote:
Op 13/02/2011 15:39, Wyatt Biker schreef:
> 1) Is it possible inside a field's content to set the kerning between
> characters ?
It depends: if you fill out the field without flattening, then an
appearance is created automatically. Kerning isn't used, not in the
appearance, not when the end user changes the text field manually.
If you want to flatten the field, then setField() won't result in kerned
characters. You can work around this, by getting the field positions (as
is done in chapter 8) and adding the content with the
showTextAlignedKerned() method.
> 2) How is tracking done?
Kerning is done automatically, based on the info found in the font.
Tracking isn't done automatically. If you position the text using the
methods of chapter 14 (text state), you'll have to do the math, and use
the methods that allow you to fine tune the word and character spacing.
Or you can use Text Arrays (arrays consisting of strings and numbers.
The numbers are measurements for the space between the strings). All
these methods are listed in chapter 14.
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
iText-questions mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/itext-questions
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
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
iText-questions mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/itext-questions
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
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
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