本文整理汇总了C++中PdfObject::GetDataTypeString方法的典型用法代码示例。如果您正苦于以下问题:C++ PdfObject::GetDataTypeString方法的具体用法?C++ PdfObject::GetDataTypeString怎么用?C++ PdfObject::GetDataTypeString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PdfObject
的用法示例。
在下文中一共展示了PdfObject::GetDataTypeString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetPageNode
//.........这里部分代码省略.........
rLstParents.push_back( pParent );
// the following code is to find the reference to log this with
const PdfReference & rIterArrayRef = (*it).Reference();
PdfReference refToLog;
bool isDirectObject // don't worry about 0-num. indirect ones
= ( !(rIterArrayRef.ObjectNumber() ) );
if ( isDirectObject )
{
if ( !(pObj->Reference().ObjectNumber() ) ) // rKidsArray's
{
refToLog = pParent->Reference();
}
else
{
refToLog = pObj->Reference();
}
}
else
{
refToLog = rIterArrayRef;
}
PdfError::LogMessage( eLogSeverity_Error,
"Entry in Kids array is itself an array"
"%s reference: %s\n", isDirectObject ? " (direct object)"
", in object with" : ",", refToLog.ToString().c_str() );
const PdfArray & rIterArray = (*it).GetArray();
// is the array large enough to potentially have the page?
if( static_cast<size_t>(nPageNum) < rIterArray.GetSize() )
{
PdfObject* pPageNode = GetPageNodeFromArray( nPageNum,
rIterArray, rLstParents );
if ( pPageNode ) // and if not, search further
return pPageNode;
}
}
else if( (*it).IsReference() )
{
PdfObject* pChild = GetRoot()->GetOwner()->GetObject( (*it).GetReference() );
if (!pChild)
{
PdfError::LogMessage( eLogSeverity_Critical, "Requesting page index %i. Child not found: %s\n",
nPageNum, (*it).GetReference().ToString().c_str());
return NULL;
}
if( this->IsTypePages(pChild) )
{
int childCount = GetChildCount( pChild );
if( childCount < nPageNum + 1 ) // Pages are 0 based, but count is not
{
// skip this page node
// and go to the next one
nPageNum -= childCount;
}
else
{
rLstParents.push_back( pParent );
return this->GetPageNode( nPageNum, pChild, rLstParents );
}
}
else if( this->IsTypePage(pChild) )
{
if( 0 == nPageNum )
{
rLstParents.push_back( pParent );
return pChild;
}
// Skip a normal page
if(nPageNum > 0 )
nPageNum--;
}
else
{
const PdfReference & rLogRef = pChild->Reference();
pdf_objnum nLogObjNum = rLogRef.ObjectNumber();
pdf_gennum nLogGenNum = rLogRef.GenerationNumber();
PdfError::LogMessage( eLogSeverity_Critical,
"Requesting page index %i. "
"Invalid datatype referenced in kids array: %s\n"
"Reference to invalid object: %i %i R\n", nPageNum,
pChild->GetDataTypeString(), nLogObjNum, nLogGenNum);
}
}
else
{
PdfError::LogMessage( eLogSeverity_Critical, "Requesting page index %i. Invalid datatype in kids array: %s\n",
nPageNum, (*it).GetDataTypeString());
return NULL;
}
++it;
}
}
return NULL;
}