I am trying to modify a customer's code to export specific pages of a document to a byte array. I have a document with two pages, and to try to export the second page, I do the following:
ILFConnection lfConnection = m_Conn.Database.CurrentConnection; DocumentExporter documentExporter = new DocumentExporterClass(); ILFEntry lfEntry =m_Conn.GetEntryFromCache(laserficheObject.EntryID, false); LFDocument lfDocument = (LFDocument)lfEntry; LFDocumentPages lfDocPages = lfDocument.Pages; lfDocPages.MarkPage(lfDocPages.Item[1]); documentExporter.AddSourcePages(lfDocPages.Item[1]); documentExporter.Format = Document_Format.DOCUMENT_FORMAT_JPEG; //documentExporter.VerifyImageChecksum = true; byte[] bytes = (byte[])documentExporter.Export();
But I still get only page 1! By marking page[1] and adding that as source page for the exporter, shouldn't I be getting page 2 exported (assuming this is zero indexed and page 1 is Item[0] and page 2 is Item[1]).