Force Show/Hide of PDF Elements

Last post 07-22-2010, 7:34 AM by shahzad.latif. 10 replies.
Sort Posts: Previous Next
  •  02-04-2010, 4:41 PM 220846

    Force Show/Hide of PDF Elements .NET

    I am having difficulty with your Aspose.PDF library to accomplish certain tasks.  I have been able to find proper API to detect/create bookmarks, annotations, metadata, attached files, and notes.

    What I am unable to do however is force a file to display or hide bookmarks, annotations, attachments, and/or notes.  I believe this is a setting with the PDF files as I am able to set them when I develop new PDFs from either Adobe Acrobat or a tool such as iTextSharp.  What I want to do is modify an existing file and change the settings to display
       - Bookmarks Panel
       - Attachments Panel
       - Notes Panel
       - Annotations

    Please advise on as to how I can do this with your API,
     
  •  02-05-2010, 9:00 AM 220985 in reply to 220846

    Re: Force Show/Hide of PDF Elements

    Hi Kunal,

    We're looking into your requirement and you'll be updated the earliest possible.

    We're sorry for the inconvenience.
    Regards,


    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  02-09-2010, 12:18 AM 221340 in reply to 220985

    Re: Force Show/Hide of PDF Elements

    Hi Kunal,

    We're looking into your requirement, however we need a little more input from your side. The only panels available in Adobe Reader, or other viewers for that matter, are as follows:

    Articles
    Attachements
    Comments
    Layers
    Model Tree
    Pages

    Are you interested to be able to show/hide all of the above panels individually? Moreover, can you please share which 'Notes Panel' are you referring too? Is it the 'Comments Panel'? Also, are you interested to be able to show/hide annotations inside the PDF pages?

    Please share your thoughts in detail so we could proceed further to help you out.
    Regards,


    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  02-09-2010, 8:41 PM 221548 in reply to 221340

    Re: Force Show/Hide of PDF Elements

    This is correct, sorry for the confusion, notes and annotations i believe are the same thing.

    Otherwise yes - I am trying to either show/hide each of these panels.  I want to see if there is any content, and if there is display such a panel, if there is no content then that panel can remain as is (hidden or shown, whatever the file setting was)

    Thank you
     
  •  02-10-2010, 11:23 AM 221701 in reply to 221548

    Re: Force Show/Hide of PDF Elements

    Hi Kunal,

    Thank you very much for sharing the details. We're looking into your requirement and you'll be updated shortly.

    We're sorry for the inconvenience.
    Regards,


    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  02-11-2010, 4:05 AM 221854 in reply to 221701

    Re: Force Show/Hide of PDF Elements

    Hi Kunal,

    I'm sorry to inform you that this feature is currently not available. However, I have logged a new feature request as PDFKITNET-14297 in our issue tracking system for this requirement. Our team will look into this and you'll be updated via this forum thread once the feature is supported.

    We're sorry for the inconvenience.
    Regards,


    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  03-09-2010, 4:45 AM 226230 in reply to 221854

    Re: Force Show/Hide of PDF Elements

    Hi Kunal,

    I would like to update you that Aspose.Pdf.Kit allows you to show or hide some of the panels using PdfContentEditor and ViewerPreference classes. These are the only panels which are allowed by PDF specifications; other elements, which are not allowed according to the specification can't be provided in Aspose.Pdf.Kit.

    Please see an example below:

                      //creat PdfContentEditor and bind pdf file
                      Aspose.Pdf.Kit.PdfContentEditor editor = new Aspose.Pdf.Kit.PdfContentEditor();
                      editor.BindPdf("input.pdf");

                      //show pages panel
                      editor.ChangeViewerPreference(ViewerPreference.PageModeUseThumbs);
                      //show optional content panel
                      editor.ChangeViewerPreference(ViewerPreference.PageModeUseOC);
                      //show document outlines panel
                      editor.ChangeViewerPreference(ViewerPreference.PageModeUseOutlines);
                      //show attachment panel
                      editor.ChangeViewerPreference(ViewerPreference.PageModeUseAttachment);
                      editor.Save("output.pdf");
    You can also find all other possible flags in ViewerPreference class. Please see the available options in detail to find if it satisfy your requirement.

    If you have any further questions, please do let us know.
    Regards,


    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  07-20-2010, 12:01 PM 249544 in reply to 226230

    Re: Force Show/Hide of PDF Elements

    Thanks this has been most helpful.

    There is one issue I see which is adobe allows any of the following items to be displayed

    Pages | Bookmarks | Layers AND
    Comments | Attachments

    Aspose's code only marks the last selected ViewerPreference.

    Is it possible to show 1 item from each group adobe supports, rather than just 1 item out of the 5?

    Meaning can I show Pages and Attachments instead of just Pages or attachments?

    Thanks
     
  •  07-21-2010, 11:57 AM 249730 in reply to 249544

    Re: Force Show/Hide of PDF Elements

    Hi Kunal,

    I have tested this issue at my end and noticed that only one panel is being displayed at one time. I just wanted to make sure that we're on the same page regarding this issue. Do you want to open multiple panels at the same time i.e. Pages and Attachment panels, using Aspose.Pdf.Kit?

    Please confirm, so we could move forward.
    Regards,


    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  07-21-2010, 1:54 PM 249755 in reply to 249730

    Re: Force Show/Hide of PDF Elements

    That is correct.  But it is not even possible in adobe to show any 2 panels. 

    only one from
    Pages | Bookmarks | Layers AND

    one from
    Comments | Attachments


    So Pages + Comments or Pages + Attachments or Bookmarks + comments or Bookmarks + attachments, etc
     
  •  07-22-2010, 7:34 AM 249899 in reply to 249755

    Re: Force Show/Hide of PDF Elements

    Hi Kunal,

    Thank you very much for the confirmation. I have logged this issue as PDFKITNET-18677 in our issue tracking system. Our team will look into this issue and you'll be updated via this forum thread once it is resolved.

    We're sorry for the inconvenience.
    Regards,

    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
View as RSS news feed in XML