本文整理汇总了C++中PDFDoc::getPageMediaHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ PDFDoc::getPageMediaHeight方法的具体用法?C++ PDFDoc::getPageMediaHeight怎么用?C++ PDFDoc::getPageMediaHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDFDoc
的用法示例。
在下文中一共展示了PDFDoc::getPageMediaHeight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: convert
//.........这里部分代码省略.........
{
Object obj;
GooString *s1;
Dict *infoDict = info.getDict();
if (infoDict->lookup((char*)"Title", &obj )->isString())
{
s1 = obj.getString();
m_Doc->documentInfo().setTitle(UnicodeParsedString(obj.getString()));
obj.free();
}
if (infoDict->lookup((char*)"Author", &obj )->isString())
{
s1 = obj.getString();
m_Doc->documentInfo().setAuthor(UnicodeParsedString(obj.getString()));
obj.free();
}
if (infoDict->lookup((char*)"Subject", &obj )->isString())
{
s1 = obj.getString();
m_Doc->documentInfo().setSubject(UnicodeParsedString(obj.getString()));
obj.free();
}
if (infoDict->lookup((char*)"Keywords", &obj )->isString())
{
s1 = obj.getString();
m_Doc->documentInfo().setKeywords(UnicodeParsedString(obj.getString()));
obj.free();
}
}
info.free();
for (int pp = 0; pp < lastPage; pp++)
{
m_Doc->setActiveLayer(baseLayer);
if (firstPg)
firstPg = false;
else
m_Doc->addPage(pp);
m_Doc->currentPage()->setInitialHeight(pdfDoc->getPageMediaHeight(pp + 1));
m_Doc->currentPage()->setInitialWidth(pdfDoc->getPageMediaWidth(pp + 1));
m_Doc->currentPage()->setHeight(pdfDoc->getPageMediaHeight(pp + 1));
m_Doc->currentPage()->setWidth(pdfDoc->getPageMediaWidth(pp + 1));
m_Doc->currentPage()->MPageNam = CommonStrings::trMasterPageNormal;
m_Doc->currentPage()->m_pageSize = "Custom";
m_Doc->setPageSize("Custom");
m_Doc->reformPages(true);
if (hasOcg)
{
for (int a = 0; a < ocgGroups.count(); a++)
{
OptionalContentGroup *oc = ocgGroups[a];
// m_Doc->setActiveLayer(UnicodeParsedString(oc->getName()));
// currentLayer = m_Doc->activeLayer();
oc->setState(OptionalContentGroup::On);
// pdfDoc->displayPage(dev, pp + 1, hDPI, vDPI, rotate, useMediaBox, crop, printing);
// oc->setState(OptionalContentGroup::Off);
}
pdfDoc->displayPage(dev, pp + 1, hDPI, vDPI, rotate, useMediaBox, crop, printing);
}
else
pdfDoc->displayPage(dev, pp + 1, hDPI, vDPI, rotate, useMediaBox, crop, printing);
}
}
else
{
if (hasOcg)
{
for (int a = 0; a < ocgGroups.count(); a++)
{
ocgGroups[a]->setState(OptionalContentGroup::On);
}
}
pdfDoc->displayPage(dev, firstPage, hDPI, vDPI, rotate, useMediaBox, crop, printing);
}
}
delete dev;
}
}
delete pdfDoc;
}
delete globalParams;
globalParams = 0;
// qDebug() << "converting finished";
// qDebug() << "Imported" << Elements.count() << "Elements";
if (Elements.count() == 0)
{
if (importedColors.count() != 0)
{
for (int cd = 0; cd < importedColors.count(); cd++)
{
m_Doc->PageColors.remove(importedColors[cd]);
}
}
}
if (progressDialog)
progressDialog->close();
return true;
}