PoDoFo  0.9.4
Public Member Functions | List of all members
PoDoFo::PdfSignOutputDevice Class Reference

#include <PdfSignOutputDevice.h>

Inheritance diagram for PoDoFo::PdfSignOutputDevice:
PoDoFo::PdfOutputDevice

Public Member Functions

virtual void SetSignatureSize (size_t lSignatureSize)
 
virtual size_t GetSignatureSize () const
 
virtual const PdfDataGetSignatureBeacon () const
 
virtual void AdjustByteRange ()
 
virtual size_t ReadForSignature (char *pBuffer, size_t lLen)
 
virtual void SetSignature (const PdfData &sigData)
 
virtual size_t GetLength () const
 
virtual void Print (const char *pszFormat,...)
 
virtual void Write (const char *pBuffer, size_t lLen)
 
virtual size_t Read (char *pBuffer, size_t lLen)
 
virtual void Seek (size_t offset)
 
virtual size_t Tell () const
 
virtual void Flush ()
 
- Public Member Functions inherited from PoDoFo::PdfOutputDevice
 PdfOutputDevice ()
 
 PdfOutputDevice (const char *pszFilename)
 
 PdfOutputDevice (char *pBuffer, size_t lLen)
 
 PdfOutputDevice (const std::ostream *pOutStream)
 
 PdfOutputDevice (PdfRefCountedBuffer *pOutBuffer)
 
virtual ~PdfOutputDevice ()
 
virtual void PrintV (const char *pszFormat, long lBytes, va_list argptr)
 
long PrintVLen (const char *pszFormat, va_list args)
 

Detailed Description

Signer class

Class is used to locate place for signature in the stream. Usage:

  1. Locate signature and adjust ByteRange
  2. Generate signature
  3. Insert new signature

Member Function Documentation

void PoDoFo::PdfSignOutputDevice::AdjustByteRange ( )
virtual

Modify ByteRange entry according to signature position

virtual void PoDoFo::PdfSignOutputDevice::Flush ( )
inlinevirtual

Flush the output files buffer to disk if this devices operates on a disk.

Reimplemented from PoDoFo::PdfOutputDevice.

virtual size_t PoDoFo::PdfSignOutputDevice::GetLength ( ) const
inlinevirtual

The number of bytes written to this object.

Returns
the number of bytes written to this object.
See also
Init

Reimplemented from PoDoFo::PdfOutputDevice.

virtual const PdfData* PoDoFo::PdfSignOutputDevice::GetSignatureBeacon ( ) const
inlinevirtual

Return signature beacon

size_t PoDoFo::PdfSignOutputDevice::GetSignatureSize ( ) const
virtual

Get expected size of signature.

If reserved size if zero no signatures will be added.

Returns
Total space reserved for signature.
virtual void PoDoFo::PdfSignOutputDevice::Print ( const char *  pszFormat,
  ... 
)
inlinevirtual

Write to the PdfOutputDevice. Usage is as the usage of printf.

WARNING: Do not use this for doubles or floating point values as the output might depend on the current locale.

Parameters
pszFormata format string as you would use it with printf
See also
Write

Reimplemented from PoDoFo::PdfOutputDevice.

virtual size_t PoDoFo::PdfSignOutputDevice::Read ( char *  pBuffer,
size_t  lLen 
)
inlinevirtual

Read data from the device

Parameters
pBuffera pointer to the data buffer
lLenlength of the output buffer
Returns
Number of read bytes. Return 0 if EOF

Reimplemented from PoDoFo::PdfOutputDevice.

size_t PoDoFo::PdfSignOutputDevice::ReadForSignature ( char *  pBuffer,
size_t  lLen 
)
virtual

Read data for signature

virtual void PoDoFo::PdfSignOutputDevice::Seek ( size_t  offset)
inlinevirtual

Seek the device to the position offset from the begining

Parameters
offsetfrom the beginning of the file

Reimplemented from PoDoFo::PdfOutputDevice.

void PoDoFo::PdfSignOutputDevice::SetSignature ( const PdfData sigData)
virtual

Embed real signature in the PDF

void PoDoFo::PdfSignOutputDevice::SetSignatureSize ( size_t  lSignatureSize)
virtual

Set string to lookup for

Parameters
lSignatureSizeTotal space reserved for signature
virtual size_t PoDoFo::PdfSignOutputDevice::Tell ( ) const
inlinevirtual

Get the current offset from the beginning of the file.

Returns
the offset form the beginning of the file.

Reimplemented from PoDoFo::PdfOutputDevice.

void PoDoFo::PdfSignOutputDevice::Write ( const char *  pBuffer,
size_t  lLen 
)
virtual

Write data to the buffer. Use this call instead of Print if you want to write binary data to the PdfOutputDevice.

Parameters
pBuffera pointer to the data buffer
lLenwrite lLen bytes of pBuffer to the PdfOutputDevice
See also
Print

Reimplemented from PoDoFo::PdfOutputDevice.