Re: [iText-questions] How can I get the font in my PDF to be Arial

2009-02-21 Thread David Thielen
Hi;
 
With some experimentation it appears that Acrobat prefers "Arial,Bold" to 
"Arial Bold" or "Arial-Bold" in setPostscriptFontName() for a bold style.
 
Is this correct?
 
thanks - dave
 



From: 1T3XT info [mailto:i...@1t3xt.info]
Sent: Thu 2/19/2009 4:20 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] How can I get the font in my PDF to be Arial



David Thielen wrote:
> Hi;
>
> 
>
> Ok, I've read through Chapter 8 again. And I've come up with the
> following 2 approaches to get a font for text I write to the PDF:
>
> FontFactory.getFont("Arial", BaseFont.IDENTITY_H, false, 12.0, 0);
> FontFactory.getFont("Arial", BaseFont.IDENTITY_H, true, 12.0, 0);
> FontFactory.getFont("Arial", "Cp1252", false, 12.0, 0);
> FontFactory.getFont("Arial", "Cp1252", true, 12.0, 0);
>
> And in each case the underlying BaseFont has a name of ArialMT. How can
> I get it to create a font with the name Arial?

See page 273:
fonts[5].getBaseFont().setPostscriptFontName("Computer Modern");
I did an extra trick in the last line of the code snippet. In the
previous chapter, the font is listed in the Fonts tab as CMR10 (see
figure 8.5). Instead of this acronym, I want a readable name to show up,
so I changed it to Computer Modern. The font appears in the Fonts tab
with this name (see figure 9.10).

> This is an issue for one of our customers because when they use the text
> touch-up tool afterwards it tells them that it cannot find the font
> ArialMT on their system, although they do have Arial.

If the answer was helpful, please consider becoming a customer of
iText Software LLC ;-)
--
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info  

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php


<>--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Re: [iText-questions] ClassNotFound exception when executing HelloWorld program

2009-02-21 Thread 1T3XT info
preeti0...@gmail.com wrote:
> 
>> "Could not find the main class: HelloWorldPDF"
>> means you don't even have your own app in your Java CLASSPATH.
> 
> All java apps other than the iText examples are compiling and executing 
> properly

The same goes for iText examples on my side.

> for HelloWorldPDF.java also I had compiled as
> javac -classpath /path to itext.jar  HelloWorldPDF.java
> and it had compiled without any error

Compile: yes, but when you run HelloWorldPDF, you need 
HelloWorldPDF.class to be reachable from somewhere in your CLASSPATH.

>> NoClassDefFoundError: com/lowagie/text/Element
>> may be an indication that you are using a JDK older than the
>> one used to compile iText.
>  
> I am using JDK 6

OK, then there should be no problem.

> I had checked in the FAQs but could not find any with such a basic doubt as 
> mine.That is why I had posted in the forum.Sorry if it is not meant to be 
> posted here. :)

Your problem is a very basic JAVA problem; it's not related to iText. 
(Unless of course you are using the wrong jar, but even then, it's not 
an iText problem.)
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php


Re: [iText-questions] ClassNotFound exception when executing HelloWorld program

2009-02-21 Thread 1T3XT info
Preeti Chakravarti wrote:
> Could someone please tell me what is wrong?

The main thing that is wrong, is that you are new to Java.
Please don't try to run before you can walk.

"Could not find the main class: HelloWorldPDF"
means you don't even have your own app in your Java CLASSPATH.

NoClassDefFoundError: com/lowagie/text/Element
may be an indication that you are using a JDK older than the
one used to compile iText.

These are pure Java problems, they aren't iText related.
Please read a book about Java first.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php