On 15/09/2012 22:23, krisniru wrote:
> Please provide
> us some solution whether we can achieve this with out registering the
> secured font in the PC. We are not worried if the actual pdf contains the
> text "abc".
Please understand that you're NOT a CUSTOMER, so we have NO OBLIGATION
WHATSOEVER to help you with this. May I ask you to stop bossing us
around and READ the answers!
I told you that:
(1) It is a FALSE ALLEGATION that you need a path to a font, you can
serve bytes to create a BaseFont. However: you don't have the font
program, so that's not an option.
(2) I explained with hand and feet that you need at least FONT METRICS
to solve your problem. This doesn't mean you need the font program of
the 'secret font'. If you expect to be able to create a PDF using an
unknown font WITHOUT providing font metrics, stop dreaming! You won't
find any software that can do that.
If you didn't understand the answer that was given, please look at this
code sample:
BaseFont secureFont = BaseFont.createFont(path_to_afm, "",
BaseFont.NOT_EMBEDDED);
pdfContentByte.beginText();
pdfContentByte.setFontAndSize(secureFont, 14);
pdfContentByte.setTextMatrix(100, 100) ;
pdfContentByte.showText("abc");
pdfContentByte.endText();
The path_to_afm refers to an AFM file. This is NOT a font program, this
is a file containing the font metrics. That is the MINIMUM information
needed to be able to create a PDF.
If you don't have an AFM file, CREATE ONE based on the spec:
http://www.aiim.org/documents/standards/PDF-Ref/References/Adobe/5004.AFM_Spec.pdf
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
iText-questions mailing list
[email protected]
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