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

#include <ipepdfparser.h>

Public Member Functions

bool parse (DataSource &source)
 
const PdfObjobject (int num) const noexcept
 
const PdfDictcatalog () const noexcept
 
const PdfDictpage (int pno=0) const noexcept
 
std::unique_ptr< const PdfObjtake (int num)
 
int countPages () const
 
Rect mediaBox (const PdfDict *page) const
 
int findPageFromPageObjectNumber (int objNum) const
 

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.

Referenced by ipe::Document::formatFromFilename(), and ipe::PdfParser::getTrailer().

◆ object()

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

Return object with number num.

Referenced by ipe::Document::formatFromFilename(), and ipe::PdfFileResources::object().

◆ catalog()

const PdfDict * PdfFile::catalog ( ) const
noexcept

◆ page()

const PdfDict * PdfFile::page ( int  pno = 0) const
noexcept

Return a page of the document.

◆ take()

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

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

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

◆ countPages()

int ipe::PdfFile::countPages ( ) const
inline

Return number of pages.

◆ mediaBox()

Rect PdfFile::mediaBox ( const PdfDict page) const

Return mediabox of a page.

References ipe::Rect::addPoint(), and ipe::PdfDict::getNumberArray().

◆ findPageFromPageObjectNumber()

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().


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