Currently we have implemented a project in iTextsharp version 4.1.6 in .NET for client which we are working with for last 5 years, now we are facing some bugs while converting HTML tags to PDF through HTMLWorker. So, we are planning to Buy and move it to 5.x version with XMLWorker. But problem we are facing is we have used "iTextSharp.text.Table" and some old stuff extensively in the project which is not supported in 5.x version. Is there a way to convert all the code to latest version or can we use both versions simultaneously?
Asked
Active
Viewed 410 times
2
-
`Table` and `PdfPTable` are quite different. If you don't use too many "whistles and bells" in `Table`, replacing `Table` by `PdfPTable` and `Cell` by `PdfPCell` will get you close to what you need, but don't expect the visual appearance to be identical. You'll need some manual tweaking to get the same result. – Bruno Lowagie Sep 03 '15 at 11:32
-
Thanks for the quick response. But, Can we use both versions simultaneously on a server? as mentioned we have used old version extensively in the code and it would not be feasible to switch it to latest version in one go. Is there any workaround? – Dhaval Shah Sep 03 '15 at 11:50
-
All the versions prior to version 5 have package names with my name in: `com.lowagie.text.*`. Starting with version 5, I removed my name from all the package names: `com.itextpdf.text.*`. As the package names are different, it is technically no problem to use both versions next to each other. – Bruno Lowagie Sep 03 '15 at 12:14
-
@BrunoLowagie has the namespace in iTextSharp changed similarly? I think the OP uses that version. – mkl Sep 03 '15 at 12:21
-
Aha... No, sorry. No so changes were applied in iTextSharp (I overlooked the Sharp in your question). – Bruno Lowagie Sep 03 '15 at 12:46
-
Created a test environment with iText 5.5.6 in .NET but was unable to find – Dhaval Shah Sep 03 '15 at 14:33
-
Sorry Kindly ignore above comment. I'm working in .net can you please provide a workaround for me to use in iTextsharp 5.5.6. Thanks – Dhaval Shah Sep 03 '15 at 15:03
-
By "work around" what do you mean? A work around for side-by-side 4.x and 5.x? If so, this is a general .Net issues, see [these threads](http://stackoverflow.com/questions/4451220/loading-multiple-versions-of-the-same-assembly) – Chris Haas Sep 03 '15 at 16:39