Now it couldn't display the symbol № outside of forms (small problem but
annoying)…
I have tried this but it created more problems:
bf = BaseFont.CreateFont(UnicodeFont, "CP1253",
BaseFont.EMBEDDED); // Selecting Greek code-page is needed, because
IDENTITY_H doesn't select the correct code-page.
bf.AddSubsetRange(new int[]{0x2018, 0x2265}); //
Lets include some useful symbols. <--------------------------------
bf.Subset = false; // This will force the embedding
of the whole font file.
bf.CompressionLevel = 9; //the compression level (0
= best speed, 9 = best compression, -1 is default)
setSubset
public void setSubset(boolean subset)
Indicates if all the glyphs and widths for
that particular encoding should be included in the document. When set to
true only the glyphs used will be included in the font. When set to false
and addSubsetRange(int[]) was not called the full font will be included
otherwise just the characters ranges will be included.
Finally, I used "CP1253" for forms and Identity_H for the document body.
I would expect everything to work fine with only one of them, without the
document place (body or field) to play any role, but it seems things are
more complicated… :-(
-----Original Message-----
From: Kostas [mailto:k...@dataverse.gr]
Sent: Monday, January 13, 2014 4:40 PM
To: 'Post all your questions about iText here'
Subject: Re: [iText-questions] PDF fields not rendering correctly on Acrobat
Reader
OK, people!
Here is what was wrong:
Changing this:
var bf = BaseFont.CreateFont(UnicodeFontPath, BaseFont.IDENTITY_H,
BaseFont.EMBEDDED); ..into this:
var bf = BaseFont.CreateFont(UnicodeFontPath, "CP1253", BaseFont.EMBEDDED);
..solved the problem. Apparently, IDENTITY_H selects the code-page that it
THINKS is appropriate and doesn't embed all code-pages...
Now, with the Greek code-page selected, the field supports both Greek and
English!
(Can someone explain to me why " BaseFont .IDENTITY_H", " BaseFont .CP****"
and the rest of the enumerable values are not implemented with enumerations?
I think that would make your LIB way more easy to use.)
----------------------------------------------------------------------------
--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical
Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&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
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&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