https://github.com/SubtleCow/AccessControlListsintheDOM/tree/4673d995e5614bc682cecd22f9b2919b23602735/src/pdf/pdfium

class CPDF_TestDocumentForPages : public CPDF_Document {
public:
CPDF_TestDocumentForPages() : CPDF_Document(nullptr) {
// Set up test
auto zeroToTwo = pdfium::MakeUnique<CPDF_Array>();
zeroToTwo->AddNew<CPDF_Reference>(
this, AddIndirectObject(CreateNumberedPage(0))->GetObjNum());
zeroToTwo->AddNew<CPDF_Reference>(
this, AddIndirectObject(CreateNumberedPage(1))->GetObjNum());
zeroToTwo->AddNew<CPDF_Reference>(
this, AddIndirectObject(CreateNumberedPage(2))->GetObjNum());
CPDF_Dictionary* branch1 =
CreatePageTreeNode(std::move(zeroToTwo), this, 3); auto zeroToThree = pdfium::MakeUnique<CPDF_Array>();
zeroToThree->AddNew<CPDF_Reference>(this, branch1->GetObjNum());
zeroToThree->AddNew<CPDF_Reference>(
this, AddIndirectObject(CreateNumberedPage(3))->GetObjNum());
CPDF_Dictionary* branch2 =
CreatePageTreeNode(std::move(zeroToThree), this, 4); auto fourFive = pdfium::MakeUnique<CPDF_Array>();
fourFive->AddNew<CPDF_Reference>(
this, AddIndirectObject(CreateNumberedPage(4))->GetObjNum());
fourFive->AddNew<CPDF_Reference>(
this, AddIndirectObject(CreateNumberedPage(5))->GetObjNum());
CPDF_Dictionary* branch3 = CreatePageTreeNode(std::move(fourFive), this, 2); auto justSix = pdfium::MakeUnique<CPDF_Array>();
justSix->AddNew<CPDF_Reference>(
this, AddIndirectObject(CreateNumberedPage(6))->GetObjNum());
CPDF_Dictionary* branch4 = CreatePageTreeNode(std::move(justSix), this, 1); auto allPages = pdfium::MakeUnique<CPDF_Array>();
allPages->AddNew<CPDF_Reference>(this, branch2->GetObjNum());
allPages->AddNew<CPDF_Reference>(this, branch3->GetObjNum());
allPages->AddNew<CPDF_Reference>(this, branch4->GetObjNum());
CPDF_Dictionary* pagesDict =
CreatePageTreeNode(std::move(allPages), this, 7); m_pOwnedRootDict = pdfium::MakeUnique<CPDF_Dictionary>();
m_pOwnedRootDict->SetNewFor<CPDF_Reference>("Pages", this,
pagesDict->GetObjNum());
m_pRootDict = m_pOwnedRootDict.get();
m_PageList.resize(7);
} private:
std::unique_ptr<CPDF_Dictionary> m_pOwnedRootDict;
};

  继承自

CPDF_Document  内容
<CPDF_Dictionary

pdfium的更多相关文章

  1. 福昕熊雨前:PDFium开源项目的背后

    今天编译android的时候,无意中看到命令行提示出输出编译external/pdfium这个目录,于是乎上百度搜索了一下,找到了如下关于PDF文件解析的开源代码的文章: http://www.csd ...

  2. pdfium ppm demo

    #include "fpdfview.h" #include <iostream> #include <string> #include <strin ...

  3. pdfium 代码执行流程

    1.FPDF_InitLibrary(NULL); CPDF_CustomAccess::CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess) {     i ...

  4. pdfium舍弃v8依赖

    Step 3 去除v8依赖 用文本编辑器打开pdfium根目录下的pdfium.gyp文件,找到'javascript'及'jsapi'依赖(47行左右): 'dependencies': [ 'sa ...

  5. pdfium 之二

    https://www.foxitsoftware.cn/products/premium-pdfium/feature.php 基于谷歌PDFium开源代码 谷歌采用福昕的PDF技术为其PDF开源项 ...

  6. PDFium 渲染

    PDFium 是 Chromium 的 PDF 渲染引擎,许可协议为 BSD 3-Clause.不同于 Mozilla 基于 HTML5 的 PDF.js,PDFium 是基于 Foxit Softw ...

  7. ubuntu pdfium

    dept_tool export PATH=`pwd`/depot_tools:"$PATH" gn工具在内

  8. pdfium 例子

    #include <stdio.h> #include <fpdfview.h> int main(int argc, char** argv) { FPDF_InitLibr ...

  9. pdfium 保存pdf

    // // Created by svenj on 2019/2/3. // extern "C" { #include <unistd.h> #include < ...

随机推荐

  1. nm U -l库的

    nm U -l库的

  2. linux学习(六)文件基本属性

    Linux系统是一种典型的多用户系统,不同的用户处于不同的地位,拥有不同的权限.为了保护系统的安全性,Linux系统对不同的用户访问同一文件(包括目录文件)的权限做了不同的规定. 在Linux中我们可 ...

  3. Python基础之猜数游戏

    例题一:猜数游戏.在程序中预设一个0~9之间的整数,让用户通过键盘输入所猜的数,如果大于预设的数,显示“遗憾,太大了”:小于预设的数,显示“遗憾,太小了”,如此循环,直至猜中该数,显示“预测N次,你猜 ...

  4. zz自动驾驶中轨迹规划的探索和挑战

    大家好,今天我们主要介绍一下轨迹规划的探索和挑战,我主要从四个方面介绍: 轨迹规划的概念 决策 横向规划 纵向规划 轨迹规划的概念: 轨迹规划的核心就是要解决车辆该怎么走的问题.比如我们知道了附近有行 ...

  5. 44 dlib鼠标指定目标跟踪

    dlib提供了dlib.correlation_tracker()类用于跟踪目标.官方文档入口:http://dlib.net/python/index.html#dlib.correlation_t ...

  6. 编译安装nmap

    官方编译文档 参考 安装对应的库,并编译安装.

  7. ubuntu16 安装Configuring ttf-mscorefonts-installer,无法按到ok

    作为Linux小白,完全不知道出现类似图形化界面按不到按钮到情况,解决方法非常简单 使用Tab键选择按钮

  8. 对比3种接口测试的工具:jmeter+ant;postman;python的requests+unittest或requests+excel

    这篇随笔主要是对比下笔者接触过的3种接口测试工具,从实际使用的角度来分析下3种工具各自的特点 分别为:jmeter.postman.python的requests+unittest或requests+ ...

  9. 线性结构之习题选讲-ReversingLinkedList

    目录 一.什么是抽象的链表 二.单链表的逆转 三.测试数据 3.1 边界测试 更新.更全的<数据结构与算法>的更新网站,更有python.go.人工智能教学等着你:https://www. ...

  10. Javal连载4-注释&class与public class区别

    一.Java注释 1.作用:不会编译倒.class文件之中:增强可读性 2.分类: (1)单行注释(只注释当前行):// (2)多行注释: /* 注释 注释 注释 */ (3)javadoc注释 /* ...