Re: [iText-questions] some questions

2010-05-16 Thread Michael Olenick
Didn't know that and would've answered them.  Paulo on the repeating
footer I'd also consider encapsulating the rendering code in a
function and pass the document object and/or calls to the internal
bytes.  Then use absolute positioning for a table (or anything else)
that's called before creating a new page or closing the document to
ensure the z-order is always on top, though you shouldn't write in
that space anyway.  I've found this is more useful than the header and
footer functions: results are the same but more configurable.

Michael.


Michael Olenick
+1 561-865-OLEN (6536)
US Eastern



On Sun, May 16, 2010 at 4:11 AM, Bruno Lowagie br...@lowagie.com wrote:
 Michael Olenick wrote:
 Dear Bruno -- We're too lazy to learn how to use iText and believe
 that your time is less valuable than ours.  We therefore would like
 you to do our work for us.

 That is sometimes the case, but the mail I forwarded is from somebody
 who is reviewing the manuscript of the second edition. He has already
 given some very valuable feedback.

 Now that his reviewing work is almost done, he has some additional
 questions. Some of the questions are interesting, but I really don't
 have the time right now. I'm making a new design for the web site
 (enjoying the learning process), and I want to be able to focus on that
 work because otherwise I'll never be able to finish it before I need it
 (I'll need it right after the production process of the book is done).

 One of the most interesting things that will be added to the new site,
 is a bulletin board system with different categories.
 - a read-only section with questions and answers for everybody
 - a read-write section for subscribed users (maybe not for free)
 - a protected section for customers
 Once such a system is available, we can think of paying registered
 developers for valuable answers given on the forum.

 This being said: in the meantime, it WOULD help if other subscribers to
 the list would answer one or more of the questions I forwarded ;-)
 best regards,
 Bruno

 --

 ___
 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/


--

___
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] some questions

2010-05-15 Thread Michael Olenick
I'll translate them all:

Dear Bruno -- We're too lazy to learn how to use iText and believe
that your time is less valuable than ours.  We therefore would like
you to do our work for us.  Maybe after you write our computer program
you could also stop by and mow our lawns?

I'd answer some but worry it would only create an incentive to ask
more basic questions.  All can be answered by reading the book,
searching the web, and/or experimenting.

Bruno -- why don't you set up a question/answer system where people
could offer to pay to have questions answered then, if somebody who
has read the book and learned to use the tool is inspired, they can --
if the offer is reasonable -- answer.  This list could be preserved
for bugs, enhancement discussions, or use cases exotic and complex
enough to be interesting.  Everything below are questions about the
basic use of iText and/or software engineering.

If you really do want us (the community) to help just say so and I'll
take one or two, and imagine others would too, but don't really think
it's a good idea.  It's your call though.

Michael.






On Sat, May 15, 2010 at 2:28 AM, Bruno Lowagie br...@lowagie.com wrote:
 Hello,
 I have very little time currently, and you've mailed me a long list of
 questions. I'm forwarding this list to the mailing list so that other
 people can answer if they have more time for the moment.

 Michael Niedermair wrote:
 Hi Bruno,

 I have some questions:

 1) How can I activate a otf (Open Type Font) feature like 'onum' for old
 style figures?

 2) How can I find out which method is used to encrypt a pdf?
 none / user pw / key / ...

 3) Is it possible to set a timestamp to avoid that the pdf is readable
 after this timestamp?

   Also: the margin finder only looks at text;
   Support for graphical objects isn't provided yet.

 4) Do you think that it is possible the next weeks, to get this feature?

 5) With my pupils I have made a lite pdf project with itext. They create
 a pdf calender for a year (1 title page and one page for each month).
 They use text, images and tables.

 Now we want to place the table on the bottom of each page (without using
 header or footer). Is there a simple method, to move the table or other
 objects to the bottom of the page (like \vfill in LaTeX).

 XXXx
     Text

     Image

 \vfill

     Tabel (with 5 or 6 rows)
 x

 Also for horizontal lines like \hfill in LaTeX.

 X Text \hfill                     AAA X

 In Listing 4.21: PdfCalendar.java I see a solution that calculates the
 table and so on.
 My whish:

 document.add(Text ...)
 document.vfill();
 document.add(table);
 document.newPage();


 6) In Listing 6.9: NUp.java you position the page with
 page = writer.getImportedPage(reader, i); G
 cb.addTemplate(page, factor, 0, 0, factor, offsetX, offsetY);

 Is it possible to place a page in a table cell, so I can use borders, ...
 table.addCell(page);

 7) Is it possible to display font infos a la pdffonts, first of all the
 name and embedded?

 --

 ___
 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/


--

___
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] What action is requred in terms of License

2010-05-11 Thread Michael Olenick
People -- Call or write to Bruno's sales agent.  If the cost/benefit
of what iText offers doesn't make economic sense explain to him why it
makes sense for Bruno's company to agree to different terms.  For
example, if the up-front amount is too high because you need the
revenue from your software sales explain that.  I can't say he'll
agree but I've spoken to him and he is a long-term veteran in software
sales, who understands the economics and cycles of software, and that
neither Bruno nor anybody working with him wants to put you out of
business.

Forking the old code-base is a bad idea for two reasons.  The first,
like Bruno explained, is technical complexity.  The second is much
worse though: think about the message it sends to open-source authors.
 I can't think of any worse precedent than a bunch of people who
forked a GPL license (or whatever the former license was) because they
were too cheap to pay reasonable licensing fees.

Additionally the original code-base may have accidental IP landmines
-- contributions that weren't fully licensed -- that could be a lot
more expensive long-term if your product does well.  That was a
problem with Linux early on, though many don't remember.  Linus's team
(and Red Hat and others), like Bruno, cleaned up the code.  There were
still legal challenges that cost a fortune but IBM, Novell, and others
(thanks Google!) bore the brunt of the financial and logistical cost
to blast them away; they're unlikely to extend that favor, which
literally cost tens of millions of dollars, to people who refuse to
pay reasonable licensing fees on iText.

A third reason that needs explaining, more mushy but still legitimate,
is Bruno himself.  He's incredibly modest and soft spoken but has a
young child and is working three jobs.  I don't know how old many of
the people writing are but there's a certain amount of fairness and
respect to him that's being overlooked.  As we get older and develop
lives we should be paid for our work; able to live off it.  I
personally think Bruno should consider avoiding the headaches and just
selling the whole code-base, then working for, Adobe or another large
software company.  Any of the major software vendors -- especially
Adobe, MS, Apple, and probably Google, IBM, and others -- would
happily have him and give him support, allow him to work a schedule
that's more reasonable, and financial security.  But he doesn't do
that because of his devotion to open-source.

Bruno and his team have worked hard and turned out a great product.
Talk to his sales agent and listen to what he has to say.  If the fees
will never work for your product you may want to ask them why: you
stand to get some good advice on software fees (hint: sometimes higher
fees actually increase sales, which is counter-intuitive but well
documented).  Finally, look at Adobe's fee structure for client and
server-side and embedded PDF generation technology.

Michael.




On Tue, May 11, 2010 at 3:18 AM, Bruno Lowagie br...@lowagie.com wrote:
  Original-Nachricht 
 Datum: Fri, 7 May 2010 14:19:41 +0200
 Von: TvT tvtre...@nepatec.de
 An: Post all your questions about iText here 
 itext-questions@lists.sourceforge.net
 Betreff: Re: [iText-questions] What action is requred in terms of License

 Just read the whole thread and it sounded like the internal discussion we
 had in our company as well.

 As this isn't a technical discussion, I have asked sales to take a look
 at the thread. I think some points need to be clarified as I'm reading
 things that are taken out of their context.

 On a personal note: when I read about people who say let's start a
 fork, I feel the urge to give the fatherly advice not to make the same
 mistake I made by spending day and night, without taking any holiday
 whatsoever, working for free for over ten years for people who don't
 realize what it involves to provide good software.

 Unfortunately, that fatherly advice could be misinterpreted.

 --

 ___
 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/


--

___
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] What action is requred in terms of License

2010-05-11 Thread Michael Olenick
Autonomy just announced Q1 results with $194.2 million in revenue,
apparently a record.

Developers: push your product managers to pay reasonable licensing
fees.  It's not easy and they'll bicker but giving a sharp nudge to
them, and making them at least try, can make a real difference.

Michael.






On Tue, May 11, 2010 at 12:08 PM, Mark Storer msto...@autonomy.com wrote:
 I suspect you're thinking of me.  I maintain a fork that was originally
 from paulo 144, and was (mostly) ported to 2.0.4 relatively recently.

 It's really not for Public Consumption.  Lots of Cardiff-specific cruft
 in there, along with a couple patches/features that were rejected from
 the trunk because they caused problems when you use iText in a way other
 than the way I do.

 Yes, we run the unit tests, but those tests (clearly) aren't all that
 comprehensive.  That's what the users are for!  :/

 Autonomy (of which Cardiff is a part) has a we don't pay for 3rd party
 licenses thing going on.  With that policy in place, we can never use
 the post-AGPL version. Or can we?  Should it come to it, I suspect we
 might be able to trade some developer hours (mine) for a license, but it
 has not come to that, so we haven't explored it with iTextSoftware
 (yet).

 --Mark Storer
  Senior Software Engineer
  Cardiff.com

 import legalese.Disclaimer;
 DisclaimerCardiff DisCard = null;



 -Original Message-
 From: David Hoffer [mailto:dhoff...@gmail.com]
 Sent: Tuesday, May 11, 2010 7:09 AM
 To: Post all your questions about iText here
 Subject: Re: [iText-questions] What action is requred in
 terms of License

 I'm not trying to vote for a fork just pointing out that
 someone in this thread (or recent thread) said they DID fork;
 so if your thinking of doing the same you might want to share
 resources with one that already did the fork.

 -Dave

 On Tue, May 11, 2010 at 7:49 AM, 1T3XT info i...@1t3xt.info wrote:
  Michael Olenick wrote:
  People -- Call or write to Bruno's sales agent.
 
  Thanks!
 
  I've had a speed course in economics at
 http://www.vlerick.com/ last
  year, discovering there's more to the IT business than writing code.
 
  It's all about the business model, not just the business model used
  for iText, but also the business model of the end user/developer.
 
  You've explained that very well. We are using a license (be it the
  AGPL, or a commercial license) because that's better for
 everyone. If
  you choose the AGPL, you share your code. If you choose the
 commercial
  license, you share some of your revenue.
 
  The situation before the AGPL was not healthy. At some point, I had
  the impression I was being suffocated: plenty of people
 were mailing
  me personally, DEMANDING a solution for their problem. I
 didn't have
  any time to think about new code anymore, and that's not
 good: a good
  product has to offer continuity!
 
  Recently, I attended an event where I had a talk with a CEO of a
  company who had been using iText for years. He said that he was now
  looking for another free product because he could no
 longer use iText.
  I asked him how much switching to another library would
 cost in terms
  of development, and what he would do if that other free library
  decided to change its license too (because it's easy to run a F/OSS
  product if you're not successful, but it's a lot of hard
 work as soon
  as people actually start using it).
  He hadn't thought about that yet, but I saw that he realized that
  would probably cost him far more than to have another chat
 with sales.
  So it goes...
  --
  This answer is provided by 1T3XT BVBA
  http://www.1t3xt.com/ - http://www.1t3xt.info
 
 
 --
  
 
  ___
  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/
 

 --
 

 ___
 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/


 No virus found in this incoming message.
 Checked by AVG - www.avg.com
 Version: 9.0.814 / Virus Database: 271.1.1/2842 - Release
 Date: 05/10/10 23:26:00


 --

 ___
 iText-questions mailing list
 iText-questions

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

2010-04-22 Thread Michael Olenick
If you're making money from iText -- with making money being defined
as somebody is paying you -- you should pay for it.  There's a lot of
hard work that went into the creation and support of this awesome
tool.

The licensing scheme they have for v. 5.0 is already incredibly
generous; too generous IMO.  Bruno and the team deserve to be paid for
their work.  If you're a University or not-for-profit or a start-up
tell them: I'm sure they'll work out licensing arrangements that work
within reasonable constraints; they don't want to put anybody out of
business.

Michael.





On Thu, Apr 22, 2010 at 12:12 PM, 1T3XT info i...@1t3xt.info wrote:
 David Hoffer wrote:
 No, versions prior to 5.x had the more friendly license.

 Nuance: more friendly for people who want to write even more unfriendly
 code. The license is still friendly for people who write software as
 friendly as iText.
 --
 This answer is provided by 1T3XT BVBA
 http://www.1t3xt.com/ - http://www.1t3xt.info

 --
 ___
 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/


--
___
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] What action is requred in terms of License

2010-04-22 Thread Michael Olenick
Then tell them what the project is and what you can afford.

Seriously -- that applies for all software components.  If you're
working for a Fortune 1000 call the person who licenses software and
ask them to work something out.  If you're working for a smaller
company, or on your own, know that if you talk to virtually any
software company they'll work within your budget constraints, as long
as those constraints are reasonable.  That's not just the itext
licensing partner but Oracle, Microsoft, IBM ... as long as you're not
BS'ing them they'll all work with you.  They want you to do well so
that you use their product in bigger projects, or pay them more as you
grow.  They make nothing if they demand fees you can't pay and don't
use their product(s).  Since the incremental cost for software is
virtually zero there's little to lose and lots to gain once you're
locked-in.  [Conversely, for the younger engineers here, be careful
who you lock-in with ... divorces in software are worse than divorces
in real life.]

Michael.




On Thu, Apr 22, 2010 at 12:48 PM, David Hoffer dhoff...@gmail.com wrote:
 Hey, I'm not saying they shouldn't be able to make money from this
 product.  But I take issue with making money being defined as
 somebody is paying you.  I thought making money was defined as what's
 left over after expenses.

 The cost is too high for small projects.  Only the U.S. Government can
 make the economics of spending more than your income work out somehow
 :)

 -Dave

 On Thu, Apr 22, 2010 at 10:30 AM, Bruno Lowagie br...@lowagie.com wrote:
 Michael Olenick wrote:
 If you're making money from iText -- with making money being defined
 as somebody is paying you -- you should pay for it.  There's a lot of
 hard work that went into the creation and support of this awesome
 tool.

 Thanks!
 best regards,
 Bruno


 --
 ___
 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/


 --
 ___
 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/

--
___
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] Create pages virtually and then write them out?

2010-04-11 Thread Michael Olenick
This is called impositioning; it's a common function for printers to
minimize paper use dating back hundreds of years.

There are plenty of ways to imposition n-up pages via itext; just look
them up.  Or use a transform for every other page in your program.  Or
write a two half-size PDF's and place them on a big PDF.  Or use one
of the tools written impositioning multiple pages to a PDF.  Or use
your printer driver to do this.

As for counting them during production add a counter to the loop
that's producing them.

I don't know about others but I hesitated and did a week of testing
before thinking about wasting Bruno's time when I found a bug in the
tab-chunk mechanism.  I verified the bug (tab chunks behave
erratically with justified text) with many fonts, many tab chunk
sizes, many text samples, with and without characters.  Bruno decided
not to fix the because the complexity of the fix outweighed the
benefit to most, and there are workarounds, a decision I understand
and respect.

But -- and this is what I'm getting at -- I uploaded a clean, clear,
concise code sample and a PDF illustrating the bug and spent a lot of
time verifying it wasn't my system and could be reproduced.  I'm
pointing this out not to whine about my tabbing but (there are plenty
of workarounds; submitted it mainly to bring to his attention) but to
try to show the level of diligence people should go through before
submitting questions.

Please try to do the work on your own and leave the itext authors to
write itext.  I'm not an itext author but have worked with
programatically generated PDF for years and don't mind answering
questions to save their time.  Even then I still would prefer if
people at least try before submitting questions.

Michael.




On Sat, Apr 10, 2010 at 5:19 PM, Harlan Messinger h...@gavelcade.com wrote:
 I'm interested in generating a PDF containing a set of cards half of
 U.S. standard letter size. For some reason, my HP printer prints very
 slowly when I print to paper of any size other than letter, so what I'd
 like to do is print two cards on each full letter-size card stock in
 landscape orientation, so that I can then slice the pile of cards in
 half. After I'm done, the cards should be in a particular order, and it
 will be easiest if I can do it as follows:

 1. Generate the cards as virtual pages, without adding them to the
 document, so that when I've finished that I can see how many I have.

 2. If I have N cards (where N is an even number; if N is odd, then I'll
 just add a blank card on the end), I want to write card1 to the left
 side of the first full-size page of the PDF and card (N/2 + 1) to the
 right side, card 2 and card (N/2 + 2) to the second page, and so on, so
 that card (N/2) and card N are both on the final sheet.

 I tried to find a suitable generic container element for this purpose
 but I was unsuccessful. Is there a solution?


 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 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/


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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] Create pages virtually and then write them out?

2010-04-11 Thread Michael Olenick
Thanks Bruno!!!

The workaround I was using was dorky but effective enough for the form
letters I generate.  The problem came from letters where the first
line (Dear Whoever) had a flush-left margin but subsequent
paragraphs started with tabs but were justified.

My initial workaround was to discourage/disallow clients from
justifying the body of their letters; use left-aligned text, or
justify the entire line.  One complained (understatement) so I made a
Chunk using the same font/size with spaces in it to approximate a tab;
sloppy but effective.  Put on my own to-do list parsing the paragraphs
and using setIndent eventually which seems cleaner (they set the text
through a different interface; I read, parse, substitute, and generate
letters .. mail merge on steroids -- jobs can have hundreds of
different templates).

One thought I had: why does setIndent not exhibit the same problem?
Isn't it doing essentially the same thing?  I was going to yank down
the sources and try to figure it out but then got in trouble for
obsessing on my perfect tabs so moved on.

Michael.


 After the first test, it was a won't fix situation. But afterwards, I
 did a second test, and now there's an almost fixed situation. The code
 sample you've made hasn't been thrown away yet. Maybe I'll find a way to
 make a working fix ;-)

 best regards,
 Bruno

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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/


[iText-questions] Tab chunk problem?

2010-03-24 Thread Michael Olenick
Hi.  I've discovered what I suspect is a bug with tab chunks and
justified column text.  Depending upon the size of the tab chunk
sometimes the text juts out to the right of the column.  The same code
works just fine when the tab is set to different sizes; that is the
line justifies without jutting out.

There aren't any patterns I've seen; you can adjust the tab size up or
down and sometimes it will jut out and other times it will justify.
I've also tried with several different fonts; my sample uses Courier
but I've tried other fonts and experience the same behavior.  I've
tried several different incantations of the same code but the behavior
appears in all of them.

I've searched throughout the web, have the book, but don't see this
addressed.  I've figured out crude work-arounds but, after some
thought, decided this is worth posting about.  I'm attaching the PDF
this generates, though it can be run to create the same one.

Michael.

import java.io.FileOutputStream;
import com.itextpdf.text.Chunk;
import com.itextpdf.text.Document;
import com.itextpdf.text.Element;
import com.itextpdf.text.Font;
import com.itextpdf.text.FontFactory;
import com.itextpdf.text.Phrase;
import com.itextpdf.text.pdf.ColumnText;
import com.itextpdf.text.pdf.PdfContentByte;
import com.itextpdf.text.pdf.PdfWriter;
import com.itextpdf.text.pdf.draw.VerticalPositionMark;

public class Test
{
public static final String RESULT = _tab-problem.pdf;

private Document document;
private PdfWriter writer;
private PdfContentByte cb;

static private Phrase getText()
{
Font font =
FontFactory.getFont(courier, 
FontFactory.defaultEncoding, true,
10, Font.NORMAL);

Chunk tabChunk = new Chunk(new VerticalPositionMark(), 40);

String text1 = Here is some text without an indent.  You can 
see
that it wraps and works and does all fine.\n;
String text2 = This line is supposed to have a tab at the 
beginning
of it, and it does, but sometimes the text pops out to the right.\n;

Chunk firstParagraph = new Chunk(text1, font);
Chunk secondParagraph = new Chunk(text2, font);

Phrase p = new Phrase();
p.add(firstParagraph);
p.add(tabChunk);
p.add(secondParagraph);

return p;
}

public void addText(Phrase phrase,
float leading,
float x, float y,
float width, float height,
int alignment,
float paragraphSpacing,
float tabIndent, float 
hangingIndent)
{
try
{
ColumnText ct = new ColumnText(cb);

// Adjust to origin in top-left, like screens
float pageHeight = 
this.document.getPageSize().getHeight();
float lowerLeftX = x;
float lowerLeftY = pageHeight - y - height;
float upperRightX = x + width;
float upperRightY = pageHeight - y;

ct.setSimpleColumn(lowerLeftX, lowerLeftY, upperRightX, 
upperRightY);
ct.setIndent(tabIndent);
ct.setAlignment(alignment);
ct.setExtraParagraphSpace(paragraphSpacing);
ct.setUseAscender(true);
ct.setFollowingIndent(hangingIndent);
if(leading0){ ct.setLeading(leading); }

ct.addText(phrase);

ct.go();
}
catch (Exception ex)
{
ex.printStackTrace();
}
}

public void run()
{
this.document = new Document();
try
{
this.writer = PdfWriter.getInstance(document, new
FileOutputStream(RESULT));
this.document.open();
this.cb = writer.getDirectContent();

Phrase phrase = Test.getText();

float leading=0;
float width=200;
float height=250;
float paragraphSpacing=0;
float tabIndent=0;
float hangingIndent=0;

addText(phrase,
leading,
5, 5,
width, height,
Element.ALIGN_JUSTIFIED,
paragraphSpacing, tabIndent, 
hangingIndent);