My problem is exactly like scenerio 1, but when i tried to impliment like you 
mentioned
PdfWriter.setViewerPreferences method has only one parameter and 
 
when i did like this 
 
Document document = new Document(PageSize.A4.rotate());
PdfWriter writer = PdfWriter.getInstance(document, new 
FileOutputStream(filename));
writer.setViewerPreferences(1);
 
nothing has been changed.
 
Please advice.

thanks,
Sreekanth Bapanapalli 

 


 

> Date: Tue, 14 Jun 2011 09:46:39 -0700
> From: msto...@autonomy.com
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Default open bookmark
> 
> There are two possible interpretations of your question:
> 1) How can I display the bookmark tree when the PDF is opened (probably
> not what you meant)?
> 
> myPdfWriter.setViewerPreferences(PdfName.NONFULLSCREENPAGEMODE,
> PdfName.USEOUTLINES);
> 
> 2) How can I display a bookmark's destination when the PDF is opened.
> 
> It's not possible to define the "open action" in terms of a bookmark.
> But all is not lost, you can define the document open action as a
> destination, just like you did the bookmark.
> 
> PdfAction destinationAction = PdfAction.gotoLocalPage(pageNum, dest,
> myPdfWriter);
> myPdfWriter.setOpenAction( destinationAction );
> 
> "dest" may well be exactly the same object you used to define the
> bookmark.
> 
> --Mark Storer
> Senior Software Engineer
> Cardiff.com
> 
> import legalese.Disclaimer;
> Disclaimer<Cardiff> DisCard = null;
> 
> 
> 
> > -----Original Message-----
> > From: srikanth bapanapalli [mailto:srikant...@hotmail.com] 
> > Sent: Tuesday, June 14, 2011 7:42 AM
> > To: itext-questions@lists.sourceforge.net
> > Subject: [iText-questions] Default open bookmark
> > 
> > Iam trying to code using itext to create bookmark, but after 
> > creating PDF it always doesn't show bookmark initially, we 
> > have to explicitly open the bookmark . Can we default to open it
> > 
> > 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
                                          
------------------------------------------------------------------------------
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

Reply via email to