Re: [iText-questions] v2.x continuity

2010-09-23 Thread Christoph Wagner
 And for what... the price for a license of iText? What corporation
 would
 balance the potential for multi-hundreds of thousands of dollar lawsuit
 against $2000 or whatever it might be. It will cost the company more
 than $2000 in legal fees to review the LGPL and its use in iText.

The problem here is that iText is much more expensive if someone want to
ship it with a native client application installed on several thousand
computers where the PDF printing is just a little feature of thousands of
others. It would be no problem to pay 2000$ for a general license but the
current license scheme is ridiculous because it would force license buyers
to report number of client installations back to you which are then used to
come up with the amount of money to pay.
That's simply not acceptable for such a small library. For example the xPDF
library which renders PDF on any imaginable platform (and contains much more
complicated code than iText) is a one-pay 1500$ lib with no further
restrictions (OEM). If the same would apply for iText I would be happy to
pay but with the current licensing scheme: no thanks...
Another thing to keep in mind: the responses on this list on bug reports or
questions are usually one of these:

1. Buy the book without any further explanation or just a short hint where
to find something
2. You are using the old version, we won't help you because of that
3. Sometimes no response at all

This behavior does not match the price point of your lib and really does not
encourages one to buy.

Just my 2c,
Campus





--
Nokia and ATT present the 2010 Calling All Innovators-North America contest
Create new apps  games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] v2.x continuity

2010-09-23 Thread Christoph Wagner
  xPDF library which renders PDF on any imaginable platform (and
  contains much more complicated code than iText)

 [Erik Pfingsten] Have you actually looked at the source code for both
 projects.  They both looked pretty complicated to me.  Your statement
 that xPDF contains much more complicated code than iText is spurious
 at best.  Not to mention, xPDF is (gross over-generalization) for
 viewing PDF’s, iText is for creating PDF’s.  Not saying one is simpler
 than the other, but it’s like comparing LCD Screens and Digital
 Camera’s (I would have said apples and oranges, but that seems s
 20th century :-)

Yes I have worked with both sources. I have written several fixed for iText
and also fixed some stuff in xPDF (which is C++). Rendering PDF is really
much more complex than writing PDF. Just try to find a PDF renderer
somewhere that actually works... AFAIK there are only two libs available
that really work: xPDF and Adobes library. All the others are either
horribly slow, or buggy. Try to render encrypted Unicode PDFs with Korean
text, large bitmaps or similar content to see incredible differences. I was
trying to say that writing a PDF generator is not rocket science (because
there is a well written PDF doc and it's simply a text generator) and
writing a renderer is much harder. Compare that with XML. Writing XML is not
hard, parsing is (without using any lib). That's not a negative point about
iText, it should just illustrate that the price point of iText is IMHO too
high for small companies.

  is a one-pay 1500$ lib with no further restrictions (OEM). If the
 same
  would apply for iText I would be happy to pay but with the current
  licensing scheme: no thanks...

 [Erik Pfingsten] Looking at xPDF's purchase page
 (http://www.glyphandcog.com/buy.html), you need developer licenses AND
 Run-Time licenses. 

As I said we bought an OEM license for ~1500$ for unlimited distribution and
source code. No reason to count client installations.

 [Erik Pfingsten] You say xPDF has $1500 license for OEM's?  Have you
 actually contacted iText Commercial to see what they would charge?
 Maybe they have a large volume OEM type license available too (oh
 wait…what’s this? http://itextpdf.com/terms-of-use/index.php).

We would need licence of type 2, 3a, 3b. According to
http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg50873.h
tml
you have to pay 3000$ for 250 client installations (which would only cover
our need for type 3b). In the end for our need this seems to be a five
figure number and is therefore out of any relation to the given value. Not
to mention that you would have to build extra software just to count client
installations and send those numbers back. From my point of view any license
that forces you to count client installations or users or similar things is
simply not working for boxed software.

  1. Buy the book without any further explanation or just a short hint
  where to find something
 [Erik Pfingsten] or a pointer to the source code examples on the
 website that you can look at, not to mention the api documentation,
 sample chapters. Oh, and more often than not, an actual solution in the
 email response

For example
http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg52731.h
tml
Usually you don't get a link to an example or the documentation just a hint
where in the book the topic could be found.

  2. You are using the old version, we won't help you because of that
 [Erik Pfingsten] Last time I checked, Microsoft doesn’t offer support
 for Windows 3.1 eithe

So iText 2.x (which was the current version a year ago) is like Win3.1
(which died 15 years ago) for you?

  3. Sometimes no response at all
 [Erik Pfingsten] really, I’ve never seen a question that wasn’t
 answered at some point

http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg53101.h
tml
http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg53017.h
tml
http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg52958.h
tml
http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg52682.h
tml

  This behavior does not match the price point of your lib and really
 does not encourages one to buy.
 [Erik Pfingsten] My understanding has always been that this list is for
 support of the “free” iText (for lack of a better way to put it).  I
 believe that Commercial users (companies that buy licenses) get
 priority support through a support contact.

But it makes a bad impression if the free mailing list is treated like a
normal OSS mailing list but is meant to promote the expensive commercial
product.

 But to put it bluntly…to say that the responders on this list are not
 helpful (which is the essence of your argument), is a load of crap

I did not say that at all. I just said that a company that wants to sell
their product needs a professional support list as well (even if it's for
the free part). Selling a book as an answer for a list question 

Re: [iText-questions] What action is requred in terms of License

2010-04-22 Thread Christoph Wagner
Hi,

 The license fees were magnitudes beyond the complete
 project budgets with very strict obligations. I am really willing to
 obtain a license and to pay several 100 $ for it and I find it
 absolutely ok for the developers to earn money with their fantastic
 library. But: The current license fees are affordable for big
 industries only. I already thought about stopping to use iText or to
 stick with 2.1.7. After all,within my programms  this is only a small
 component for generating reports in order to show the results of
 computation processes. I think, there are a lot of small projects and
 developers who are in the same situation. If there is another way, I
 would appreciate this very much, and as I said: I really like your lib
 and I am really willing to pay for it. But I can't invest 150% of the
 whole budgets on the reporting component only, and I am not willing to
 report the number of distribution number several times a year. Have you
 ever thought about single developer licenses with no fees for
 redistribution?

That's an interesting topic. Just being curious: What's the amount to pay
for a commercial iText license? We had the same problem and decided to fork
iText 2.1.7. We are also heavily working on that base trying to refactor all
these bad little things out of the code and applying additional fixes. I
would happily pay some money to get a lib and support but with the currently
non-existent professional support for iText asking for money does not
represent the state of the project at least to me.


Just my 2c,
Campus




--
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Re: [iText-questions] Umlaut problem with SnowLeopard font

2010-02-15 Thread Christoph Wagner
Hi everyone,

I debugged the problem and I was able to locate the bug in iText. The cmap
parsing code in TrueTypeFont.readCMaps() does not handle Mac Unicode ttf
correctly. Adding that fixes the problem for me.

Thanks for your help,
Christoph Wagner





--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
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
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] Umlaut problem with SnowLeopard font

2010-02-12 Thread Christoph Wagner
Hi everyone,

today I revisited this problem and I was able to reproduce the problem
on Windows with a small block of code, mostly copied from the iText
examples (http://1t3xt.info/examples/browse/?page=exampleid=138):

--snip
Document document = new Document ();
try
{
PdfWriter.getInstance (document, new FileOutputStream
(c:/ttf.pdf));
document.open ();
BaseFont bf = BaseFont.createFont (C:\\LucidaGrande.ttc,0,
BaseFont.CP1252, BaseFont.EMBEDDED);
com.lowagie.text.Font font = new com.lowagie.text.Font (bf, 12);
document.add (new Paragraph (This is an umlaut: --äöü--,
font));
String[] encoding = bf.getCodePagesSupported ();
for (int i = 0; i  encoding.length; i++)
{
document.add (new Paragraph (encoding[ + i + ] =  +
encoding[i]));
}
document.add (new Paragraph (Full font names:));
String[][] name = bf.getFullFontName ();
for (String[] aName : name)
{
document.add (new Paragraph (aName[3] +  ( + aName[0] + ; 
+ aName[1] + ;  + aName[2] + )));
}
}
catch (Exception ignored)
{
}
document.close ();
--snap

If I run this code using the Lucida Grande ttc file (copied to
Windows) that comes from a SnowLeopard installation the generated pdf
file (attached) misses the umlaut characters. If I now select the
empty space in Acrobat and copy that to the clipboard and then paste
into some text editor I magically see the umlauts


Any idea where the problem might be?


Best Regards,
Christoph Wagner



ttf.pdf
Description: Adobe PDF document
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev___
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
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Re: [iText-questions] Umlaut problem with SnowLeopard font

2010-02-12 Thread Christoph Wagner
Hi Leonard,

 What if you switch from 1252 to Identity-H encoding?  Bet that
 will work.

Nope. This creates a PDF that shows some awkward Unicode signs like
the promille symbol, the ^ and a third symbol instead of the
umlauts I also tested other ttc files a few minutes ago and the
ones I tested have all the same problem, so to me it looks like iText
has a problem handling ttc files in some cases.

 But on another note, the embedding on that font is REALLY WEIRD!
 It is only embedding a subset of actual glyph data BUT the rest
 of the font information for the other glyphs is present (widths,
 encodings, etc.).

Doesn't sound good...

Best,
Christoph Wagner


 
 
 Leonard
 
 -Original Message-
 From: Christoph Wagner [mailto:cwag...@canto.com]
 Sent: Friday, February 12, 2010 8:20 AM
 To: 'Post all your questions about iText here'
 Subject: Re: [iText-questions] Umlaut problem with SnowLeopard
 font
 
 Hi everyone,
 
 today I revisited this problem and I was able to reproduce the
 problem on Windows with a small block of code, mostly copied from
 the iText examples
 (http://1t3xt.info/examples/browse/?page=exampleid=138):
 
 --snip
 Document document = new Document ();
 try
 {
 PdfWriter.getInstance (document, new FileOutputStream
 (c:/ttf.pdf));
 document.open ();
 BaseFont bf = BaseFont.createFont (C:\\LucidaGrande.ttc,0,
 BaseFont.CP1252, BaseFont.EMBEDDED);
 com.lowagie.text.Font font = new com.lowagie.text.Font (bf,
 12);
 document.add (new Paragraph (This is an umlaut: --äöü--,
 font));
 String[] encoding = bf.getCodePagesSupported ();
 for (int i = 0; i  encoding.length; i++)
 {
 document.add (new Paragraph (encoding[ + i + ] =  +
 encoding[i]));
 }
 document.add (new Paragraph (Full font names:));
 String[][] name = bf.getFullFontName ();
 for (String[] aName : name)
 {
 document.add (new Paragraph (aName[3] +  ( + aName[0] +
 ; 
 + aName[1] + ;  + aName[2] + )));
 }
 }
 catch (Exception ignored)
 {
 }
 document.close ();
 --snap
 
 If I run this code using the Lucida Grande ttc file (copied to
 Windows) that comes from a SnowLeopard installation the generated
 pdf file (attached) misses the umlaut characters. If I now select
 the empty space in Acrobat and copy that to the clipboard and
 then paste into some text editor I magically see the umlauts
 
 
 Any idea where the problem might be?
 
 
 Best Regards,
 Christoph Wagner
 
 
 -
 -
 SOLARIS 10 is the OS for Data Centers - provides features such as
 DTrace,
 Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
 http://p.sf.net/sfu/solaris-dev2dev
 ___
 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
 Check the site with examples before you ask questions:
 http://www.1t3xt.info/examples/
 You can also search the keywords list:
 http://1t3xt.info/tutorials/keywords/



--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
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
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] Umlaut problem with PdfGraphics2D onSnowLeopard

2009-12-18 Thread Christoph Wagner
Hi Paulo,

thanks for your reply.

 Does that font work outside PdfGraphics2D with a plain BaseFont?

What do you mean by that? Should I create a PDF by hand using that
font? I haven't tried that. The other glyphs are printed correctly and
seem to be of the right font. Only the umlauts are not being handled.
I even looked at the font definition stream in the generated PDF and
as far as I understand it the widths are correctly calculated and
inserted and the used characters are valid. The attached document
shows the phenomenon.

This is the font object from the incorrect PDF:

1 0 obj/LastChar
252/BaseFont/MUSGQI+LucidaGrande/Type/Font/Encoding/WinAnsiEncoding/Su
btype/TrueType/FontDescriptor 6 0 R/Widths[316 0 0 0 0 0 0 0 0 0 0 0 0
0 316 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 749 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 512 0 557 0 0 0 0 0 584 0 0
0 0 0 0 409 509 374 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 632 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 794 0 0 0 0 0 331 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 614]/FirstChar 32


Printing with the same font definition to a real Graphics2D object
prints out everything correctly.
I am really out of ideas how to address this on my side.

If you need any more information, just let me know and I will try to
provide as much as can.


Best,
Christoph Wagner



Cumulus 2.pdf
Description: Adobe PDF document
--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev ___
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
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Re: [iText-questions] Umlaut problemwith PdfGraphics2D onSnowLeopard

2009-12-18 Thread Christoph Wagner
Hi,

AFAIK WinAnsi contains german umlauts. When you look at the generated widths
for the individual glyphs the offset seem to be correct. For example the
last shown width at offset 252 (which is 614) maps exactly to ANSI umlaut ü
(http://www.alanwood.net/demos/ansi.html).

So for me it looks not like an encoding problem. But if I want to try that,
how do I configure another encoding when generating the PDF with the
PDFGraphics2D object?


Thanks for your help,
Christoph Wagner


 -Original Message-
 From: Mark Storer [mailto:msto...@autonomy.com]
 Sent: Friday, December 18, 2009 6:37 PM
 To: Post all your questions about iText here
 Subject: Re: [iText-questions] Umlaut problemwith PdfGraphics2D
 onSnowLeopard

  1 0 obj/LastChar
 
 252/BaseFont/MUSGQI+LucidaGrande/Type/Font/Encoding/WinAnsiEncoding/Su
  btype/TrueType/FontDescriptor 6 0 R/Widths[316 0 0 0 0 0 0 0 0 0 0 0
 0
  0 316 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 749 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 512 0 557 0 0 0 0 0 584 0 0
  0 0 0 0 409 509 374 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 632 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 794 0 0 0 0 0 331 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 614]/FirstChar 32

 Bingo.  You're creating the font with WinAnsiEncoding, which is a
 single byte font that doesn't have a code for umlaut.  Identity-H
 always works, try that instead.

 --Mark Storer
   Senior Software Engineer
   Cardiff.com

 #include disclaimer
 typedef std::DisclaimerCardiff DisCard;


 ---
 ---
 This SF.Net email is sponsored by the Verizon Developer Community
 Take advantage of Verizon's best-in-class app development support
 A streamlined, 14 day to market process makes app distribution fast and
 easy
 Join now and get one step closer to millions of Verizon customers
 http://p.sf.net/sfu/verizon-dev2dev
 ___
 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
 Check the site with examples before you ask questions:
 http://www.1t3xt.info/examples/
 You can also search the keywords list:
 http://1t3xt.info/tutorials/keywords/



--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev ___
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
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Re: [iText-questions] Umlaut problemwith PdfGraphics2D onSnowLeopard

2009-12-18 Thread Christoph Wagner
Hi,

 Hmm.  Probably not the encoding then, no.  Still, if you want to give
 Identity-H a shot, you'd have to...

Thank you for pointing me into that direction. I will give it a try next
week (I don't have a SL machine available this weekend) and post back the
results.
Disabling the embedding is not really an option as the PDF might be read on
a platform where the font is not available.

I just noticed that the font contains all information in the resource fork.
Could this be a problem for iText? Is iText able to read the resource fork
to extract font information?


Best,
Christoph Wagner


 (checks docs)

 Ah yes.  If you want to control awt.Font-BaseFont conversion, you need
 to customize a FontMapper, and use one of the createGraphics2D()
 overrides that will accept it as a parameter.

 Looking at the source to DefaultFontMapper (FontMapper is an
 interface), I see that CP1252 (winansi) is hardcoded as the requested
 encoding:

 (At line 167 of
 http://itext.svn.sourceforge.net/viewvc/itext/trunk/src/core/com/itextp
 df/text/pdf/DefaultFontMapper.java?revision=4141view=markup)

 I also see that you can write BaseFontParameters into a mapper prior to
 using it.  So you should be able to whip up your own DefaultFontMapper,
 and add a new BaseFontParamters instance for LucidaWhastis.  Something
 Like This:

 FontMapper myMapper = new DefaultFontMapper();
 BaseFontParamters fontParams= new BaseFontParameters( LucidaWhatsis
 );
 fontParams.encoding = BaseFont.IDENTITY_H;
 myMapper.putName( LucidaWhatsis, fontParams );

 Graphics2D myGraphics = myPdfContent.createGraphics( wid, hei, myMapper
 );


 Another option would be to disable embedding (with
 fontParams.embeeded=false) **instead**of** changing the encoding.
 Identity-H fonts are always embedded subsets, and override the
 requested embedding.  You've got an embedded subset there, so there
 could be funkiness as a result.  It's theoretically possible that the
 double-dot-u needs a regular 'u' present in order to draw, which is in
 fact missing from this subset.

 OTOH, If that were the case I'd have expected this sort of problem to
 crop up fairly regularly in countries where such characters are used.
 YMMV.

 --Mark Storer
   Senior Software Engineer
   Cardiff.com

 #include disclaimer
 typedef std::DisclaimerCardiff DisCard;

 ---
 ---
 This SF.Net email is sponsored by the Verizon Developer Community
 Take advantage of Verizon's best-in-class app development support
 A streamlined, 14 day to market process makes app distribution fast and
 easy
 Join now and get one step closer to millions of Verizon customers
 http://p.sf.net/sfu/verizon-dev2dev
 ___
 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
 Check the site with examples before you ask questions:
 http://www.1t3xt.info/examples/
 You can also search the keywords list:
 http://1t3xt.info/tutorials/keywords/




--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
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
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] Umlaut problem with PdfGraphics2D onSnowLeopard

2009-12-18 Thread Christoph Wagner
Hi Paulo,

I just tried to copy that font to my windows box when I noticed that the
font contains all information in the resource fork. Could this be a problem
for iText? Is iText able to read the resource fork to extract font
information?


Best,
Christoph Wagner


 -Original Message-
 From: Paulo Soares [mailto:psoa...@glintt.com]
 Sent: Friday, December 18, 2009 6:41 PM
 To: Post all your questions about iText here
 Subject: Re: [iText-questions] Umlaut problem with PdfGraphics2D
 onSnowLeopard

 Is the font available for downloading? (I don't have a MAC, only
 Windows)

 Paulo

  -Original Message-
  From: Christoph Wagner [mailto:cwag...@canto.com]
  Sent: Friday, December 18, 2009 10:22 AM
  To: 'Post all your questions about iText here'
  Subject: Re: [iText-questions] Umlaut problem with PdfGraphics2D
  onSnowLeopard
 
  Hi Paulo,
 
  thanks for your reply.
 
   Does that font work outside PdfGraphics2D with a plain BaseFont?
 
  What do you mean by that? Should I create a PDF by hand using that
  font? I haven't tried that. The other glyphs are printed correctly
 and
  seem to be of the right font. Only the umlauts are not being handled.
  I even looked at the font definition stream in the generated PDF and
  as far as I understand it the widths are correctly calculated and
  inserted and the used characters are valid. The attached document
  shows the phenomenon.
 
  This is the font object from the incorrect PDF:
 
  1 0 obj/LastChar
 
 252/BaseFont/MUSGQI+LucidaGrande/Type/Font/Encoding/WinAnsiEncoding/Su
  btype/TrueType/FontDescriptor 6 0 R/Widths[316 0 0 0 0 0 0 0 0 0 0 0
 0
  0 316 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 749 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 512 0 557 0 0 0 0 0 584 0 0
  0 0 0 0 409 509 374 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 632 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 794 0 0 0 0 0 331 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 614]/FirstChar 32
 
 
  Printing with the same font definition to a real Graphics2D object
  prints out everything correctly.
  I am really out of ideas how to address this on my side.
 
  If you need any more information, just let me know and I will try to
  provide as much as can.
 
 
  Best,
  Christoph Wagner
 
 

 Aviso Legal: Esta mensagem i destinada exclusivamente ao destinatario.
 Pode conter informagco confidencial ou legalmente protegida. A
 incorrecta transmissco desta mensagem nco significa a perca de
 confidencialidade. Se esta mensagem for recebida por engano, por favor
 envie-a de volta para o remetente e apague-a do seu sistema de
 imediato. I proibido a qualquer pessoa que nco o destinatario de usar,
 revelar ou distribuir qualquer parte desta mensagem.   Disclaimer: This
 message is destined exclusively to the intended receiver. It may
 contain confidential or legally protected information. The incorrect
 transmission of this message does not mean the loss of its
 confidentiality. If this message is received by mistake, please send it
 back to the sender and delete it from your system immediately. It is
 forbidden to any person who is not the intended receiver to use,
 distribute or copy any part of this message.




--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
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
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] Umlaut problem with PdfGraphics2DonSnowLeopard

2009-12-18 Thread Christoph Wagner
Thank you for testing the ttf file. The file in SL is a ttc file which I was
unable to find on the net and I am not surprised after learning that the ttc
font uses the resource fork which only works on Mac where the font is always
available. If Java and because of that iText is unable to read the font
correctly which font is then embedded into the document? Does iText support
the ttc format at all?
I checked the font in leopard and there LucidaGrande is stored as a dfont
where the font information is stored in the file data fork which obviously
seem to work.

Darn Mac people Resource forks really must die


Thank you for your help,
Christoph Wagner

(preferring any other operating system over Macs)



 -Original Message-
 From: Paulo Soares [mailto:psoa...@glintt.com]
 Sent: Saturday, December 19, 2009 12:08 AM
 To: Post all your questions about iText here
 Subject: Re: [iText-questions] Umlaut problem with
 PdfGraphics2DonSnowLeopard

 Does Java support reading the resource fork? iText only knows about
 regular
 fonts with all the information in a single file. I downloaded
 LucidaGrande.ttf for Windows and it worked. This same file will
 certainly
 also work for you.

 Paulo

 - Original Message -
 From: Christoph Wagner cwag...@canto.com
 To: 'Post all your questions about iText here'
 itext-questions@lists.sourceforge.net
 Sent: Friday, December 18, 2009 10:32 PM
 Subject: Re: [iText-questions] Umlaut problem with
 PdfGraphics2DonSnowLeopard


 Hi Paulo,

 I just tried to copy that font to my windows box when I noticed that
 the
 font contains all information in the resource fork. Could this be a
 problem
 for iText? Is iText able to read the resource fork to extract font
 information?


 Best,
 Christoph Wagner


  -Original Message-
  From: Paulo Soares [mailto:psoa...@glintt.com]
  Sent: Friday, December 18, 2009 6:41 PM
  To: Post all your questions about iText here
  Subject: Re: [iText-questions] Umlaut problem with PdfGraphics2D
  onSnowLeopard
 
  Is the font available for downloading? (I don't have a MAC, only
  Windows)
 
  Paulo
 
   -Original Message-
   From: Christoph Wagner [mailto:cwag...@canto.com]
   Sent: Friday, December 18, 2009 10:22 AM
   To: 'Post all your questions about iText here'
   Subject: Re: [iText-questions] Umlaut problem with PdfGraphics2D
   onSnowLeopard
  
   Hi Paulo,
  
   thanks for your reply.
  
Does that font work outside PdfGraphics2D with a plain BaseFont?
  
   What do you mean by that? Should I create a PDF by hand using that
   font? I haven't tried that. The other glyphs are printed correctly
  and
   seem to be of the right font. Only the umlauts are not being
 handled.
   I even looked at the font definition stream in the generated PDF
 and
   as far as I understand it the widths are correctly calculated and
   inserted and the used characters are valid. The attached document
   shows the phenomenon.
  
   This is the font object from the incorrect PDF:
  
   1 0 obj/LastChar
  
 
 252/BaseFont/MUSGQI+LucidaGrande/Type/Font/Encoding/WinAnsiEncoding/Su
   btype/TrueType/FontDescriptor 6 0 R/Widths[316 0 0 0 0 0 0 0 0 0 0
 0
  0
   0 316 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 749 0 0 0 0 0 0 0 0
 0
   0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 512 0 557 0 0 0 0 0 584 0
 0
   0 0 0 0 409 509 374 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0
   0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0
   0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 632 0 0 0 0 0 0 0 0 0 0 0 0 0
 0
   0 0 0 794 0 0 0 0 0 331 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0
   0 0 0 0 0 0 0 0 614]/FirstChar 32
  
  
   Printing with the same font definition to a real Graphics2D object
   prints out everything correctly.
   I am really out of ideas how to address this on my side.
  
   If you need any more information, just let me know and I will try
 to
   provide as much as can.
  
  
   Best,
   Christoph Wagner


 ---
 ---
 This SF.Net email is sponsored by the Verizon Developer Community
 Take advantage of Verizon's best-in-class app development support
 A streamlined, 14 day to market process makes app distribution fast and
 easy
 Join now and get one step closer to millions of Verizon customers
 http://p.sf.net/sfu/verizon-dev2dev
 ___
 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
 Check the site with examples before you ask questions:
 http://www.1t3xt.info/examples/
 You can also search the keywords list:
 http://1t3xt.info/tutorials/keywords/



--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support

[iText-questions] Umlaut problem with PdfGraphics2D on SnowLeopard

2009-12-17 Thread Christoph Wagner
Hi,

I have written some code that prints a PDF using the wonderful
PdfGraphics2D class from iText.
When printing text using LucidaGrande on SnowLeopard the umlaut
characters are missing. When printing the exact same data on Leopard
everything works. On SL it also works when using Arial for example. 
I checked the fonts from both platforms and on SL the LucidaGrande is
no longer a dfont but a ttc font.
I also tested iText 5.0 and the problem also exists there. 

Do you have any idea how to solve this problem?


Best,
Christoph Wagner



--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
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
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] Umlaut problem with PdfGraphics2D on SnowLeopard

2009-12-17 Thread Christoph Wagner
Well,

When I use that font using TextEdit, Word or any other application, the
glyphs are there and visible. Only iText is unable to print them correctly.
That's why I think that iText is the source of the problem. And it's never
working with LucidaGrande on SnowLeopard.

Any idea?


Best,
Christoph Wagner


 -Original Message-
 From: 1T3XT info [mailto:i...@1t3xt.info]
 Sent: Thursday, December 17, 2009 7:51 PM
 To: Post all your questions about iText here
 Subject: Re: [iText-questions] Umlaut problem with PdfGraphics2D on
 SnowLeopard

 Christoph Wagner wrote:
  Hi,
 
  I have written some code that prints a PDF using the wonderful
  PdfGraphics2D class from iText.
  When printing text using LucidaGrande on SnowLeopard the umlaut
  characters are missing. When printing the exact same data on Leopard
  everything works. On SL it also works when using Arial for example.
  I checked the fonts from both platforms and on SL the LucidaGrande is
  no longer a dfont but a ttc font.
  I also tested iText 5.0 and the problem also exists there.
 
  Do you have any idea how to solve this problem?

 You've answered the question yourself.
 It's not an iText problem because the code works with Arial,
 and even with one of the LucindaGrande fonts.
 However, the LucidaGrande font you're using on SnowLeopard
 apparently doesn't have the glyphs with umlaut.
 Copy the font from Leopard to SnowLeopard and use that one
 (that is: if you are licensed to use that font).
 --
 This answer is provided by 1T3XT BVBA
 http://www.1t3xt.com/ - http://www.1t3xt.info

 ---
 ---
 This SF.Net email is sponsored by the Verizon Developer Community
 Take advantage of Verizon's best-in-class app development support
 A streamlined, 14 day to market process makes app distribution fast and
 easy
 Join now and get one step closer to millions of Verizon customers
 http://p.sf.net/sfu/verizon-dev2dev
 ___
 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
 Check the site with examples before you ask questions:
 http://www.1t3xt.info/examples/
 You can also search the keywords list:
 http://1t3xt.info/tutorials/keywords/



--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
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
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


[iText-questions] Problem in PdfGraphics2D

2008-03-22 Thread Christoph Wagner
Hi,

I am using the PdfGraphics2D to print a rather complex UI to a PDF using
iText. I got a problem where rectangles changed their thickness
intermittently. After hours of debugging I found the reason for the change:
Before that I printed a underline string using this code:

AttributedString as = new AttributedString (textToPrint);
as.addAttribute (TextAttribute.FONT, font);
if (isUnderlined)
{
as.addAttribute (TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);
}
pdfGraphics.drawString (as.getIterator (), left, (float) top);

This lead me to debugging the PdfGraphics2D class where I found the
following codeblock:

476 if(underline)
477 {
478 // These two are supposed to be taken from the .AFM file
479 //int UnderlinePosition = -100;
480 int UnderlineThickness = 50;
481 //
482 double d = asPoints((double)UnderlineThickness,
(int)fontSize);
483 setStroke(new BasicStroke((float)d));
484 y = (float)((double)(y) +
asPoints((double)(UnderlineThickness), (int)fontSize));
485 Line2D line = new Line2D.Double((double)x, (double)y,
(double)(width+x), (double)y);
486 draw(line);
487 }

The problem is the setting of the stroke in line 483 without preserving the
current stroke. The fix should be to set the original stroke back after the
draw in line 486 ( make a call to setStroke(oldStroke); in line 487).

Let me know what you think.


Christoph Wagner


PS. And many thanks for the work on this great piece of open source software



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] Exception when printing PDF on Mac

2007-01-15 Thread Christoph Wagner
Hi,

I have a problem printing a PDF on Mac using the latest iText version 1.4.8.
I get the following exception:

java.lang.IllegalArgumentException: null incompatible with Text-specific
antialiasing enable key
at java.awt.RenderingHints.put(RenderingHints.java:484)
at com.lowagie.text.pdf.PdfGraphics2D.setRenderingHint(Unknown
Source)
at apple.laf.AquaUtils.endFont(AquaUtils.java:40)
at apple.laf.AquaTextPaneUI.paintSafely(AquaTextPaneUI.java:77)
at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:782)
at javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:761)
at javax.swing.JComponent.paintComponent(JComponent.java:742)
at javax.swing.JComponent.paint(JComponent.java:1005)

The problem seems to be an invalid null value for the antialiasing key that
is pushed from the aqua UI classes to iText and fails in
java.awt.RenderingHints. I tried to workaround this problem with changing
the com.lowagie.text.pdf.PdfGraphics2D.setRenderingHint method to:

public void setRenderingHint(Key arg0, Object arg1) {
if (arg1 != null) {
rhints.put(arg0, arg1);
}
else {
rhints.remove (arg0);
}
}

This fix works very well in all my testcases and should have no effect in
any other environment as the value parameter is not null usually. Any chance
that this fix will be included in one of the upcoming releases?

Thanks
Christoph Wagner




-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/