It seems that when using iText 2.1.2 and 2.1.2u that preference
PdfWriter.PageModeUseAttachments cause the PDF to open in full screen mode.
When compiled with 2.1.1, the attachment panel appears as expected.
======================================================
import java.io.FileOutputStream ;
import com.lowagie.text.Document ;
import com.lowagie.text.Paragraph ;
import com.lowagie.text.pdf.PdfWriter ;
public class HelloWorld
{
public static void main ( String[] args ) throws Exception
{
System.out.println ( "Hello World" ) ;
Document document = new Document () ;
PdfWriter writer = PdfWriter.getInstance ( document, new
FileOutputStream ( "HelloWorld.pdf" ) ) ;
/*
PdfWriter.PageModeUseAttachments
2.11 - Show attachments panel
2.12 - Goes full screen mode
*/
int preferences = PdfWriter.PageModeUseAttachments ;
// int preferences = PdfWriter.PageModeFullScreen ;
System.out.println ( "FullScreen " +
PdfWriter.PageModeFullScreen ) ;
System.out.println ( "UseAttachments " +
PdfWriter.PageModeUseAttachments ) ;
writer.setViewerPreferences ( preferences ) ;
document.open () ;
document.add ( new Paragraph ( "Hello World" ) ) ;
document.close () ;
}
}
======================================================
regards
> Alick Buckley
>
> LANSA Research and Development
> LANSA Pty Ltd
>
> Phone: +61289070243
>
> http://www.lansa.com
> mailto:[EMAIL PROTECTED]
>
>
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar