コード例 #1
0
void PdfFileStream::BeginAppendImpl( const TVecFilters & vecFilters )
{
    m_pParent->GetOwner()->WriteObject( m_pParent );

    m_lLenInitial = m_pDevice->GetLength();

    if( vecFilters.size() )
    {
        m_pDeviceStream = new PdfDeviceOutputStream( m_pDevice );
        if( m_pCurEncrypt ) 
        {
            m_pEncryptStream = m_pCurEncrypt->CreateEncryptionOutputStream( m_pDeviceStream );
            m_pStream        = PdfFilterFactory::CreateEncodeStream( vecFilters, m_pEncryptStream );
        }
        else
            m_pStream        = PdfFilterFactory::CreateEncodeStream( vecFilters, m_pDeviceStream );
    }
    else 
    {
        if( m_pCurEncrypt ) 
        {
            m_pDeviceStream = new PdfDeviceOutputStream( m_pDevice );
            m_pStream       = m_pCurEncrypt->CreateEncryptionOutputStream( m_pDeviceStream );
        }
        else
            m_pStream = new PdfDeviceOutputStream( m_pDevice );
    }
}
コード例 #2
0
void PdfMemStream::BeginAppendImpl( const TVecFilters & vecFilters )
{
    m_buffer  = PdfRefCountedBuffer();
	m_lLength = 0;

    if( vecFilters.size() )
    {
        m_pBufferStream = new PdfBufferOutputStream( &m_buffer );
        m_pStream       = PdfFilterFactory::CreateEncodeStream( vecFilters, m_pBufferStream );
    }
    else 
        m_pStream = new PdfBufferOutputStream( &m_buffer );

}