10-25-2012 06:51 AM
Since this is a PDF document I want to retrieve it as pdf and not as an image. My code is as follows.
Core core = g_application.Core;
DocumentQuery docQuery = core.CreateDocumentQuery();
docQuery.AddKeyword("Docket ID", docketId, KeywordOperator.Equal,KeywordRelation.And);
DocumentList docList = docQuery.Execute(docQuery.ExecuteCount(), DocumentRetrievalOptions.LoadKeywords);
PDFDataProvider pdfProvider = g_application.Core.Retrieval.PDF;
foreach (Document doc in docList)
{
Revision revision = doc.LatestRevision;
Rendition rendition = revision.DefaultRendition;
PageData pageData = pdfProvider.GetDocument(rendition);
// Create new memory stream object
MemoryStream ms1 = new MemoryStream();
pageData.Stream.CopyTo(ms1);
pageData.Stream.Close();
// Convert Memory stream to byte array
byte[] buffer = ms1.ToArray();
return byte array to calling method
}
10-25-2012 08:03 AM
Hi Milind
Have you tried using NativeDataProvider instead ?
Thanks
10-25-2012 08:32 AM
I was using the wrong version of Acrobat. This problem is solved.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.