Apologies if this sends more than once - my mails keep bouncing back. Here is the scenario...
I have a pdf document (A) that contains an embedded movie file. I want to create a new pdf (B), add some pages of my own and then import pdf A and stamp a page number over it. When I try to do this the output file B is tiny (28kb) considering the size of A (7mb). Instead of the whole video clip getting imported, there is just an image placeholder there. Here is some extracted code to show you what I am doing... I cant attach the input file as the mailing list rejects it because of its size PdfReader reader=new PdfReader("A_input.pdf"); Document document= new Document (com.lowagie.text.PageSize.LETTER, 42f, 42f, 36f, 36f); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(mainBook)); document.open(); PdfImportedPage page; PdfImportedPage blankPage; PdfContentByte cb = writer.getDirectContent(); page = writer.getImportedPage(reader, 1); cb.addTemplate(page, 1f, 0, 0, 1f, 0, 0); //code to stamp a page number over the current page cb.beginText(); cb.setFontAndSize(bf, TextFontSize); cb.setRGBColorFillF(255f, 255f, 255f); cb.showTextAligned(PdfContentByte.ALIGN_CENTER, String.valueOf(pageNumber), width-TextXIndent, height-TextYIndent, rotation); cb.endText(); document.close(); ______________________________________________________ Click here to donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/
B_output.PDF
Description: 1444694119-B_output.PDF