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