Tony Gallo wrote: > What is the correct import path for the text classes?
For old versions of iText, it's com.lowagie. For iText 5, it's com.itextpdf. Why the change? Because lowagie is the name of a person, whereas it's better to have the name of the product in the package names. But more importantly: because the com.lowagie classes are MPL/LGPL, and the com.itextpdf classes are AGPL. If we had kept the same package names, then people would have upgraded without knowing the license has changed. They could have been infringing the AGPL without knowing the MPL/LGPL no longer applies. > Many of the examples have the following syntax to import the iTextPDF > classes. > > //import the iText packages > *import* _com.lowagie_.text.*; > *import* _com.lowagie_.text.pdf.*; Yes, that's for the old version. Most of the examples will work with iText 5 (possibly with small adaptations) if you change lowagie into itextpdf. > Also, I have tried the following, because the source unzipped to the > following path on my computer. > > C:\Program Files\Java\iText\src\core\com\itextpdf\text > > *import* _com.itextpdf_.text.*; > *import* _com.itextpdf_.text.pdf.*; The examples for iText 5 can be found here: http://itextpdf.com/examples/ > Both of these are causing an error, “The import com.lowagie cannot be > resolved”, in Eclipse. The old examples are tested and work with the old iText. The new examples are tested and work with the new iText. -- 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 [email protected] 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/
