Ipelib: ipe::PdfFile Class Reference

Ipelib

Public Member Functions | List of all members
ipe::PdfFile Class Reference
Ipe Base

`#include <ipepdfparser.h>`

## Public Member Functions
bool | parse (DataSource &source)
bool | parseObjectStream (const PdfDict *d)
const PdfObj * | object (int num) const noexcept
const PdfDict * | catalog () const noexcept
const PdfDict * | page () const noexcept
std::unique_ptr< const PdfObj > | take (int num)

## Detailed Description

All information obtained by parsing a PDF file.

## Member Function Documentation

## ◆ parse()

bool PdfFile::parse | ( | DataSource & | source | ) |

Parse entire PDF stream, and store objects.

References ipe::PdfDict::dict(), ipe::PdfToken::ENumber, ipe::PdfToken::EOp, ipe::PdfDict::get(), ipe::PdfParser::getObjectDef(), ipe::PdfParser::getTrailer(), ipe::PdfToken::iString, ipe::PdfToken::iType, ipe::PdfObj::name(), ipe::PdfParser::skipXRef(), ipe::PdfParser::token(), ipe::PdfName::value(), and ipe::String::z().

Referenced by ipe::Document::formatFromFilename().

## ◆ parseObjectStream()

bool PdfFile::parseObjectStream | ( | const PdfDict * | d | ) |

References ipe::PdfToken::ENumber, ipe::PdfDict::get(), ipe::PdfParser::getChar(), ipe::PdfParser::getObject(), ipe::PdfParser::getToken(), ipe::PdfDict::inflate(), ipe::PdfToken::iString, ipe::PdfToken::iType, ipe::PdfObj::number(), ipe::BufferSource::setPosition(), ipe::PdfParser::token(), and ipe::PdfNumber::value().

## ◆ object()

const PdfObj * PdfFile::object | ( | int | num | ) | const
| noexcept

Return object with number num.

Referenced by ipe::Document::formatFromFilename().

## ◆ catalog()

const PdfDict * PdfFile::catalog | ( |  | ) | const
| noexcept

Return root catalog of PDF file.

References ipe::PdfObj::dict().

## ◆ page()

const PdfDict * PdfFile::page | ( |  | ) | const
| noexcept

Return first page of the document.

References ipe::PdfObj::array(), ipe::PdfObj::dict(), ipe::PdfDict::get(), and ipe::PdfArray::obj().

## ◆ take()

std::unique_ptr< const PdfObj > PdfFile::take | ( | int | num | ) |

Take ownership of object with number num, remove from PdfFile.

Referenced by ipe::PdfResources::PdfResources().

The documentation for this class was generated from the following files:

- ipepdfparser.h
- ipepdfparser.cpp