Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Export page range.
    To export specific pages  you should just to setup ExportOptions class, and then export as before.

    Code Block
    ExportOptions options = new ExportOptions
    {
       FirstPage = 5,
       LastPage = 8
    };

    Result: will be exported document pages started from page 6 and ending page 9.

    Code Block
    ExportOptions options = new ExportOptions
    {
       FirstPage = 4,
       LastPage = 4
    };

    Result: document will contain only one page with index 5.

    Note: there will be no effect if:

    • FirstPage > LastPage

    • If FirstPage or / and LastPage < 0

    • If LastPage > document pages number

     

  2. Export only pages with annotations.
    To export only pages that contains annotations you should specify AnnotatedPages = true of ExportOptions class.

    Code Block
    ExportOptions options = new ExportOptions
    {
        AnnotatedPages = true
    };

    Result: document that contains only annotated pages.

    Code Block
    ExportOptions options = new ExportOptions
    {
      FirstPage = 5,
      LastPage = 8,
      AnnotatedPages = true
    };

    Result: A document that contains only annotated pages inside this page range. If  If there are not annotated pages, then the document will contains only page pages from a specific range.

     

  3. Export annotations of specific types.

    Code Block
    List<AnnotationType> typesToExport = new List<AnnotationType>();
    typesToExport.Add(AnnotationType.Area);
    typesToExport.Add(AnnotationType.Polyline);
     
    ExportOptions options = new ExportOptions
    {
       AnnotationTypes = typesToExport
    };

    Result: A document that contains only Area and Polyline annotations.

    Code Block
    List<AnnotationType> typesToExport = new List<AnnotationType>();
    typesToExport.Add(AnnotationType.Area);
     
    ExportOptions options = new ExportOptions
    {
      AnnotationTypes = typesToExport,
      AnnotatedPages = true
    };

    Result: A document that contains only annotated pages with only Area annotations.

    Code Block
    List<AnnotationType> typesToExport = new List<AnnotationType>();
    typesToExport.Add(AnnotationType.Area);
     
    ExportOptions options = new ExportOptions
    {
       FirstPage = 5,
       LastPage = 8,
       AnnotationTypes = typesToExport,
       AnnotatedPages = true
    };

    Result: A document that contains only annotated pages with only Area annotations inside range from 5th to 8th page. If no Area annotation inside this range, then document just contains pages from 5 to 8.