Ipelib
|
#include <ipepdfparser.h>
Public Member Functions | |
bool | parse (DataSource &source) |
const PdfObj * | object (int num) const noexcept |
const PdfDict * | catalog () const noexcept |
const PdfDict * | page (int pno=0) const noexcept |
std::unique_ptr< const PdfObj > | take (int num) |
int | countPages () const |
Rect | mediaBox (const PdfDict *page) const |
int | findPageFromPageObjectNumber (int objNum) const |
All information obtained by parsing a PDF file.
bool PdfFile::parse | ( | DataSource & | source | ) |
Parse entire PDF stream, and store objects.
References ipe::PdfToken::ENumber, ipe::PdfToken::EOp, ipe::String::find(), ipe::DataSource::getChar(), ipe::Lex::getInt(), ipe::PdfParser::getObjectDef(), ipe::PdfParser::getTrailer(), ipe::PdfToken::iString, ipe::PdfToken::iType, ipe::DataSource::length(), ipe::PdfParser::readXRef(), ipe::DataSource::setPosition(), ipe::size(), ipe::String::substr(), and ipe::PdfParser::token().
Referenced by ipe::Latex::readPdf().
|
noexcept |
Return object with number num.
|
noexcept |
Return root catalog of PDF file.
References ipe::PdfObj::dict().
|
noexcept |
Return a page of the document.
Referenced by ipe::PdfThumbnail::PdfThumbnail(), and ipe::Latex::readPdf().
std::unique_ptr< const PdfObj > PdfFile::take | ( | int | num | ) |
Take ownership of object with number num, remove from PdfFile.
|
inline |
Return number of pages.
Referenced by ipe::PdfThumbnail::PdfThumbnail().
Return mediabox of a page.
References ipe::Rect::addPoint(), and ipe::PdfDict::getNumberArray().
Referenced by ipe::PdfThumbnail::PdfThumbnail(), and ipe::PdfThumbnail::render().
int PdfFile::findPageFromPageObjectNumber | ( | int | objNum | ) | const |
Return page number given the PDF object number.
Returns -1 if the object number is not a page.
References ipe::size().