Logo Search packages:      
Sourcecode: libpodofo version File versions  Download package

void PoDoFo::PdfInputDevice::Seek ( std::streamoff  off,
std::ios_base::seekdir  dir = std::ios_base::beg 
) [virtual]

Seek the device to the position offset from the begining

Parameters:
offfrom the beginning of the file
dirwhere to start (start, cur, end)

A non-seekable input device will throw an InvalidDeviceOperation.

Definition at line 203 of file PdfInputDevice.cpp.

References PoDoFo::ePdfError_InvalidDeviceOperation, and PODOFO_RAISE_ERROR_INFO.

Referenced by PoDoFo::PdfParser::FindToken(), PoDoFo::PdfParser::FindToken2(), PoDoFo::PdfFontTTFSubset::GetData(), PoDoFo::PdfParser::HasLinearizationDict(), PoDoFo::NonPublic::PdfTTFWriter::LoadGlyph(), PoDoFo::PdfParserObject::ParseFile(), PoDoFo::PdfParserObject::ParseFileComplete(), PoDoFo::PdfParserObject::ParseStream(), PoDoFo::NonPublic::PdfTTFWriter::Read(), PoDoFo::PdfParser::ReadDocumentStructure(), PoDoFo::PdfParser::ReadTrailer(), PoDoFo::PdfParser::ReadXRefContents(), and PoDoFo::PdfParser::ReadXRefStreamContents().

{
    if (m_bIsSeekable)
    {
        if (m_pStream)
        {
            m_pStream->seekg( off, dir );
        }

        if (m_pFile)
        {
            fseeko( m_pFile, off, dir );
        }
    }
    else
    {
        PODOFO_RAISE_ERROR_INFO( ePdfError_InvalidDeviceOperation, "Tried to seek an unseekable input device." );
    }
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index