[iText-questions] PdfCollection.TILE with horizontal splitting
Hello, I used the example from the book to create a pdfcollection. I need it to be shown as a tile withe the pdf-images in the upper part of the pdf-reader an the preview in the lower part. I changed the example from the book (kubrick-movies) so that I get the desired view, but the window is split vertically, not horizontally. I haven't found out how to show the pdf as desired. Is there a Flag I can use to set the splitting to horizontal instead of vertical? Any help would be really appreciated! Thanks in advance! The changed code: public byte[] createPdf() throws DocumentException, IOException { // step 1 Document document = new Document(); // step 2 ByteArrayOutputStream baos = new ByteArrayOutputStream(); PdfWriter writer = PdfWriter.getInstance(document, baos); // writer.setViewerPreferences(PdfWriter.PageModeUseAttachments|PdfWriter.PageModeUseThumbs); // step 3 document.open(); // step 4 document.add(new Paragraph( This document contains a collection of PDFs, one per Stanley Kubrick movie.)); //using Parameter Tile I get the layout view; but vertically splitted PdfCollection collection = new PdfCollection(PdfCollection.TILE); PdfCollectionSchema schema = getCollectionSchema(); collection.setSchema(schema); PdfCollectionSort sort = new PdfCollectionSort(YEAR); sort.setSortOrder(false); collection.setSort(sort); collection.setInitialDocument(movie 0); writer.setCollection(collection); PdfFileSpecification fs; PdfCollectionItem item; for(int i=0; i 5; i++) { fs = PdfFileSpecification.fileEmbedded(writer, null, String.format(kubrick_%s.pdf, movie +i), createMoviePage(movie +i, i)); fs.addDescription(movie +i, false); item = new PdfCollectionItem(schema); item.addItem(TITLE, movie +i); item.setPrefix(TITLE,movie +i); item.addItem(DURATION, 90+i); item.addItem(YEAR, 2000-i); fs.addCollectionItem(item); writer.addFileAttachment(fs); } // step 5 document.close(); return baos.toByteArray(); } -- View this message in context: http://itext-general.2136553.n4.nabble.com/PdfCollection-TILE-with-horizontal-splitting-tp3599021p3599021.html Sent from the iText - General mailing list archive at Nabble.com. -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] Help
On 15/06/2011 22:12, Tazio Baker wrote: I have no IT skills and I need to extract data from a PDF into an SQL database to create statistical reports. What makes you think this is possible? You are using PDF as a format to store data! What makes you think that's the purpose of PDF? Please read: http://lowagie.com/node/136 What you are asking can be compared with this: you're giving us tomato soup, and you ask us to extract the tomatoes. Do you think that's possible? Please advice if I may attach a sample of the PDF report I'm confronted with. You forgot to attach the PDF, but it was forwarded to me from another address you've sent it too. The PDF wasn't tagged, therefore there is NO STRUCTURE WHATSOEVER in the file. I've extracted the content of the first page. I've copied the result and pasted it below. If you can do anything with that plain text, then we can talk. If you can't, then you're trying to do something that is impossible. The PDF was created using Oracle PDF driver. This means the data you need is probably stored in a database somewhere. Use that data! stat_items Page 1 AGENCES MARITIMES REUNIES S.A : STATISTIQUES COMMERCIALES Rapport Du 01/04/11 Au 30/04/11 Bateau : CAMION DOMINICAIN Date Voyage : 01-APR-11 No Voyage : 010411 Carrier : CROWLEY LINER SERVICES,INC CntrQty Shipper Consignee Port Weight Kg Comodity Quantity 2 GILDAN ACTIVEWEAR TEXTILE GLOBAL MANUFAC CONTRACTORSANTO DOMINGO 2.00 CONTENEURS VIDES 2.00UNIT COMPANY 3 GILDAN ACTIVEWEAR TEXTILE MULTIWEAR S,A SANTO DOMINGO 3.00 CONTENEURS VIDES 3.00UNIT COMPANY 1 GILDAN ACTIVEWEAR TEXTILE SEWING INTERNATIONAL S.A SANTO DOMINGO 1.00 CONTENEURS VIDES 1.00UNIT COMPANY Bateau : VIKING PRINCESS Date Voyage : 01-APR-11 No Voyage : 020 Carrier : EUKOR CARS CARRIER CntrQty Shipper Consignee Port Weight Kg Comodity Quantity 0 HYUNDAI CORPORATION LES MOTEURS REUNIS GUNSAN 83,045.00 VOITURES SUV 50.00UNIT 0 HYUNDAI MOTORS COMPANY SUN AUTO S.A ULSAN 25,432.00 BUS 2.00UNIT VOITURES SUV 14.00UNIT 0 IBC JAPAN LTD PARTICULIER KOBE 9,410.00 VOITURE D'OCCASION 5.00UNIT 0 PARTICULIER PARTICULIER MANZANILLO 10,000.00 BUS, CAMIONS D'OCCASION 1.00UNIT 0 RAMA D.B.K.LTD PARTICULIER YOKOHAMA 4,290.00 VOITURE D'OCCASION 2.00UNIT 0 YOKOHAMA TRADING PARTICULIER YOKOHAMA 1,960.00 VOITURE D'OCCASION 1.00UNIT INTERNATIONAL CO Bateau : BITU MOUNTAIN Date Voyage : 02-APR-11 No Voyage : XXX Carrier : NOT AVAILABLE CntrQty Shipper Consignee Port Weight Kg Comodity Quantity 0 SARGEANT TRADING LTD GROUPMENT INGIENERIA MOBILE 1,770,983.00 ASPHALTES 451,881.00GAL BAHAMAS ESTRELLA Bateau : CAMION DOMINICAIN Date Voyage : 02-APR-11 No Voyage : 020411 Carrier : CROWLEY LINER SERVICES,INC CntrQty Shipper Consignee Port Weight Kg Comodity Quantity 1 GILDAN ACTIVEWEAR TEXTILE GLOBAL MANUFAC CONTRACTORSANTO DOMINGO 1.00 CONTENEURS VIDES 1.00UNIT COMPANY Bateau : IVER PROSPERITY Date Voyage : 02-APR-11 No Voyage : XXX Carrier : NOT AVAILABLE CntrQty Shipper Consignee Port Weight Kg Comodity Quantity 0 REFINERIA ISLA CURACAO B.V DINASA S.A CURACAO N.V. 12,956,396.00 ESSENCE POUR MOTEUR 1,223,922.00GAL KEROSENE 839,916.00GAL GAS-OIL 2,124,570.00GAL 0 REFINERIA ISLA CURACAO B.V SOGENER S.A CURACAO N.V. 1,363,531.00 GAS-OIL 419,202.00GAL 0 REFINERIA ISLA CURACAO B.V SOL HAITI SA CURACAO N.V. 13,685,513.00 ESSENCE POUR MOTEUR 801,024.00GAL KEROSENE 126,000.00GAL GAS-OIL 3,216,150.00GAL Bateau : CRISTINA EXPRESS Date Voyage : 03-APR-11 No Voyage : 166S Carrier : ANTILLEAN MARINE SHIPPING CORP CntrQty Shipper Consignee Port Weight Kg Comodity Quantity 1 ABC TOOLS INC BRICO LOCAL MIAMI 16,783.00 OUTIL DE TOUT TYPE, OUTIL INTERCHANGEABLE,COFFRE A 357.00PC OUTIL 0 ACKER DRILL COMPANY BANQUE NATIONALE DE CREDIT MIAMI 33,825.00 REMORQUE 2.00PC (BNC) CAMION 1.00UNIT 1 ALTERNATE ENERGY SOLUTIONS UNIGESTION HOLDING S.A MIAMI 6,407.00 BATTERIES 5.00SK 1 AMALGAME TRADINC INC. MAX METAYER MIAMI 18,841.00 TOILE METALLIQUE,GRILLAGE ET TRELLIS 62.00PC 1 AMERICAN GAS AND CYLINDER GAZ INDUSTRIELS ASSOCIES MIAMI 710.00 HYDROCARBURE ACYCLIQUE 20.00CYL S.A 1 ANGLADE LE CROIX ROSE LAURE TERRIER MIAMI 15,195.00 EFFETS PERSONNELS 1.00LOT 2 ATLANTIC CARIBBEAN BRASSERIE NATIONALE D'HAITIMIAMI 24,041.00 EMBALLAGE PLASTIQUE 55.00PA 1 BETTER FAMILY PRODUCTS COMPAGNIE HAITIENNE DE MIAMI 2,725.00 PARTIES,ACCESSOIRES 29.00SK MOTEURS VOITURE,TRACTEUR.BUS,DEPANEUSE,CAMION 1 BETTER FAMILY PRODUCTS MATPAR MIAMI 328.00 PLAQUE,FEUILLE,BANDE,AUTRE FORME PLATE AUTO-ADHESIF 1.00PA PLASTIQU 1 CPG GROUP CORP PEINTURES CARAIBES MIAMI 12,483.00 SOLVANT ET DILUANT ORGANIQUE COMPOPSITE,ENLEVER 80.00DR PEINTURE... 1 DROOMPAC DROOMPAC MIAMI 3,661.00 EFFETS PERSONNELS 11.00PC -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking.
Re: [iText-questions] Help
If the text is selectable in a PDF reader you can extract it, but with no it skills you're probably the wrong person for the job to do it. You could try contact iText consultancy and pay them to do the job for you but it's not a triv Kind regards Balder - Reply message - From: Tazio Baker tazioba...@gmail.com Date: Wed, Jun 15, 2011 22:12 Subject: [iText-questions] Help To: itext-questions@lists.sourceforge.net -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] Help
On 16/06/2011 8:23, Balder wrote: If the text is selectable in a PDF reader you can extract it, but with no it skills you're probably the wrong person for the job to do it. You could try contact iText consultancy Apparently you did that, seeing 1t3xt's answer :) and pay them to do the job for you but it's not a trivial Kind regards Balder - Reply message - From: Tazio Baker tazioba...@gmail.com Date: Wed, Jun 15, 2011 22:12 Subject: [iText-questions] Help To: itext-questions@lists.sourceforge.net I have no IT skills and I need to extract data from a PDF into an SQL database to create statistical reports. Please advice if I may attach a sample of the PDF report I'm confronted with. -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php -- @redlabbe http://twitter.com/redlabbe redlab-log http://www.redlab.be/blog -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
[iText-questions] Embedding java.awt Font Symbol on a windowsXP system
Hallo, I try to embed the java.awt.Font Symbol using the following code FontFactory.registerDirectories(); com.itextpdf.text.Font fTtf = FontFactory.getFont(f.getFontName()); try { fTtf = FontFactory.getFont(f.getFontName(),BaseFont.IDENTITY_H, BaseFont.EMBEDDED); } catch (Exception e) {} while f is the java.awt.Font Symbol. This throws an exception. Catching and replacing it with fTtf = FontFactory.getFont(f.getFontName(),fTtf.getBaseFont().getEncoding(), BaseFont.EMBEDDED); works but the Font isn't embedded and results in greek letters. I already searched the mail archive and found http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg10568. html [iText-questions] Cannot get glyphs rendering from the Symbol Font into the PDF file with the advice Use the encoding Symbol for the Symbol font.. But it doesn't work also. Thank You in advance for helping Sigi -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
[iText-questions] FW: Collapse bookmarks by default
If you set it manually in an Adobe product and save the file it appears to re-open with you last view.. Must be some flag somewhere so it would be interesting too see it there was a programatic way to set this.. john renfrew Right Way Up From: Mark Storer [mailto:msto...@autonomy.com] Sent: 15 June 2011 22:43 To: Post all your questions about iText here Subject: Re: [iText-questions] Collapse bookmarks by default I believe each bookmark has an open/close setting... and I'm wrong. It doesn't look like there's any way to control that what so ever. Humph. I'd have put money on that too. --Mark Storer Senior Software Engineer Cardiff.com import legalese.Disclaimer; DisclaimerCardiff DisCard = null; _ From: srikanth bapanapalli [mailto:srikant...@hotmail.com] Sent: Wednesday, June 15, 2011 10:16 AM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] Collapse bookmarks by default Hello, i created a pdf using itext, but it shows all bookmarks open. i want to be able to collapse bookmarks by default. how can i do that here is the code Document document = new Document(PageSize.A4.rotate()); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(filename)); writer.setViewerPreferences(PdfWriter.PageModeUseOutlines); // Working Correctly writer.setPageEvent(new PageNumber()); document.open(); Sreekanth _ From: srikant...@hotmail.com To: itext-questions@lists.sourceforge.net Subject: Collapse bookmarks by default Date: Wed, 15 Jun 2011 13:12:01 -0400 Hello, i created a pdf using itext, but it shows all bookmarks open. i want to be able to collapse bookmarks by default. how can i do that thanks, Sreekanth -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php-- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] Embedding java.awt Font Symbol on a windowsXP system
On 16/06/2011 10:10, Siegfried Raab wrote: Hallo, I try to embed the java.awt.Font Symbol java.awt? Are you using PdfGraphics2D? If not, please don't mention java.awt! using the following code /FontFactory.registerDirectories();/ /com.itextpdf.text.Font fTtf = FontFactory.getFont(f.getFontName());/ What is the value of f.getFontName()? Is that name present when you list the names registered in the FontFactory? If so: what type of font is it? I assume that you're referring to the standard Type 1 font named Symbol. // /try {/ /fTtf = FontFactory.getFont(f.getFontName(),BaseFont.IDENTITY_H, BaseFont.EMBEDDED);/ /} catch (Exception e) {}/ while /f/ is the java.awt.Font Symbol. Again: is it relevant that you're using java.awt.Font? It's confusing: it may set us in the wrong track, trying to diagnose your problem. In any case: the font you're referring to is the standard Type 1 font named Symbol, then using IDENTITY_H as encoding is wrong!!! This throws an exception. Catching and replacing it with /fTtf = FontFactory.getFont(f.getFontName(),fTtf.getBaseFont().getEncoding(), BaseFont.EMBEDDED);/ works but the Font isn't embedded and results in greek letters. Did you read any documentation at all? The fourteen standard Type 1 fonts (as defined in ISO-32000-1) are NEVER embedded by iText, UNLESS you provide a pfb containing the glyph description of that font. I already searched the mail archive and found [iText-questions] Cannot get glyphs rendering from the Symbol Font into the PDF file http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg10568.htmlwith the advice Use the encoding Symbol for the Symbol font.. But it doesn't work also. Standard Type 1 fonts are NEVER embedded. Symbol has a CUSTOM encoding. You shouldn't use IDENTITY_H for a standard Type 1 font. iText shows the documented behavior, but you claim it's wrong. Please read the documentation ( http://itextpdf.com/book/ ) before saying it doesn't work. -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] Embedding java.awt Font Symbol on a windowsXP system
Thank's for answering so kindly. 1. Yes, I use PdfGraphics2D 2. I refer to the java.awt.Font named Symbol 3. Although You suppose I didn't I read any documentation I did several times. I even bought it. And I know about Type1-Fonts and I know that they aren't embedded by iText. But I don't know that the awt.Font Symbol is interpreted as a type1 font by iText. 4. It seems You are supposing I am a lazy idiot. Thank You very much for doing so. By Von: 1T3XT BVBA [mailto:i...@1t3xt.info] Gesendet: Donnerstag, 16. Juni 2011 10:21 An: Post all your questions about iText here Betreff: Re: [iText-questions] Embedding java.awt Font Symbol on a windowsXP system On 16/06/2011 10:10, Siegfried Raab wrote: Hallo, I try to embed the java.awt.Font Symbol java.awt? Are you using PdfGraphics2D? If not, please don't mention java.awt! using the following code FontFactory.registerDirectories(); com.itextpdf.text.Font fTtf = FontFactory.getFont(f.getFontName()); What is the value of f.getFontName()? Is that name present when you list the names registered in the FontFactory? If so: what type of font is it? I assume that you're referring to the standard Type 1 font named Symbol. try { fTtf = FontFactory.getFont(f.getFontName(),BaseFont.IDENTITY_H, BaseFont.EMBEDDED); } catch (Exception e) {} while f is the java.awt.Font Symbol. Again: is it relevant that you're using java.awt.Font? It's confusing: it may set us in the wrong track, trying to diagnose your problem. In any case: the font you're referring to is the standard Type 1 font named Symbol, then using IDENTITY_H as encoding is wrong!!! This throws an exception. Catching and replacing it with fTtf = FontFactory.getFont(f.getFontName(),fTtf.getBaseFont().getEncoding(), BaseFont.EMBEDDED); works but the Font isn't embedded and results in greek letters. Did you read any documentation at all? The fourteen standard Type 1 fonts (as defined in ISO-32000-1) are NEVER embedded by iText, UNLESS you provide a pfb containing the glyph description of that font. I already searched the mail archive and found http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg10568. html [iText-questions] Cannot get glyphs rendering from the Symbol Font into the PDF file with the advice Use the encoding Symbol for the Symbol font.. But it doesn't work also. Standard Type 1 fonts are NEVER embedded. Symbol has a CUSTOM encoding. You shouldn't use IDENTITY_H for a standard Type 1 font. iText shows the documented behavior, but you claim it's wrong. Please read the documentation ( http://itextpdf.com/book/ ) before saying it doesn't work. -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] Embedding java.awt Font Symbol on a windowsXP system
On 16/06/2011 10:40, Siegfried Raab wrote: Thank's for answering so kindly. 1.Yes, I use PdfGraphics2D OK, so you're creating a FontMapper. Is that correct? (You didn't say in your original question.) 2.I refer to the java.awt.Font named Symbol If you map this font to the standard type 1 font symbol (which is what you seem to be doing), you won't be able to embed the glyphs. 3.Although You suppose I didn't I read any documentation I did several times. I even bought it. And I know about Type1-Fonts and I know that they aren't embedded by iText. But I don't know that the awt.Font Symbol is interpreted as a type1 font by iText. ??? But you're creating a FontMapper, meaning that you are looking to map java.awt fonts to iText fonts. YOU DECIDED how the java.awt font Symbol is interpreted. YOU DECIDED to use FontFactory to map the java.awt fonts. Did you check if FontFactory knows about the Symbol font, and if so, to which font it maps? 4.It seems You are supposing I am a lazy idiot. Your assumption is wrong. I was not supposing anything. I was referring to the documentation. If you need more detail: p483: There's a default font mapper class called DefaultFontMapper. This class maps [...] AWT font names to the standard Type 1 fonts. p352: Note that the BaseFont.EMBEDDED parameter will be ignored for the standard Type 1 fonts. p355: A Type 1 font can have a special built-in encoding, as is the case for Symbol and Zapf Dingbats. p482: Watch out when using fonts. There's a big difference between the java.awt.Font and com.itextpdf.text.Font font classes. On p482, there's a reference to section 14.5.2 that explains how to map a java.awt Font (e.g. Symbol) to an iText BaseFont. -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] How to convert Ms office documents to PDF
On 16/06/2011 10:59, Balajiprasad wrote: Hi, How to convert MS office Documents (Word/Excel/PP etc) to PDF. Need to convert Entire document including objects with colors. Is there any way to do with iTextsharp? NO, please read http://itextpdf.com/itext.php iText can convert an XML or an XHTML/CSS file to PDF (using XML Worker). Converting documents from one format to another is outside the scope of iText. And no: /iText does not convert Word documents to PDF!/ -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
[iText-questions] How to convert Ms office documents to PDF
Hi, How to convert MS office Documents (Word/Excel/PP etc) to PDF. Need to convert Entire document including objects with colors. Is there any way to do with iTextsharp??. Regards, R.Balajiprasad -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] Collapse bookmarks by default
You believe right. Each bookmark has an open/close state but it's not a flag, it's done with the /Count key in the outline dictionary. PdfOutline has an open/close flag to control this. Paulo From: Mark Storer [mailto:msto...@autonomy.com] Sent: Wednesday, June 15, 2011 10:43 PM To: Post all your questions about iText here Subject: Re: [iText-questions] Collapse bookmarks by default I believe each bookmark has an open/close setting... and I'm wrong. It doesn't look like there's any way to control that what so ever. Humph. I'd have put money on that too. --Mark Storer Senior Software Engineer Cardiff.com import legalese.Disclaimer; DisclaimerCardiff DisCard = null; From: srikanth bapanapalli [mailto:srikant...@hotmail.com] Sent: Wednesday, June 15, 2011 10:16 AM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] Collapse bookmarks by default Hello, i created a pdf using itext, but it shows all bookmarks open. i want to be able to collapse bookmarks by default. how can i do that here is the code Document document = new Document(PageSize.A4.rotate()); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(filename)); writer.setViewerPreferences(PdfWriter.PageModeUseOutlines); // Working Correctly writer.setPageEvent(new PageNumber()); document.open(); Sreekanth From: srikant...@hotmail.com To: itext-questions@lists.sourceforge.net Subject: Collapse bookmarks by default Date: Wed, 15 Jun 2011 13:12:01 -0400 Hello, i created a pdf using itext, but it shows all bookmarks open. i want to be able to collapse bookmarks by default. how can i do that thanks, Sreekanth Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message. -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] Livecycle generated PDF filled with iText doesn't print form fields
I tried that out and still didn't work. I used the JPedal library to print and it is working beautifully. Looks like ootb java printing couldn't handle printing the pdf successfully. Thanks for all your help Regards, Aditya Gollakota On 8 June 2011 21:46, Aditya Gollakota aditya.gollak...@gmail.com wrote: Thanks, I'll try that tomorrow at work and let you know how it goes. Regards, Aditya Gollakota On 8 June 2011 21:41, Leonard Rosenthol lrose...@adobe.com wrote: Yup! *From:* Aditya Gollakota [mailto:aditya.gollak...@gmail.com] *Sent:* Wednesday, June 08, 2011 7:35 AM *To:* Post all your questions about iText here *Subject:* Re: [iText-questions] Livecycle generated PDF filled with iText doesn't print form fields So do a form.removeXfa() after populating the fields? Regards, Aditya Gollakota On Jun 8, 2011 9:33 PM, Leonard Rosenthol lrose...@adobe.com wrote: If you're flattening, be sure to throw away the XFA! -Original Message- From: 1T3XT BVBA [mailto:i...@1t3xt.info] Sent: Wednesday, June 08, 2011 1:48 AM To: Post all your questions about iText here Subject: Re: [iText-questions] Livecycle generated PDF filled with iText doesn't print form fields On 8/06/2011 7:42, Aditya Gollakota wrote: Hi, When I create the PDF template from Livecycle, I choose to save it as a static form, so when I use the method stamper.getAcroFields(), along with form.getFields(), the key to the MapString,Item has a list of the fields in the PDF template. They look like Header[0].ReceiptNumber[0] Header[0].CustomerName[0] OK, then we've established that you do have AcroForm fields. You also throw away all interactivity, because you're using setFormFlattening(true); What happens if you open the PDF that is filled out in Adobe Reader? Does it look OK? Are the fields filled in? -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for
Re: [iText-questions] remove watermark layer
I have stopped using this code, since it completely clears page 1 in some of the files. I could not consistently re-create the issue re-processing the same file in debug environment worked. Instead - system code changed to locate the clean file and add watermark to it. PS. We paid for the iText license after we got the code, out of respect and appreciation to the effort. iText is still the main system PDF processing API -- View this message in context: http://itext-general.2136553.n4.nabble.com/remove-watermark-layer-tp2264258p3602134.html Sent from the iText - General mailing list archive at Nabble.com. -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] remove watermark layer
On 16/06/2011 13:25, jjalink wrote: I have stopped using this code, since it completely clears page 1 in some of the files. I don't remember the context of the problem. Is it about OCG? Note that two OCG bugs were fixed in iText 5.1.1: http://itextpdf.com/history/?branch=51node=511 * Bugfix in |PdfLayer| and |PdfWriter|: The |/Usage| of an OCG layer doesn't have to be a direct object; it can also be an indirect reference. * Bugfix in |PdfWriter|: The |/D| and |/AS| in the context of OCG don't have to be direct objects; it can also be indirect references. We were able to fix these bugs thanks to somebody who posted an example that could be used to reproduce the problem. (As opposed to Paul Cooper who said it doesn't work, but didn't provide proof.) As for any custom way to remove an OCG layer: that's not implemented yet, but it's on the development board: See http://lowagie.com/node/173 Under TK, there's a bullet removing OCG layer (scheduled for September at the earliest). -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] Help
Thank u for you assistance, sadly what i need and what i can get out of iText do not match. Have a good one, On Thu, Jun 16, 2011 at 1:31 AM, 1T3XT BVBA i...@1t3xt.info wrote: On 15/06/2011 22:12, Tazio Baker wrote: I have no IT skills and I need to extract data from a PDF into an SQL database to create statistical reports. What makes you think this is possible? You are using PDF as a format to store data! What makes you think that's the purpose of PDF? Please read: http://lowagie.com/node/136 What you are asking can be compared with this: you're giving us tomato soup, and you ask us to extract the tomatoes. Do you think that's possible? Please advice if I may attach a sample of the PDF report I'm confronted with. You forgot to attach the PDF, but it was forwarded to me from another address you've sent it too. The PDF wasn't tagged, therefore there is NO STRUCTURE WHATSOEVER in the file. I've extracted the content of the first page. I've copied the result and pasted it below. If you can do anything with that plain text, then we can talk. If you can't, then you're trying to do something that is impossible. The PDF was created using Oracle PDF driver. This means the data you need is probably stored in a database somewhere. Use that data! stat_items Page 1 AGENCES MARITIMES REUNIES S.A : STATISTIQUES COMMERCIALES Rapport Du 01/04/11 Au 30/04/11 Bateau : CAMION DOMINICAIN Date Voyage : 01-APR-11 No Voyage : 010411 Carrier : CROWLEY LINER SERVICES,INC CntrQty Shipper Consignee Port Weight Kg Comodity Quantity 2 GILDAN ACTIVEWEAR TEXTILE GLOBAL MANUFAC CONTRACTORSANTO DOMINGO 2.00 CONTENEURS VIDES 2.00UNIT COMPANY 3 GILDAN ACTIVEWEAR TEXTILE MULTIWEAR S,A SANTO DOMINGO 3.00 CONTENEURS VIDES 3.00UNIT COMPANY 1 GILDAN ACTIVEWEAR TEXTILE SEWING INTERNATIONAL S.A SANTO DOMINGO 1.00 CONTENEURS VIDES 1.00UNIT COMPANY Bateau : VIKING PRINCESS Date Voyage : 01-APR-11 No Voyage : 020 Carrier : EUKOR CARS CARRIER CntrQty Shipper Consignee Port Weight Kg Comodity Quantity 0 HYUNDAI CORPORATION LES MOTEURS REUNIS GUNSAN 83,045.00 VOITURES SUV 50.00UNIT 0 HYUNDAI MOTORS COMPANY SUN AUTO S.A ULSAN 25,432.00 BUS 2.00UNIT VOITURES SUV 14.00UNIT 0 IBC JAPAN LTD PARTICULIER KOBE 9,410.00 VOITURE D'OCCASION 5.00UNIT 0 PARTICULIER PARTICULIER MANZANILLO 10,000.00 BUS, CAMIONS D'OCCASION 1.00UNIT 0 RAMA D.B.K.LTD PARTICULIER YOKOHAMA 4,290.00 VOITURE D'OCCASION 2.00UNIT 0 YOKOHAMA TRADING PARTICULIER YOKOHAMA 1,960.00 VOITURE D'OCCASION 1.00UNIT INTERNATIONAL CO Bateau : BITU MOUNTAIN Date Voyage : 02-APR-11 No Voyage : XXX Carrier : NOT AVAILABLE CntrQty Shipper Consignee Port Weight Kg Comodity Quantity 0 SARGEANT TRADING LTD GROUPMENT INGIENERIA MOBILE 1,770,983.00 ASPHALTES 451,881.00GAL BAHAMAS ESTRELLA Bateau : CAMION DOMINICAIN Date Voyage : 02-APR-11 No Voyage : 020411 Carrier : CROWLEY LINER SERVICES,INC CntrQty Shipper Consignee Port Weight Kg Comodity Quantity 1 GILDAN ACTIVEWEAR TEXTILE GLOBAL MANUFAC CONTRACTORSANTO DOMINGO 1.00 CONTENEURS VIDES 1.00UNIT COMPANY Bateau : IVER PROSPERITY Date Voyage : 02-APR-11 No Voyage : XXX Carrier : NOT AVAILABLE CntrQty Shipper Consignee Port Weight Kg Comodity Quantity 0 REFINERIA ISLA CURACAO B.V DINASA S.A CURACAO N.V. 12,956,396.00 ESSENCE POUR MOTEUR 1,223,922.00GAL KEROSENE 839,916.00GAL GAS-OIL 2,124,570.00GAL 0 REFINERIA ISLA CURACAO B.V SOGENER S.A CURACAO N.V. 1,363,531.00 GAS-OIL 419,202.00GAL 0 REFINERIA ISLA CURACAO B.V SOL HAITI SA CURACAO N.V. 13,685,513.00 ESSENCE POUR MOTEUR 801,024.00GAL KEROSENE 126,000.00GAL GAS-OIL 3,216,150.00GAL Bateau : CRISTINA EXPRESS Date Voyage : 03-APR-11 No Voyage : 166S Carrier : ANTILLEAN MARINE SHIPPING CORP CntrQty Shipper Consignee Port Weight Kg Comodity Quantity 1 ABC TOOLS INC BRICO LOCAL MIAMI 16,783.00 OUTIL DE TOUT TYPE, OUTIL INTERCHANGEABLE,COFFRE A 357.00PC OUTIL 0 ACKER DRILL COMPANY BANQUE NATIONALE DE CREDIT MIAMI 33,825.00 REMORQUE 2.00PC (BNC) CAMION 1.00UNIT 1 ALTERNATE ENERGY SOLUTIONS UNIGESTION HOLDING S.A MIAMI 6,407.00 BATTERIES 5.00SK 1 AMALGAME TRADINC INC. MAX METAYER MIAMI 18,841.00 TOILE METALLIQUE,GRILLAGE ET TRELLIS 62.00PC 1 AMERICAN GAS AND CYLINDER GAZ INDUSTRIELS ASSOCIES MIAMI 710.00 HYDROCARBURE ACYCLIQUE 20.00CYL S.A 1 ANGLADE LE CROIX ROSE LAURE TERRIER MIAMI 15,195.00 EFFETS PERSONNELS 1.00LOT 2 ATLANTIC CARIBBEAN BRASSERIE NATIONALE D'HAITIMIAMI 24,041.00 EMBALLAGE PLASTIQUE 55.00PA 1 BETTER FAMILY PRODUCTS COMPAGNIE HAITIENNE DE MIAMI 2,725.00 PARTIES,ACCESSOIRES 29.00SK MOTEURS VOITURE,TRACTEUR.BUS,DEPANEUSE,CAMION 1 BETTER FAMILY PRODUCTS MATPAR MIAMI 328.00 PLAQUE,FEUILLE,BANDE,AUTRE FORME PLATE AUTO-ADHESIF 1.00PA PLASTIQU 1 CPG GROUP CORP PEINTURES CARAIBES MIAMI 12,483.00 SOLVANT ET DILUANT ORGANIQUE COMPOPSITE,ENLEVER 80.00DR PEINTURE... 1 DROOMPAC DROOMPAC MIAMI 3,661.00 EFFETS PERSONNELS 11.00PC
Re: [iText-questions] Help
On 16/06/2011 14:12, Tazio Baker wrote: Thank u for you assistance, sadly what i need and what i can get out of iText do not match. That's not an iText problem. It's because PDF, unless tagged, doesn't know anything about the table structure in your PDF. iText can extract the text (and coordinates), but you can't perform SQL on a PDF. -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] How to convert Ms office documents to PDF
You will want to look into OpenOffice. Running an instance of the server software, you can use library functions and learn to easily convert your documents (e.g. Word, Excel, PowerPoint, etc.) in a very short amount of time. Ed -- Message: 1 Date: Thu, 16 Jun 2011 14:29:55 +0530 From: Balajiprasad balajipra...@maxval-soft.com Subject: [iText-questions] How to convert Ms office documents to PDF To: i...@1t3xt.info, 'Post all your questions about iText here' itext-questions@lists.sourceforge.net Message-ID: 003601cc2c03$c4722240$4d5666c0$@com Content-Type: text/plain; charset=us-ascii Hi, How to convert MS office Documents (Word/Excel/PP etc) to PDF. Need to convert Entire document including objects with colors. Is there any way to do with iTextsharp??. Regards, R.Balajiprasad -- next part -- An HTML attachment was scrubbed... -- -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] [SPAM] How to convert Ms office documents to PDF
iTextSharp cannot do this. However, www.WindwardReports.comhttp://www.WindwardReports.com will do exactly what you want - it converts full formatting (and uses iTextSharp). Thanks - dave David Thielen - CTO/founder 303-499-2544 x1185 720-352-0676 (cell) www.windwardreports.comhttp://www.windwardreports.com/ World's coolest blog - Windward Wrocks!http://blogs.windwardreports.com/davidt/ Follow me on Twitter - David At Windwardhttp://twitter.com/DavidAtWindward From: Balajiprasad [mailto:balajipra...@maxval-soft.com] Sent: Thursday, June 16, 2011 3:00 AM To: i...@1t3xt.info; 'Post all your questions about iText here' Subject: [SPAM] [iText-questions] How to convert Ms office documents to PDF Hi, How to convert MS office Documents (Word/Excel/PP etc) to PDF. Need to convert Entire document including objects with colors. Is there any way to do with iTextsharp??. Regards, R.Balajiprasad -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] Collapse bookmarks by default
Well there you have it. I was skimming the spec, saw count and ass-u-me'd it worked like the Pages dictionary's count. Nope. And here's a link to the relevant JavaDoc: http://api.itextpdf.com/itext/com/itextpdf/text/pdf/PdfOutline.html#setOpen(boolean) --Mark Storer Senior Software Engineer Cardiff.com import legalese.Disclaimer; DisclaimerCardiff DisCard = null; From: Paulo Soares [mailto:psoa...@glintt.com] Sent: Thursday, June 16, 2011 2:32 AM To: Post all your questions about iText here Subject: Re: [iText-questions] Collapse bookmarks by default You believe right. Each bookmark has an open/close state but it's not a flag, it's done with the /Count key in the outline dictionary. PdfOutline has an open/close flag to control this. Paulo From: Mark Storer [mailto:msto...@autonomy.com] Sent: Wednesday, June 15, 2011 10:43 PM To: Post all your questions about iText here Subject: Re: [iText-questions] Collapse bookmarks by default I believe each bookmark has an open/close setting... and I'm wrong. It doesn't look like there's any way to control that what so ever. Humph. I'd have put money on that too. --Mark Storer Senior Software Engineer Cardiff.com import legalese.Disclaimer; DisclaimerCardiff DisCard = null; From: srikanth bapanapalli [mailto:srikant...@hotmail.com] Sent: Wednesday, June 15, 2011 10:16 AM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] Collapse bookmarks by default Hello, i created a pdf using itext, but it shows all bookmarks open. i want to be able to collapse bookmarks by default. how can i do that here is the code Document document = new Document(PageSize.A4.rotate()); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(filename)); writer.setViewerPreferences(PdfWriter.PageModeUseOutlines); // Working Correctly writer.setPageEvent(new PageNumber()); document.open(); Sreekanth From: srikant...@hotmail.com To: itext-questions@lists.sourceforge.net Subject: Collapse bookmarks by default Date: Wed, 15 Jun 2011 13:12:01 -0400 Hello, i created a pdf using itext, but it shows all bookmarks open. i want to be able to collapse bookmarks by default. how can i do that thanks, Sreekanth Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message. -- EditLive Enterprise is the world's most technically advanced content authoring
Re: [iText-questions] Collapse bookmarks by default
Iam not using PdfOutLine. Iam using Anchor ro create Tree. How can i make collapsable Tree. My code is like this public void createPdf(String filename) throws Exception { DatabaseConnection connection = new DB2Connection(); Document document = new Document(PageSize.A4.rotate()); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(filename)); writer.setViewerPreferences(PdfWriter.PageModeUseOutlines); writer.setPageEvent(new PageNumber()); document.open(); ListString empId = getEmployeeId(connection); for (String EmpId : empId) { Anchor anchor = new Anchor(EmpId, catFont); ListDate selectDate = getSelectedDate(connection, EmpId); addContent(connection, document, anchor, selectDate, EmpId); } document.close(); connection.close(); } Sreekanth Bapanapalli Date: Thu, 16 Jun 2011 08:55:20 -0700 From: msto...@autonomy.com To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] Collapse bookmarks by default Well there you have it. I was skimming the spec, saw count and ass-u-me'd it worked like the Pages dictionary's count. Nope. And here's a link to the relevant JavaDoc: http://api.itextpdf.com/itext/com/itextpdf/text/pdf/PdfOutline.html#setOpen(boolean) --Mark Storer Senior Software Engineer Cardiff.com import legalese.Disclaimer; DisclaimerCardiff DisCard = null; From: Paulo Soares [mailto:psoa...@glintt.com] Sent: Thursday, June 16, 2011 2:32 AM To: Post all your questions about iText here Subject: Re: [iText-questions] Collapse bookmarks by default You believe right. Each bookmark has an open/close state but it's not a flag, it's done with the /Count key in the outline dictionary. PdfOutline has an open/close flag to control this. Paulo From: Mark Storer [mailto:msto...@autonomy.com] Sent: Wednesday, June 15, 2011 10:43 PM To: Post all your questions about iText here Subject: Re: [iText-questions] Collapse bookmarks by default I believe each bookmark has an open/close setting... and I'm wrong. It doesn't look like there's any way to control that what so ever. Humph. I'd have put money on that too. --Mark Storer Senior Software Engineer Cardiff.com import legalese.Disclaimer; DisclaimerCardiff DisCard = null; From: srikanth bapanapalli [mailto:srikant...@hotmail.com] Sent: Wednesday, June 15, 2011 10:16 AM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] Collapse bookmarks by default Hello, i created a pdf using itext, but it shows all bookmarks open. i want to be able to collapse bookmarks by default. how can i do that here is the code Document document = new Document(PageSize.A4.rotate()); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(filename)); writer.setViewerPreferences(PdfWriter.PageModeUseOutlines); // Working Correctly writer.setPageEvent(new PageNumber()); document.open(); Sreekanth From: srikant...@hotmail.com To: itext-questions@lists.sourceforge.net Subject: Collapse bookmarks by default Date: Wed, 15 Jun 2011 13:12:01 -0400 Hello, i created a pdf using itext, but it shows all bookmarks open. i want to be able to collapse bookmarks by default. how can i do that thanks, Sreekanth Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message. -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] Collapse bookmarks by default
On 16/06/2011 20:19, srikanth bapanapalli wrote: I am using Anchor ro create Tree. Huh? How would that work? It doesn't show in your code. I probably don't understand the question. Then again: does anybody understand what you mean? -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
[iText-questions] iText Open PDF and apply annotations from XML
Hey everyone, I am very stuck on this problem. Have been working on it for a few days. I have a PDF and what looks like a standard Adobe XMP annotations XML file. I want to open the PDF with iText and put the annotations onto the pdf, and save it to the file system. The annotations are what I call overlays. Say there is a price for a product, one of our AP reps puts an annotation over the price with the correct price. When they save it in the tool it saves the regular PDF and the annotations XML file. Below are my two examples. Any and all help is much appreciated! Thanks in advance --Ben Try #1: PdfReader reader = new PdfReader(D:\\Temp\\Ann\\ 5CCB.pdf); PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(D:\\Temp\\Ann\\ben.pdf)); File ssaFile = new File(D:\\Temp\\Ann\\5CCB.xml); FileInputStream ssaFIN = new FileInputStream(ssaFile); byte ssaFileContent[] = new byte[(int)ssaFile.length()]; ssaFIN.read(ssaFileContent); stamper.setXmpMetadata(ssaFileContent); stamper.close(); Try #2: Document document = new Document(); File pdfFile = new File(D:\\Temp\\Ann\\5CCB.pdf); File ssaFile = new File(D:\\Temp\\Ann\\5CCB.ssa); String outputFilename = D:\\Temp\\Ann\\ben.pdf; PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(outputFilename)); document.open(); PdfContentByte cb = writer.getDirectContent(); PdfReader reader = new PdfReader(D:\\Temp\\Ann\\5CCB.pdf); int n = reader.getNumberOfPages(); PdfImportedPage page = null; for (int i = 1; i = n; i++) { document.newPage(); page = writer.getImportedPage(reader, i); cb.addTemplate(page, 0, 0); } FileInputStream ssaFIN = new FileInputStream(ssaFile); byte ssaFileContent[] = new byte[(int)ssaFile.length()]; ssaFIN.read(ssaFileContent); writer.setXmpMetadata(ssaFileContent); document.close(); -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] iText Open PDF and apply annotations from XML
Your problem is that you do NOT want XMP - you want FDF (or XFDF). From: Benjamin Nutting [mailto:benja...@nutting.info] Sent: Thursday, June 16, 2011 8:21 PM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] iText Open PDF and apply annotations from XML Hey everyone, I am very stuck on this problem. Have been working on it for a few days. I have a PDF and what looks like a standard Adobe XMP annotations XML file. I want to open the PDF with iText and put the annotations onto the pdf, and save it to the file system. The annotations are what I call overlays. Say there is a price for a product, one of our AP reps puts an annotation over the price with the correct price. When they save it in the tool it saves the regular PDF and the annotations XML file. Below are my two examples. Any and all help is much appreciated! Thanks in advance --Ben Try #1: PdfReader reader = new PdfReader(D:\\Temp\\Ann\\ 5CCB.pdf); PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(D:\\Temp\\Ann\\ben.pdf)); File ssaFile = new File(D:\\Temp\\Ann\\5CCB.xml); FileInputStream ssaFIN = new FileInputStream(ssaFile); byte ssaFileContent[] = new byte[(int)ssaFile.length()]; ssaFIN.read(ssaFileContent); stamper.setXmpMetadata(ssaFileContent); stamper.close(); Try #2: Document document = new Document(); File pdfFile = new File(D:\\Temp\\Ann\\5CCB.pdf); File ssaFile = new File(D:\\Temp\\Ann\\5CCB.ssa); String outputFilename = D:\\Temp\\Ann\\ben.pdf; PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(outputFilename)); document.open(); PdfContentByte cb = writer.getDirectContent(); PdfReader reader = new PdfReader(D:\\Temp\\Ann\\5CCB.pdf); int n = reader.getNumberOfPages(); PdfImportedPage page = null; for (int i = 1; i = n; i++) { document.newPage(); page = writer.getImportedPage(reader, i); cb.addTemplate(page, 0, 0); } FileInputStream ssaFIN = new FileInputStream(ssaFile); byte ssaFileContent[] = new byte[(int)ssaFile.length()]; ssaFIN.read(ssaFileContent); writer.setXmpMetadata(ssaFileContent); document.close(); -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php