Hi, I am working on parsing pdf layers from a pdf file into separate images. It was really hard to find an library that does this and now I am digging into iTextSharp which seems like it's handling layers. public static void CreatePDF( string fileName, string destinationFolder ) { PdfReader reader = new PdfReader( fileName ); PdfDictionary ocProps = reader.Catalog.GetAsDict( PdfName.OCPROPERTIES ); PdfDictionary occd = ocProps.GetAsDict( PdfName.D ); PdfArray order = occd.GetAsArray( PdfName.ORDER ); List<PdfObject> layers = new List<PdfObject>(); for( int i = 0; i < order.Size; i++ ) { layers.Add( order[ i ] ); } for( int i = …

Member Avatar
+0 forum 0

How to add bookmarks and hyperlinks in pdf using itext? can any body tell example. Thanks advance..

Member Avatar
Member Avatar
+0 forum 2

<html> <head> <meta name="GENERATOR" content="Namo WebEditor"> <title>Insert title here</title> <link rel="stylesheet" type="text/css" href="css/main_style.css"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> </head> <body> <center> <tr> <th style='width: 3%;'> S.NO </th> <th style='width: 6%;'> Company ID </th> <th style='width: 10%;' > Company Name </th> <th style='width: 6%;' > More Company Details </th> <th style='width: 6%;'> User Details </th> <th style='width: 6%;'> Submission Summary </th> </tr> <% ArrayList<BasicInfoJB> list=(ArrayList<BasicInfoJB>)session.getAttribute("companyBasicInfo"); %> <% int i; for(i=0;i<list.size();i++){ BasicInfoJB bJB=(BasicInfoJB)list.get(i); out.println("<tr>"); out.println("<td align='center'>" ); out.print(i+1); out.println("</td> "); out.println("<td>"); out.print(bJB.getCOMPANY_ID()); out.println("</td>"); out.println("<td>"); out.print(bJB.getCOMPANY_NAME()); out.println("</td>"); out.println("<td align='center'>"); out.print("<a href='cmpnymrinfo?cid="+bJB.getCOMPANY_ID()+"'>ClickHere</a>"); out.println("</td>"); out.println("<td align='center'>"); out.print("<a href='userdetails?cid="+bJB.getCOMPANY_ID()+"'>ClickHere</a>"); out.println("</td>"); out.println("<td align='center'>"); out.print("<a href='submissumary?cid="+bJB.getCOMPANY_ID()+"'>ClickHere</a>"); out.println("</td>"); out.println("</tr>"); } %> </table> …

Member Avatar
Member Avatar
+0 forum 1

I'm creating a Web-based label printing system. For every label, there should be a unique s/n. So when a user decided to create 1000 labels (with the same data), all of it should have unique s/n, therefore the pdf will have 1000 pages, which increases the file size. My problem is when the user decided to create more copies, the file size will get bigger. Is there any way that I can reduce the file size of the pdf using Itext? Or is there any way that I can generated the pdf and output it in the browser without saving …

Member Avatar
Member Avatar
+0 forum 3

am trying to add images to a rtf document. I am able to add images to the document but I can't append any images. This means that when the 2nd Image is added, the first image is removed. I think that whenever the code is executed a new rtf document is created. public class InsertToWord { com.lowagie.text.Document doc = null; FileOutputStream evidenceDocument; String fileName = "evidenceDocument.rtf"; settings obj = null; InsertToWord() { obj = new settings(); doc = new com.lowagie.text.Document(); } public void insertImage(File saveLocation) { try { evidenceDocument = new FileOutputStream(obj.getFileLocation()+fileName); RtfWriter2.getInstance(doc, evidenceDocument); doc.open(); com.lowagie.text.Image image = com.lowagie.text.Image.getInstance(saveLocation.toString()); image.scaleAbsolute(400, …

Member Avatar
Member Avatar
+0 forum 6

Hi, I am trying to create document using iText. I am using Eclipse IDE. I've imported the jar files (itextpdf-5.2.1.jar and itext-xtra-5.2.1.jar). However RtfWriter2 is not being recognised as a class. Document doc = new Document(); RtfWriter2 writer = new RtfWriter2(); RtfWriter2.getInstance(doc,new FileOutputStream("testRTFdocument.rtf")); Can someone help me in figuring out what I am missing. I am very new to iText.

Member Avatar
Member Avatar
+0 forum 2

I have some problem i am trying to create a pdf with itextsharp in an aspx page i published in web service and called it but for the first time when i called aspx page i am getting an error message. But for every subsequent call to the webpage with query string i get the pdf -----------------The error message is----------- The process cannot access the file 'D:\Production_LIVE\Virtual Directories\...\88' because it is being used by another process. -----------------The error message is----------- i am deleting the path at the end of the function i write to create the pdf. I am clueless …

Member Avatar
+0 forum 0

The End.