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

void PoDoFo::PdfXRefStream::EndWrite ( PdfOutputDevice pDevice ) [protected, virtual]

Called at the end of writing the XRef table. Sub classes can overload this method to finish a XRef table.

Parameters:
pDevicethe output device to which the XRef table should be written.

Reimplemented from PoDoFo::PdfXRef.

Definition at line 88 of file PdfXRefStream.cpp.

References PoDoFo::PdfDictionary::AddKey(), PoDoFo::PdfArray::Clear(), PoDoFo::PdfStream::EndAppend(), PoDoFo::PdfWriter::FillTrailerObject(), PoDoFo::PdfVariant::GetDictionary(), PoDoFo::PdfXRef::GetSize(), PoDoFo::PdfObject::GetStream(), PoDoFo::PdfWriter::GetWriteMode(), m_offset, PoDoFo::PdfArray::push_back(), PoDoFo::PdfOutputDevice::Seek(), PoDoFo::PdfOutputDevice::Tell(), PoDoFo::PdfObject::WriteObject(), and WriteXRefEntry().

{
    PdfArray w;

    w.push_back( static_cast<pdf_int64>(1) );
    w.push_back( static_cast<pdf_int64>(sizeof(pdf_uint64)) );
    w.push_back( static_cast<pdf_int64>(1) );

    // Add our self to the XRef table
    this->WriteXRefEntry( pDevice, pDevice->Tell(), 0, 'n' );

    m_pObject->GetStream()->EndAppend();
    m_pWriter->FillTrailerObject( m_pObject, this->GetSize(), false, false );

    m_pObject->GetDictionary().AddKey( "Index", m_indeces );
    m_pObject->GetDictionary().AddKey( "W", w );

    pDevice->Seek( static_cast<size_t>(m_offset) );
    m_pObject->WriteObject( pDevice, m_pWriter->GetWriteMode(), NULL ); // DominikS: Requires encryption info??
    m_indeces.Clear();
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index