Using the Advanced properties, you can get the initial View mode (managed by Acrobat) from metadata, check the below code:
Note: a premium license is needed.
String viewMode = "Fit";
PDFRef pdfRef = m_doc.Advance_GetRef();
PDFObj rootObj = m_doc.Advance_GetObj(pdfRef);
if (rootObj != null)
{
int count = rootObj.DictGetItemCount();
for (int cur = 0; cur < count; cur++)
{
String tag = rootObj.DictGetItemTag(cur);
PDFObj item = rootObj.DictGetItem(cur);
if (tag.Equals("OpenAction") && item.type == 8)
{
rootObj = m_doc.Advance_GetObj(item.RefVal);
if (rootObj.DictGetItemCount() > 0 && rootObj.DictGetItem(0).type == 6)
{
item = rootObj.DictGetItem(0);
int arrayCount = item.ArrayGetItemCount();
if (arrayCount > 1)
{
viewMode = item.ArrayGetItem(1).NameVal;
break;
}
}
}
}
}
RadaeePDF SDK for Windows 10
Get OpenAction metadata using Advanced properties
Created : 2018-04-18 14:28:04, Last Modified : 2018-04-18 14:29:12