0 Replies Latest reply on Jul 1, 2011 6:44 AM by xmlapi

    Exporting Book, which documents parameter throws error

    xmlapi Level 1

      BookContent[] a = new BookContent[1] { book.BookContents[1] };
      book.Export(idExportFormat.idPDFType, "catalog.pdf", a);

       

      This throws the error: Unable to create PDF file for a book with no documents.

       

      This works fine:
      book.Export(idExportFormat.idPDFType, "catalog.pdf", book.BookContents.ItemsByRange(1,4));

       

      But I'm only exporting only one document so this fails:

      book.Export(idExportFormat.idPDFType, "catalog.pdf", book.BookContents.ItemsByRange(1,1));

      Error: Expected array of BookContent, received Bookcontent.

       

      Is there anyway to resolve this? This is in c#, I'm sure it's the same error in Javascript.