Hello,

This is my first time using iText and I must say that I'm very pleased with
how easily it's made the process of creating a PDF that mostly suits my
requirements.

I've created a Flex application (which compiles down to a Flash "swf" file)
that I need to embed into a PDF. I've managed to embed the file in and have
it play automatically quite simply with:

      PdfFileSpecification spec = PdfFileSpecification.fileEmbedded(writer,
path, "Post Event Report", null, false);
      PdfAnnotation annot = PdfAnnotation.createScreen(writer, r, path,
spec, "application/x-shockwave-flash", true);
      writer.addAnnotation(annot);

This all works fine. My problem though, is that the screen annotation will
not print.

In the source for createScreen, I note that it says:

        ann.put (PdfName.F , new PdfNumber(FLAGS_PRINT));

Which indicates that the annotation should be printed. However, on looking
through the PDF 1.6 manual, it appears that the screen annotation will not
be printed unless I also set the normal appearence stream to something
appropriate. I've tried doing this with:

      PdfTemplate printing = PdfTemplate.createTemplate(writer,
document.getPageSize().getWidth(), document.getPageSize().getHeight());
      annot.setAppearance(PdfName.N, printing);

However, printing still returns a blank page. Does anyone have any
suggestions on the options that I should be setting for the PdfTemplate
object (corresponds to a PDF Form XObject)? Or is there another way of
getting this to work?

I look forward to your response...




Aaron Watkins
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to