An independent contractor recommended FOP so that was the project I looked at first. I have used FOP so I know it works, though I'm sure no one else uses it the same way. I just create XML with data including tags to tell it specifically what goes where on each page. I've had 2 problems with FOP. 1) It takes too much memory to generate a really large PDF. I've had to break up my data and generate multiple PDFs using the initial page sequence tag, then I used pdfbox to piece them together. 2) The AWT viewer was very inefficient, so I wrote my own.
I'm not familiar with iText so I don't know if it can generate the PDFs like FOP with the custom embedded fonts, SVG graphics, etc. I saw some messages recently on the pdfbox list that people were switching from iText, something about licensing issues. -----Original Message----- From: Chris Bowditch [mailto:[email protected]] Sent: Friday, August 26, 2011 5:52 AM To: [email protected] Subject: Re: How do you smooth fonts? On 22/08/2011 21:57, Eric Douglas wrote: Hi Eric, > When I transform XSLFO with FOP I can send the output to PDF or AWT > and text looks sharp. > I'm trying to use the same fonts to generate graphics directly since > I'm programmatically generating the input to my FOP process and I > don't actually need the XSLFO process. > If you know the position of all your text in advance and don't need XSL-FO, then FOP seems like the wrong tool for the job. Why not use iText, which has an API for creating PDF? > > I know exactly what text I want to print, what size I want it, and > exactly where I want it on the page. > I tried putting the text on an image and putting the image on a Swing > panel and it always comes out fuzzy. It's even fuzzier if I try to > save that image to a file or send it to a printer. > > I tried using the FOP classes for loading the font, using the > Java2DGraphicsState, FontInfo, and FontMetricsMapper objects to > generate the text. It's always rendered blurry. What could I be missing? > Chris
