Pdf3rdPtyForwardDecl.h   Pdf3rdPtyForwardDecl.h 
#ifndef PDF_FT_FORWARD_DECL #ifndef PDF_FT_FORWARD_DECL
#define PDF_FT_FORWARD_DECL #define PDF_FT_FORWARD_DECL
/** /**
* \file Pdf3rdPartyForwardDecl * \file Pdf3rdPartyForwardDecl.h
* *
* Forward declare some types that we use in our public API but don't want to * Forward declare some types that we use in our public API but don't want to
* include the headers for directly. We can't do a nice simple forward * include the headers for directly. We can't do a nice simple forward
* declaration because most of these libraries have typedefs everywhere. * declaration because most of these libraries have typedefs everywhere.
* *
* We don't want to include things like freetype directly in our public hea ders * We don't want to include things like freetype directly in our public hea ders
* because: * because:
* *
* - They dump a huge amount of cruft into the top level namespace * - They dump a huge amount of cruft into the top level namespace
* *
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 PdfAcroForm.h   PdfAcroForm.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_ACRO_FORM_H_ #ifndef _PDF_ACRO_FORM_H_
#define _PDF_ACRO_FORM_H_ #define _PDF_ACRO_FORM_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfElement.h" #include "PdfElement.h"
namespace PoDoFo { namespace PoDoFo {
class PdfDocument; class PdfDocument;
class PODOFO_API PdfAcroForm : public PdfElement { class PODOFO_DOC_API PdfAcroForm : public PdfElement {
public: public:
enum EPdfAcroFormDefaulAppearance { enum EPdfAcroFormDefaulAppearance {
ePdfAcroFormDefaultAppearance_None, ///< Do not add a default appea rrance ePdfAcroFormDefaultAppearance_None, ///< Do not add a default appea rrance
ePdfAcroFormDefaultAppearance_BlackText12pt ///< Add a default appe arance with Arial embedded and black text 12pt if no other DA key is presen t ePdfAcroFormDefaultAppearance_BlackText12pt ///< Add a default appe arance with Arial embedded and black text 12pt if no other DA key is presen t
}; };
/** Create a new PdfAcroForm dictionary object /** Create a new PdfAcroForm dictionary object
* \param pDoc parent of this action * \param pDoc parent of this action
* \param eDefaultAppearance specifies if a default appearance should be added * \param eDefaultAppearance specifies if a default appearance should be added
*/ */
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 PdfAction.h   PdfAction.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_ACTION_H_ #ifndef _PDF_ACTION_H_
#define _PDF_ACTION_H_ #define _PDF_ACTION_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfElement.h" #include "PdfElement.h"
namespace PoDoFo { namespace PoDoFo {
class PdfObject; class PdfObject;
class PdfString; class PdfString;
class PdfStreamedDocument; class PdfStreamedDocument;
class PdfVecObjects; class PdfVecObjects;
/** The type of the action. /** The type of the action.
skipping to change at line 68 skipping to change at line 68
ePdfAction_SetOCGState, ePdfAction_SetOCGState,
ePdfAction_Rendition, ePdfAction_Rendition,
ePdfAction_Trans, ePdfAction_Trans,
ePdfAction_GoTo3DView, ePdfAction_GoTo3DView,
ePdfAction_Unknown = 0xff ePdfAction_Unknown = 0xff
}; };
/** An action that can be performed in a PDF document /** An action that can be performed in a PDF document
*/ */
class PODOFO_API PdfAction : public PdfElement { class PODOFO_DOC_API PdfAction : public PdfElement {
friend class PdfAnnotation; friend class PdfAnnotation;
public: public:
/** Create a new PdfAction object /** Create a new PdfAction object
* \param eAction type of this action * \param eAction type of this action
* \param pParent parent of this action * \param pParent parent of this action
*/ */
PdfAction( EPdfAction eAction, PdfVecObjects* pParent ); PdfAction( EPdfAction eAction, PdfVecObjects* pParent );
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 PdfAnnotation.h   PdfAnnotation.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_ANNOTATION_H_ #ifndef _PDF_ANNOTATION_H_
#define _PDF_ANNOTATION_H_ #define _PDF_ANNOTATION_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfAction.h" #include "PdfAction.h"
#include "PdfDestination.h" #include "PdfDestination.h"
#include "PdfElement.h" #include "PdfElement.h"
namespace PoDoFo { namespace PoDoFo {
class PdfFileSpec; class PdfFileSpec;
class PdfName; class PdfName;
class PdfPage; class PdfPage;
class PdfRect; class PdfRect;
skipping to change at line 102 skipping to change at line 102
ePdfAnnotationFlags_ToggleNoView = 0x0100, ePdfAnnotationFlags_ToggleNoView = 0x0100,
ePdfAnnotationFlags_Unknow = 0xffff ePdfAnnotationFlags_Unknow = 0xffff
}; };
/** An annotation to a PdfPage /** An annotation to a PdfPage
* To create an annotation use PdfPage::CreateAnnotation * To create an annotation use PdfPage::CreateAnnotation
* *
* \see PdfPage::CreateAnnotation * \see PdfPage::CreateAnnotation
*/ */
class PODOFO_API PdfAnnotation : public PdfElement { class PODOFO_DOC_API PdfAnnotation : public PdfElement {
public: public:
/** Create a new annotation object /** Create a new annotation object
* *
* \param pPage the parent page of this annotation * \param pPage the parent page of this annotation
* \param eAnnot type of the annotation * \param eAnnot type of the annotation
* \param rRect the rectangle in which the annotation will appear on t he page * \param rRect the rectangle in which the annotation will appear on t he page
* \param pParent parent of this annotation * \param pParent parent of this annotation
* *
* \see PdfPage::CreateAnnotation * \see PdfPage::CreateAnnotation
*/ */
skipping to change at line 209 skipping to change at line 209
PdfString GetContents() const; PdfString GetContents() const;
/** Set the destination for link annotations /** Set the destination for link annotations
* \param rDestination target of the link * \param rDestination target of the link
* *
* \see GetDestination * \see GetDestination
*/ */
void SetDestination( const PdfDestination & rDestination ); void SetDestination( const PdfDestination & rDestination );
/** Get the destination of a link annotations /** Get the destination of a link annotations
* \param pDoc a PdfDocument owning this annotation.
* This is required to resolve names and pages.
* \returns a destination object * \returns a destination object
* *
* \see SetDestination * \see SetDestination
*/ */
PdfDestination GetDestination() const; PdfDestination GetDestination( PdfDocument* pDoc ) const;
/** /**
* \returns true if this annotation has an destination * \returns true if this annotation has an destination
*/ */
bool HasDestination() const; bool HasDestination() const;
/** Set the action that is executed for this annotation /** Set the action that is executed for this annotation
* \param rAction an action object * \param rAction an action object
* *
* \see GetAction * \see GetAction
 End of changes. 4 change blocks. 
3 lines changed or deleted 5 lines changed or added


 PdfColor.h   PdfColor.h 
skipping to change at line 26 skipping to change at line 26
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_COLOR_H_ #ifndef _PDF_COLOR_H_
#define _PDF_COLOR_H_ #define _PDF_COLOR_H_
#include "PdfDefines.h" #include "PdfDefines.h"
#include "PdfName.h"
namespace PoDoFo { namespace PoDoFo {
class PdfArray; class PdfArray;
class PdfObject; class PdfObject;
class PdfVecObjects; class PdfVecObjects;
/** A color object can represent either a grayscale /** A color object can represent either a grayscale
* value, a RGB color, a CMYK color, a separation color or * value, a RGB color, a CMYK color, a separation color or
* a CieLab color. * a CieLab color.
* *
skipping to change at line 356 skipping to change at line 358
/** Creates a color object from a PdfArray which represents a color. /** Creates a color object from a PdfArray which represents a color.
* *
* Raises an exception if this is no PdfColor! * Raises an exception if this is no PdfColor!
* *
* \param rArray an array that must be a color PdfArray * \param rArray an array that must be a color PdfArray
* \returns a PdfColor object * \returns a PdfColor object
*/ */
static PdfColor FromArray( const PdfArray & rArray ); static PdfColor FromArray( const PdfArray & rArray );
/**
* Convert a name into a colorspace enum.
* @param rName name representing a colorspace such as DeviceGray
* @returns colorspace enum or ePdfColorSpace_Unknown if name is unknow
n
* @see GetNameForColorSpace
*/
static EPdfColorSpace GetColorSpaceForName( const PdfName & rName );
/**
* Convert a colorspace enum value into a name such as DeviceRGB
* @param eColorSpace a colorspace
* @returns a name
* @see GetColorSpaceForName
*/
static PdfName GetNameForColorSpace( EPdfColorSpace eColorSpace );
/** Creates a colorspace object from a color to insert into resources. /** Creates a colorspace object from a color to insert into resources.
* *
* \param pOwner a pointer to the owner of the generated object * \param pOwner a pointer to the owner of the generated object
* \returns a PdfObject pointer, which can be insert into resources, N ULL if not needed * \returns a PdfObject pointer, which can be insert into resources, N ULL if not needed
*/ */
PdfObject* BuildColorSpace( PdfVecObjects* pOwner ) const; PdfObject* BuildColorSpace( PdfVecObjects* pOwner ) const;
protected: protected:
union { union {
double cmyk[4]; double cmyk[4];
skipping to change at line 644 skipping to change at line 662
( (
(m_eAlternateColorSpace == ePdfColorSpace_CieLab) && (m_eAlternateColorSpace == ePdfColorSpace_CieLab) &&
(m_uColor.lab[0] == rhs.m_uColor.lab[0]) && (m_uColor.lab[0] == rhs.m_uColor.lab[0]) &&
(m_uColor.lab[1] == rhs.m_uColor.lab[1]) && (m_uColor.lab[1] == rhs.m_uColor.lab[1]) &&
(m_uColor.lab[2] == rhs.m_uColor.lab[2]) (m_uColor.lab[2] == rhs.m_uColor.lab[2])
) )
) )
) )
return true; return true;
if (m_eColorSpace == ePdfColorSpace_Unknown)
return true;
} }
return false; return false;
} }
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
inline bool PdfColor::operator!=( const PdfColor & rhs ) const inline bool PdfColor::operator!=( const PdfColor & rhs ) const
{ {
return ! (*this == rhs); return ! (*this == rhs);
 End of changes. 3 change blocks. 
0 lines changed or deleted 21 lines changed or added


 PdfCompilerCompat.h   PdfCompilerCompat.h 
skipping to change at line 76 skipping to change at line 76
#include <strings.h> #include <strings.h>
#endif #endif
// alloca() is defined only in <cstdlib> on Mac OS X, // alloca() is defined only in <cstdlib> on Mac OS X,
// only in <malloc.h> on win32, and in both on Linux. // only in <malloc.h> on win32, and in both on Linux.
#if defined(_WIN32) #if defined(_WIN32)
#include <malloc.h> #include <malloc.h>
#endif #endif
// Disable usage of min() and max() macros // Disable usage of min() and max() macros
#if defined(_WIN32) #if defined(_WIN32) && !defined(__MINGW32__)
#define NOMINMAX #define NOMINMAX
#endif #endif
// Integer types - fixed size types guaranteed to work anywhere // Integer types - fixed size types guaranteed to work anywhere
// because we detect the right underlying type name to use with // because we detect the right underlying type name to use with
// CMake. Use typedefs rather than macros for saner error messages // CMake. Use typedefs rather than macros for saner error messages
// etc. // etc.
namespace PoDoFo { namespace PoDoFo {
typedef PDF_INT8_TYPENAME pdf_int8; typedef PDF_INT8_TYPENAME pdf_int8;
typedef PDF_INT16_TYPENAME pdf_int16; typedef PDF_INT16_TYPENAME pdf_int16;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 PdfContents.h   PdfContents.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_CONTENTS_H_ #ifndef _PDF_CONTENTS_H_
#define _PDF_CONTENTS_H_ #define _PDF_CONTENTS_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfElement.h" #include "PdfElement.h"
namespace PoDoFo { namespace PoDoFo {
class PdfObject; class PdfObject;
class PdfPage; class PdfPage;
/** A interface that provides a wrapper around "PDF content" - /** A interface that provides a wrapper around "PDF content" -
the instructions that are used to draw on the PDF "canvas". the instructions that are used to draw on the PDF "canvas".
*/ */
class PODOFO_API PdfContents : private PdfElement { class PODOFO_DOC_API PdfContents : private PdfElement {
public: public:
/** Construct a new/empty set of contents in the owning objects /** Construct a new/empty set of contents in the owning objects
*/ */
PdfContents( PdfDocument* pParent ); PdfContents( PdfDocument* pParent );
/** Construct a new/empty set of contents in the owning objects /** Construct a new/empty set of contents in the owning objects
*/ */
PdfContents( PdfVecObjects* pParent ); PdfContents( PdfVecObjects* pParent );
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 PdfContentsTokenizer.h   PdfContentsTokenizer.h 
skipping to change at line 102 skipping to change at line 102
* \param[out] rpszKeyword if pType is set to ePdfContentsType_Keyword this will point to the keyword, * \param[out] rpszKeyword if pType is set to ePdfContentsType_Keyword this will point to the keyword,
* otherwise the value is undefined. If set, the value poi nts to memory owned by the * otherwise the value is undefined. If set, the value poi nts to memory owned by the
* PdfContentsTokenizer and must not be freed. The value i s invalidated when ReadNext * PdfContentsTokenizer and must not be freed. The value i s invalidated when ReadNext
* is next called or when the PdfContentsTokenizer is dest royed. * is next called or when the PdfContentsTokenizer is dest royed.
* *
* \param[out] rVariant if pType is set to ePdfContentsType_Variant or ePdfContentsType_ImageData * \param[out] rVariant if pType is set to ePdfContentsType_Variant or ePdfContentsType_ImageData
* this will be set to the read variant, otherwise the val ue is undefined. * this will be set to the read variant, otherwise the val ue is undefined.
* *
*/ */
bool ReadNext( EPdfContentsType& reType, const char*& rpszKeyword, PoDo Fo::PdfVariant & rVariant ); bool ReadNext( EPdfContentsType& reType, const char*& rpszKeyword, PoDo Fo::PdfVariant & rVariant );
bool GetNextToken( const char *& pszToken, EPdfTokenType* peType = NULL );
private: private:
/** Set another objects stream as the current stream for parsing /** Set another objects stream as the current stream for parsing
* *
* \param pObject use the stream of this object for parsing * \param pObject use the stream of this object for parsing
*/ */
void SetCurrentContentsStream( PdfObject* pObject ); void SetCurrentContentsStream( PdfObject* pObject );
bool ReadInlineImgData(EPdfContentsType& reType, const char*& rpszKeywo rd, PoDoFo::PdfVariant & rVariant); bool ReadInlineImgData(EPdfContentsType& reType, const char*& rpszKeywo rd, PoDoFo::PdfVariant & rVariant);
private: private:
PdfRefCountedBuffer m_curBuffer; ///< A copy of the current co ntents stream
std::list<PdfObject*> m_lstContents; ///< A list containing pointe rs to all contents objects std::list<PdfObject*> m_lstContents; ///< A list containing pointe rs to all contents objects
bool m_readingInlineImgData; ///< A state of read ing inline image data bool m_readingInlineImgData; ///< A state of read ing inline image data
}; };
}; };
#endif // _PDF_CONTENTS_TOKENIZER_H_ #endif // _PDF_CONTENTS_TOKENIZER_H_
 End of changes. 2 change blocks. 
1 lines changed or deleted 1 lines changed or added


 PdfData.h   PdfData.h 
skipping to change at line 79 skipping to change at line 79
*/ */
PdfData( const PdfData & rhs ) PdfData( const PdfData & rhs )
: PdfDataType() : PdfDataType()
{ {
this->operator=( rhs ); this->operator=( rhs );
} }
/** Write the complete datatype to a file. /** Write the complete datatype to a file.
* \param pDevice write the object to this device * \param pDevice write the object to this device
* \param eWriteMode additional options for writing this object * \param eWriteMode additional options for writing this object
* \param pEncrypt an encryption object which is used to encrypt this
object
* or NULL to not encrypt this object
* *
* PdfData cannot do any encryption for you. So the encryption object w ill * PdfData cannot do any encryption for you. So the encryption object w ill
* be ignored as it is also the case for the write mode! * be ignored as it is also the case for the write mode!
*/ */
void Write( PdfOutputDevice* pDevice, EPdfWriteMode eWriteMode, const P dfEncrypt* pEncrypt = NULL ) const; void Write( PdfOutputDevice* pDevice, EPdfWriteMode eWriteMode, const P dfEncrypt* pEncrypt = NULL ) const;
/** Copy an existing PdfData /** Copy an existing PdfData
* \param rhs another PdfData to copy * \param rhs another PdfData to copy
* \returns this object * \returns this object
*/ */
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 PdfDate.h   PdfDate.h 
skipping to change at line 66 skipping to change at line 66
/** Create a PdfDate with a specified date and time /** Create a PdfDate with a specified date and time
* \param t the date and time of this object * \param t the date and time of this object
* *
* Use IsValid to check wether the time_t could be * Use IsValid to check wether the time_t could be
* converted to a valid PdfDate object. * converted to a valid PdfDate object.
* *
* \see IsValid() * \see IsValid()
*/ */
PdfDate( const time_t & t ); PdfDate( const time_t & t );
/** Create a PdfDate with a specified date and time /* !Non-Doxygen comment because constructor is disabled!
* \param szDate the date and time of this object * Create a PdfDate with a specified date and time
* \param zDate the date and time of this object
* in PDF format. It has to be a string of * in PDF format. It has to be a string of
* the format (D:YYYYMMDDHHmmSSOHH'mm'). * the format (D:YYYYMMDDHHmmSSOHH'mm').
* Otherwise IsValid will return false. * Otherwise IsValid will return false.
* *
* Use IsValid to check wether the string could be * Use IsValid to check wether the string could be
* converted to a valid PdfDate object. * converted to a valid PdfDate object.
* *
* \see IsValid() * \see IsValid()
*/ */
//PdfDate( const PdfString & sDate ); //PdfDate( const PdfString & sDate );
 End of changes. 1 change blocks. 
2 lines changed or deleted 3 lines changed or added


 PdfDefines.h   PdfDefines.h 
skipping to change at line 231 skipping to change at line 231
/** /**
* Enum for the colorspaces supported * Enum for the colorspaces supported
* by PDF. * by PDF.
*/ */
enum EPdfColorSpace { enum EPdfColorSpace {
ePdfColorSpace_DeviceGray, /**< Gray */ ePdfColorSpace_DeviceGray, /**< Gray */
ePdfColorSpace_DeviceRGB, /**< RGB */ ePdfColorSpace_DeviceRGB, /**< RGB */
ePdfColorSpace_DeviceCMYK, /**< CMYK */ ePdfColorSpace_DeviceCMYK, /**< CMYK */
ePdfColorSpace_Separation, /**< Separation */ ePdfColorSpace_Separation, /**< Separation */
ePdfColorSpace_CieLab /**< CIE-Lab */ ePdfColorSpace_CieLab, /**< CIE-Lab */
ePdfColorSpace_Unknown = 0xff
}; };
/** /**
* Enum for the different stroke styles that can be set * Enum for the different stroke styles that can be set
* when drawing to a PDF file (mostly for line drawing). * when drawing to a PDF file (mostly for line drawing).
*/ */
enum EPdfStrokeStyle { enum EPdfStrokeStyle {
ePdfStrokeStyle_Solid, ePdfStrokeStyle_Solid,
ePdfStrokeStyle_Dash, ePdfStrokeStyle_Dash,
ePdfStrokeStyle_Dot, ePdfStrokeStyle_Dot,
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added


 PdfDestination.h   PdfDestination.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_DESTINATION_H_ #ifndef _PDF_DESTINATION_H_
#define _PDF_DESTINATION_H_ #define _PDF_DESTINATION_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfArray.h" #include "podofo/base/PdfArray.h"
#include "PdfRect.h" #include "podofo/base/PdfRect.h"
#include "PdfReference.h" #include "podofo/base/PdfReference.h"
namespace PoDoFo { namespace PoDoFo {
class PdfAction; class PdfAction;
class PdfPage; class PdfPage;
class PdfRect; class PdfRect;
enum EPdfDestinationFit { enum EPdfDestinationFit {
ePdfDestinationFit_Fit, ePdfDestinationFit_Fit,
ePdfDestinationFit_FitH, ePdfDestinationFit_FitH,
skipping to change at line 69 skipping to change at line 69
ePdfDestinationType_FitBV, ePdfDestinationType_FitBV,
ePdfDestinationType_Unknown = 0xFF ePdfDestinationType_Unknown = 0xFF
}; };
/** A destination in a PDF file. /** A destination in a PDF file.
* A destination can either be a page or an action. * A destination can either be a page or an action.
* *
* \see PdfOutlineItem \see PdfAnnotation \see PdfDocument * \see PdfOutlineItem \see PdfAnnotation \see PdfDocument
*/ */
class PODOFO_API PdfDestination { class PODOFO_DOC_API PdfDestination {
public: public:
/** Create an empty destination - points to nowhere /** Create an empty destination - points to nowhere
*/ */
PdfDestination( PdfVecObjects* pParent ); PdfDestination( PdfVecObjects* pParent );
/** Create a new PdfDestination from an existing PdfObject (such as loa ded from a doc) /** Create a new PdfDestination from an existing PdfObject (such as loa ded from a doc)
* \param pObject the object to construct from * \param pObject the object to construct from
* \param pDocument a PDF document owning this destination, needed to resolve pages
*/ */
PdfDestination( PdfObject* pObject ); PdfDestination( PdfObject* pObject, PdfDocument* pDocument );
/** Create a new PdfDestination from an existing PdfObject (such as loa
ded from a doc)
* \param pObject the object to construct from
* \param pVecObjects a PdfVecObjects owning this destination, needed
to resolve pages
*/
PdfDestination( PdfObject* pObject, PdfVecObjects* pVecObjects );
/** Create a new PdfDestination with a page as destination /** Create a new PdfDestination with a page as destination
* \param pPage a page which is the destination * \param pPage a page which is the destination
* \param eFit fit mode for the page. Must be ePdfDestinationFit_Fit o r ePdfDestinationFit_FitB * \param eFit fit mode for the page. Must be ePdfDestinationFit_Fit o r ePdfDestinationFit_FitB
*/ */
PdfDestination( const PdfPage* pPage, EPdfDestinationFit eFit = ePdfDes tinationFit_Fit ); PdfDestination( const PdfPage* pPage, EPdfDestinationFit eFit = ePdfDes tinationFit_Fit );
/** Create a destination to a page with its contents magnified to fit i nto the given rectangle /** Create a destination to a page with its contents magnified to fit i nto the given rectangle
* \param pPage a page which is the destination * \param pPage a page which is the destination
* \param rRect magnify the page so that the contents of the rectangle are visible * \param rRect magnify the page so that the contents of the rectangle are visible
skipping to change at line 124 skipping to change at line 131
/** Copy an existing PdfDestination /** Copy an existing PdfDestination
* \param rhs copy this PdfDestination * \param rhs copy this PdfDestination
* \returns this object * \returns this object
*/ */
const PdfDestination & operator=( const PdfDestination & rhs ); const PdfDestination & operator=( const PdfDestination & rhs );
/** Get the page that this destination points to /** Get the page that this destination points to
* Requires that this PdfDestination was somehow * Requires that this PdfDestination was somehow
* created by or from a PdfDocument. Won't work otherwise. * created by or from a PdfDocument. Won't work otherwise.
* \param pDoc a PDF document owning this destination, needed to resol
ve pages
*
* \returns the referenced PdfPage
*/
PdfPage* GetPage( PdfDocument* pDoc );
/** Get the page that this destination points to
* Requires that this PdfDestination was somehow
* created by or from a PdfDocument. Won't work otherwise.
* \param pVecObjects a PdfVecObjects owning this destination, needed
to resolve pages
* *
* \returns the referenced PdfPage * \returns the referenced PdfPage
*/ */
PdfPage* GetPage(); PdfPage* GetPage( PdfVecObjects* pVecObjects );
/** Get the destination fit type /** Get the destination fit type
* *
* \returns the fit type * \returns the fit type
*/ */
inline EPdfDestinationType GetType() const; inline EPdfDestinationType GetType() const;
/** Get the destination zoom /** Get the destination zoom
* Destination must be of type XYZ * Destination must be of type XYZ
* otherwise exception is thrown. * otherwise exception is thrown.
skipping to change at line 210 skipping to change at line 227
/** Adds this destination to an dictionary. /** Adds this destination to an dictionary.
* This method handles the all the complexities of making sure it's ad ded correctly * This method handles the all the complexities of making sure it's ad ded correctly
* *
* If this destination is empty. Nothing will be added. * If this destination is empty. Nothing will be added.
* *
* \param dictionary the destination will be added to this dictionary * \param dictionary the destination will be added to this dictionary
*/ */
void AddToDictionary( PdfDictionary & dictionary ) const; void AddToDictionary( PdfDictionary & dictionary ) const;
private: private:
/** Initialize a new PdfDestination from an existing PdfObject (such as
loaded from a doc)
* and a document.
*
* \param pObject the object to construct from
* \param pDoc a PDF document owning this destination, needed to resol
ve pages
*/
void Init( PdfObject* pObject, PdfDocument* pDocument );
private:
static const long s_lNumDestinations; static const long s_lNumDestinations;
static const char* s_names[]; static const char* s_names[];
PdfArray m_array; PdfArray m_array;
PdfObject* m_pObject; PdfObject* m_pObject;
/** Create an empty destination - NOT ALLOWED /** Create an empty destination - NOT ALLOWED
*/ */
PdfDestination(); PdfDestination();
 End of changes. 8 change blocks. 
7 lines changed or deleted 39 lines changed or added


 PdfDifferenceEncoding.h   PdfDifferenceEncoding.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_DIFFERENCE_ENCODING_H_ #ifndef _PDF_DIFFERENCE_ENCODING_H_
#define _PDF_DIFFERENCE_ENCODING_H_ #define _PDF_DIFFERENCE_ENCODING_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfEncoding.h" #include "podofo/base/PdfEncoding.h"
#include "PdfElement.h" #include "PdfElement.h"
#include <iterator> #include <iterator>
namespace PoDoFo { namespace PoDoFo {
/** A helper class for PdfDifferenceEncoding that /** A helper class for PdfDifferenceEncoding that
* can be used to create a differences array. * can be used to create a differences array.
*/ */
class PODOFO_API PdfEncodingDifference { class PODOFO_DOC_API PdfEncodingDifference {
struct TDifference { struct TDifference {
int nCode; int nCode;
PdfName name; PdfName name;
pdf_utf16be unicodeValue; pdf_utf16be unicodeValue;
}; };
typedef std::vector<TDifference> TVecDifferences; typedef std::vector<TDifference> TVecDifferences;
typedef std::vector<TDifference>::iterator TIVecDifferences; typedef std::vector<TDifference>::iterator TIVecDifferences;
typedef std::vector<TDifference>::const_iterator TCIVecDifferences; typedef std::vector<TDifference>::const_iterator TCIVecDifferences;
skipping to change at line 125 skipping to change at line 125
// ----------------------------------------------------- // -----------------------------------------------------
inline size_t PdfEncodingDifference::GetCount() const inline size_t PdfEncodingDifference::GetCount() const
{ {
return m_vecDifferences.size(); return m_vecDifferences.size();
} }
/** PdfDifferenceEncoding is an encoding, which is based /** PdfDifferenceEncoding is an encoding, which is based
* on either the fonts encoding or a predefined encoding * on either the fonts encoding or a predefined encoding
* and defines differences to this base encoding. * and defines differences to this base encoding.
*/ */
class PODOFO_API PdfDifferenceEncoding : public PdfEncoding, private PdfEle ment { class PODOFO_DOC_API PdfDifferenceEncoding : public PdfEncoding, private Pd fElement {
public: public:
/**
* Defines the base encoding from which a
* PdfDifferenceEncoding differs.
*/
enum EBaseEncoding { enum EBaseEncoding {
eBaseEncoding_Font, ///< Use The fonts encoding as base eBaseEncoding_Font, ///< Use The fonts encoding as base
eBaseEncoding_WinAnsi, ///< Use WinAnsiEncoding as base encoding eBaseEncoding_WinAnsi, ///< Use WinAnsiEncoding as base encoding
eBaseEncoding_MacRoman, ///< Use MacRomanEncoding as base encoding eBaseEncoding_MacRoman, ///< Use MacRomanEncoding as base encoding
eBaseEncoding_MacExpert ///< Use MacExpertEncoding as base encodin g eBaseEncoding_MacExpert ///< Use MacExpertEncoding as base encodin g
}; };
/** Create a new PdfDifferenceEncoding which is based on /** Create a new PdfDifferenceEncoding which is based on
* the fonts encoding. * the fonts encoding.
* *
skipping to change at line 189 skipping to change at line 193
/** Create a new PdfDifferenceEncoding from an existing object /** Create a new PdfDifferenceEncoding from an existing object
* in a PDF file. * in a PDF file.
* *
* \param pObject an existing differences encoding * \param pObject an existing differences encoding
* \param bAutoDelete if true the encoding is deleted by its owning fo nt * \param bAutoDelete if true the encoding is deleted by its owning fo nt
*/ */
PdfDifferenceEncoding( PdfObject* pObject, bool bAutoDelete = true ); PdfDifferenceEncoding( PdfObject* pObject, bool bAutoDelete = true );
/** Convert a standard character name to a unicode code point /** Convert a standard character name to a unicode code point
* *
* \param pszName a standard character name * \param rName a standard character name
* \returns an unicode code point * \returns an unicode code point
*/ */
static pdf_utf16be NameToUnicodeID( const PdfName & rName ); static pdf_utf16be NameToUnicodeID( const PdfName & rName );
/** Convert an unicode code point to a standard character name /** Convert an unicode code point to a standard character name
* *
* \param inCodePoint a code point * \param inCodePoint a code point
* \returns a standard character name of /.notdef if none could be fou nd * \returns a standard character name of /.notdef if none could be fou nd
*/ */
static PdfName UnicodeIDToName( pdf_utf16be inCodePoint ); static PdfName UnicodeIDToName( pdf_utf16be inCodePoint );
skipping to change at line 221 skipping to change at line 225
* \param rEncodedString a string encoded by this encoding. * \param rEncodedString a string encoded by this encoding.
* Usually this string was read from a content stream. * Usually this string was read from a content stream.
* \param pFont the font for which this string is converted * \param pFont the font for which this string is converted
* *
* \returns an unicode PdfString. * \returns an unicode PdfString.
*/ */
virtual PdfString ConvertToUnicode( const PdfString & rEncodedString, c onst PdfFont* pFont ) const; virtual PdfString ConvertToUnicode( const PdfString & rEncodedString, c onst PdfFont* pFont ) const;
/** Convert a unicode PdfString to a string encoded with this encoding. /** Convert a unicode PdfString to a string encoded with this encoding.
* *
* \param an unicode PdfString. * \param rString an unicode PdfString.
* \param pFont the font for which this string is converted * \param pFont the font for which this string is converted
* *
* \returns an encoded PdfRefCountedBuffer. The PdfRefCountedBuffer is treated as a series of bytes * \returns an encoded PdfRefCountedBuffer. The PdfRefCountedBuffer is treated as a series of bytes
* and is allowed to have 0 bytes. The returned buffer must n ot be a unicode string. * and is allowed to have 0 bytes. The returned buffer must n ot be a unicode string.
*/ */
virtual PdfRefCountedBuffer ConvertToEncoding( const PdfString & rStrin g, const PdfFont* pFont ) const; virtual PdfRefCountedBuffer ConvertToEncoding( const PdfString & rStrin g, const PdfFont* pFont ) const;
/** /**
* \returns true if this encoding should be deleted automatically with the * \returns true if this encoding should be deleted automatically with the
* font. * font.
 End of changes. 6 change blocks. 
6 lines changed or deleted 10 lines changed or added


 PdfDocument.h   PdfDocument.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_DOCUMENT_H_ #ifndef _PDF_DOCUMENT_H_
#define _PDF_DOCUMENT_H_ #define _PDF_DOCUMENT_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "podofo/base/PdfObject.h"
#include "podofo/base/PdfParser.h"
#include "podofo/base/PdfWriter.h"
#include "PdfAcroForm.h" #include "PdfAcroForm.h"
#include "PdfFontCache.h" #include "PdfFontCache.h"
#include "PdfInfo.h" #include "PdfInfo.h"
#include "PdfObject.h"
#include "PdfParser.h"
#include "PdfWriter.h"
namespace PoDoFo { namespace PoDoFo {
class PdfDestination; class PdfDestination;
class PdfDictionary; class PdfDictionary;
class PdfFileSpec; class PdfFileSpec;
class PdfFont; class PdfFont;
class PdfInfo; class PdfInfo;
class PdfMemDocument; class PdfMemDocument;
class PdfNamesTree; class PdfNamesTree;
skipping to change at line 62 skipping to change at line 64
* PdfDocument cannot be used directly. * PdfDocument cannot be used directly.
* Use PdfMemDocument whenever you want to change the object structure * Use PdfMemDocument whenever you want to change the object structure
* of a PDF file. * of a PDF file.
* *
* When you are only creating PDF files, please use PdfStreamedDocument * When you are only creating PDF files, please use PdfStreamedDocument
* which is usually faster for creating PDFs. * which is usually faster for creating PDFs.
* *
* \see PdfStreamedDocument * \see PdfStreamedDocument
* \see PdfMemDocument * \see PdfMemDocument
*/ */
class PODOFO_API PdfDocument { class PODOFO_DOC_API PdfDocument {
friend class PdfWriter;
friend class PdfElement; friend class PdfElement;
public: public:
/** Close down/destruct the PdfDocument /** Close down/destruct the PdfDocument
*/ */
virtual ~PdfDocument(); virtual ~PdfDocument();
/** Get the write mode used for wirting the PDF /** Get the write mode used for wirting the PDF
* \returns the write mode * \returns the write mode
*/ */
skipping to change at line 168 skipping to change at line 169
bool bEmbedd = true ); bool bEmbedd = true );
/** Creates a PdfFont object /** Creates a PdfFont object
* \param pszFontName name of the font as it is known to the system * \param pszFontName name of the font as it is known to the system
* \param bBold if true search for a bold font * \param bBold if true search for a bold font
* \param bItalic if true search for an italic font * \param bItalic if true search for an italic font
* \param pEncoding the encoding of the font. The font will not take o wnership of this object. * \param pEncoding the encoding of the font. The font will not take o wnership of this object.
* \param eFontCreationFlags special flag to specify how fonts should be created * \param eFontCreationFlags special flag to specify how fonts should be created
* \param bEmbedd specifies whether this font should be embedded in th e PDF file. * \param bEmbedd specifies whether this font should be embedded in th e PDF file.
* Embedding fonts is usually a good idea. * Embedding fonts is usually a good idea.
* \param optional: pszFileName path to a valid font file * \param pszFileName path to a valid font file
* *
* \returns PdfFont* a pointer to a new PdfFont object. * \returns PdfFont* a pointer to a new PdfFont object.
*/ */
PdfFont* CreateFont( const char* pszFontName, bool bBold, bool bItalic, PdfFont* CreateFont( const char* pszFontName, bool bBold, bool bItalic,
const PdfEncoding * const pEncoding = PdfEncodingF actory::GlobalWinAnsiEncodingInstance(), const PdfEncoding * const pEncoding = PdfEncodingF actory::GlobalWinAnsiEncodingInstance(),
PdfFontCache::EFontCreationFlags eFontCreationFlag s = PdfFontCache::eFontCreationFlags_AutoSelectBase14, PdfFontCache::EFontCreationFlags eFontCreationFlag s = PdfFontCache::eFontCreationFlags_AutoSelectBase14,
bool bEmbedd = true, const char* pszFileName = NUL L ); bool bEmbedd = true, const char* pszFileName = NUL L );
#ifdef _WIN32 #ifdef _WIN32
/** Creates a PdfFont object /** Creates a PdfFont object
skipping to change at line 242 skipping to change at line 243
PdfFont* CreateDuplicateFontType1( PdfFont * pFont, const char * psz Suffix ); PdfFont* CreateDuplicateFontType1( PdfFont * pFont, const char * psz Suffix );
/** Creates a font subset which contains only a few characters and i s embedded. /** Creates a font subset which contains only a few characters and i s embedded.
* *
* THIS WORKS ONLY FOR TTF FONTS! * THIS WORKS ONLY FOR TTF FONTS!
* *
* \param pszFontName name of the font as it is known to the system * \param pszFontName name of the font as it is known to the system
* \param bBold if true search for a bold font * \param bBold if true search for a bold font
* \param bItalic if true search for an italic font * \param bItalic if true search for an italic font
* \param pEncoding the encoding of the font. The font will not take o wnership of this object. * \param pEncoding the encoding of the font. The font will not take o wnership of this object.
* \param pszFileName optional path of a fontfile which should be used
* *
* \returns PdfFont* a pointer to a new PdfFont object. * \returns PdfFont* a pointer to a new PdfFont object.
*/ */
PdfFont* CreateFontSubset( const char* pszFontName, bool bBold, bool bI talic, PdfFont* CreateFontSubset( const char* pszFontName, bool bBold, bool bI talic,
const PdfEncoding * const = PdfEncodingFactor y::GlobalWinAnsiEncodingInstance(), const PdfEncoding * const pEncoding = PdfEnco dingFactory::GlobalWinAnsiEncodingInstance(),
const char* pszFileName = NULL); const char* pszFileName = NULL);
#ifdef _WIN32 #ifdef _WIN32
/** Creates a font subset which contains only a few characters and is e mbedded. /** Creates a font subset which contains only a few characters and is e mbedded.
* *
* THIS WORKS ONLY FOR TTF FONTS! * THIS WORKS ONLY FOR TTF FONTS!
* *
* \param pszFontName name of the font as it is known to the system * \param pszFontName name of the font as it is known to the system
* \param bBold if true search for a bold font * \param bBold if true search for a bold font
* \param bItalic if true search for an italic font * \param bItalic if true search for an italic font
skipping to change at line 559 skipping to change at line 561
/** Recursively changes every PdfReference in the PdfObject and in any child /** Recursively changes every PdfReference in the PdfObject and in any child
* that is either an PdfArray or a direct object. * that is either an PdfArray or a direct object.
* The reference is changed so that difference is added to the object number * The reference is changed so that difference is added to the object number
* if the reference. * if the reference.
* \param pObject object to change * \param pObject object to change
* \param difference add this value to every reference that is encount ered * \param difference add this value to every reference that is encount ered
*/ */
void FixObjectReferences( PdfObject* pObject, int difference ); void FixObjectReferences( PdfObject* pObject, int difference );
/** Low level APIs for setting a viewer preference /** Low level APIs for setting a viewer preference
* \param whichPrefs the dictionary key to set * \param whichPref the dictionary key to set
* \param the object to be set * \param valueObj the object to be set
*/ */
void SetViewerPreference( const PdfName& whichPref, const PdfObject & v alueObj ); void SetViewerPreference( const PdfName& whichPref, const PdfObject & v alueObj );
/** Low level APIs for setting a viewer preference
* Convinience overload.
* \param whichPref the dictionary key to set
* \param inValue the object to be set
*/
void SetViewerPreference( const PdfName& whichPref, bool inValue ); void SetViewerPreference( const PdfName& whichPref, bool inValue );
/** Clear all internal variables /** Clear all internal variables
* And reset PdfDocument to an intial state * And reset PdfDocument to an intial state
*/ */
void Clear(); void Clear();
protected: protected:
PdfFontCache m_fontCache; PdfFontCache m_fontCache;
 End of changes. 8 change blocks. 
10 lines changed or deleted 18 lines changed or added


 PdfElement.h   PdfElement.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_ELEMENT_H_ #ifndef _PDF_ELEMENT_H_
#define _PDF_ELEMENT_H_ #define _PDF_ELEMENT_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "podofo/base/PdfObject.h"
#include "PdfObject.h"
namespace PoDoFo { namespace PoDoFo {
class PdfStreamedDocument; class PdfStreamedDocument;
class PdfVecObjects; class PdfVecObjects;
/** PdfElement is a common base class for all elements /** PdfElement is a common base class for all elements
* in a PDF file. For example pages, action and annotations. * in a PDF file. For example pages, action and annotations.
* *
* Every PDF element has one PdfObject and provides an easier * Every PDF element has one PdfObject and provides an easier
* interface to modify the contents of the dictionary. * interface to modify the contents of the dictionary.
* *
* A PdfElement base class can be created from an existing PdfObject * A PdfElement base class can be created from an existing PdfObject
* or created from scratch. In the later case, the PdfElement creates * or created from scratch. In the later case, the PdfElement creates
* a PdfObject and adds it to a vector of objects. * a PdfObject and adds it to a vector of objects.
* *
* A PdfElement cannot be created directly. Use one * A PdfElement cannot be created directly. Use one
* of the subclasses which implement real functionallity. * of the subclasses which implement real functionallity.
* *
* \see PdfPage \see PdfAction \see PdfAnnotation * \see PdfPage \see PdfAction \see PdfAnnotation
*/ */
class PODOFO_API PdfElement { class PODOFO_DOC_API PdfElement {
public: public:
virtual ~PdfElement(); virtual ~PdfElement();
/** Get access to the internal object /** Get access to the internal object
* \returns the internal PdfObject * \returns the internal PdfObject
*/ */
inline PdfObject* GetObject(); inline PdfObject* GetObject();
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 PdfEncoding.h   PdfEncoding.h 
skipping to change at line 25 skipping to change at line 25
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_ENCODING_H_ #ifndef _PDF_ENCODING_H_
#define _PDF_ENCODING_H_ #define _PDF_ENCODING_H_
#include "PdfDefines.h" #include "PdfDefines.h"
#include "PdfElement.h"
#include "PdfName.h" #include "PdfName.h"
#include "PdfString.h" #include "PdfString.h"
#include "util/PdfMutex.h" #include "util/PdfMutex.h"
#include <iterator> #include <iterator>
namespace PoDoFo { namespace PoDoFo {
class PdfDictionary; class PdfDictionary;
class PdfFont; class PdfFont;
skipping to change at line 160 skipping to change at line 159
* \param rEncodedString a string encoded by this encoding. * \param rEncodedString a string encoded by this encoding.
* Usually this string was read from a content stream. * Usually this string was read from a content stream.
* \param pFont the font for which this string is converted * \param pFont the font for which this string is converted
* *
* \returns an unicode PdfString. * \returns an unicode PdfString.
*/ */
virtual PdfString ConvertToUnicode( const PdfString & rEncodedString, c onst PdfFont* pFont ) const = 0; virtual PdfString ConvertToUnicode( const PdfString & rEncodedString, c onst PdfFont* pFont ) const = 0;
/** Convert a unicode PdfString to a string encoded with this encoding. /** Convert a unicode PdfString to a string encoded with this encoding.
* *
* \param an unicode PdfString. * \param rString an unicode PdfString.
* \param pFont the font for which this string is converted * \param pFont the font for which this string is converted
* *
* \returns an encoded PdfRefCountedBuffer. The PdfRefCountedBuffer is treated as a series of bytes * \returns an encoded PdfRefCountedBuffer. The PdfRefCountedBuffer is treated as a series of bytes
* and is allowed to have 0 bytes. The returned buffer must n ot be a unicode string. * and is allowed to have 0 bytes. The returned buffer must n ot be a unicode string.
*/ */
virtual PdfRefCountedBuffer ConvertToEncoding( const PdfString & rStrin g, const PdfFont* pFont ) const = 0; virtual PdfRefCountedBuffer ConvertToEncoding( const PdfString & rStrin g, const PdfFont* pFont ) const = 0;
/** /**
* \returns true if this encoding should be deleted automatically with the * \returns true if this encoding should be deleted automatically with the
* font. * font.
skipping to change at line 344 skipping to change at line 343
* \param rEncodedString a string encoded by this encoding. * \param rEncodedString a string encoded by this encoding.
* Usually this string was read from a content stream. * Usually this string was read from a content stream.
* \param pFont the font for which this string is converted * \param pFont the font for which this string is converted
* *
* \returns an unicode PdfString. * \returns an unicode PdfString.
*/ */
virtual PdfString ConvertToUnicode( const PdfString & rEncodedString, c onst PdfFont* pFont ) const; virtual PdfString ConvertToUnicode( const PdfString & rEncodedString, c onst PdfFont* pFont ) const;
/** Convert a unicode PdfString to a string encoded with this encoding. /** Convert a unicode PdfString to a string encoded with this encoding.
* *
* \param an unicode PdfString. * \param rString an unicode PdfString.
* \param pFont the font for which this string is converted * \param pFont the font for which this string is converted
* *
* \returns an encoded PdfRefCountedBuffer. The PdfRefCountedBuffer is treated as a series of bytes * \returns an encoded PdfRefCountedBuffer. The PdfRefCountedBuffer is treated as a series of bytes
* and is allowed to have 0 bytes. The returned buffer must n ot be a unicode string. * and is allowed to have 0 bytes. The returned buffer must n ot be a unicode string.
*/ */
virtual PdfRefCountedBuffer ConvertToEncoding( const PdfString & rStrin g, const PdfFont* pFont ) const; virtual PdfRefCountedBuffer ConvertToEncoding( const PdfString & rStrin g, const PdfFont* pFont ) const;
/** /**
* PdfSimpleEncoding subclasses are usuylla not auto-deleted, as * PdfSimpleEncoding subclasses are usuylla not auto-deleted, as
* they are allocated statically only once. * they are allocated statically only once.
skipping to change at line 708 skipping to change at line 707
* *
* \returns an array of 256 big endian unicode code points * \returns an array of 256 big endian unicode code points
*/ */
virtual const pdf_utf16be* GetToUnicodeTable() const; virtual const pdf_utf16be* GetToUnicodeTable() const;
private: private:
static const pdf_utf16be s_cEncoding[256]; ///< conversion table from Z apfDingbatsEncoding to UTF16 static const pdf_utf16be s_cEncoding[256]; ///< conversion table from Z apfDingbatsEncoding to UTF16
}; };
/** PdfIdentityEncoding is a two-byte encoding which can be
* used with TrueType fonts to represent all characters
* present in a font. If the font contains all unicode
* glyphs, PdfIdentityEncoding will support all unicode
* characters.
*/
class PODOFO_API PdfIdentityEncoding : public PdfEncoding {
public:
/**
* Create a new PdfIdentityEncoding.
*
* \param nFirstChar the first supported unicode character code (at le
ast 0)
* \param nLastChar the last supported unicode character code,
* must be larger than nFirstChar (max value is 0xfff
f)
* \param bAutoDelete if true the encoding is deleted by its owning fo
nt
*/
PdfIdentityEncoding( int nFirstChar = 0, int nLastChar = 0xffff, bool b
AutoDelete = true );
/** Add this encoding object to a dictionary
* usually be adding an /Encoding key in font dictionaries.
*
* \param rDictionary add the encoding to this dictionary
*/
virtual void AddToDictionary( PdfDictionary & rDictionary ) const;
/** Convert a string that is encoded with this encoding
* to an unicode PdfString.
*
* \param rEncodedString a string encoded by this encoding.
* Usually this string was read from a content stream.
* \param pFont the font for which this string is converted
*
* \returns an unicode PdfString.
*/
virtual PdfString ConvertToUnicode( const PdfString & rEncodedString, c
onst PdfFont* pFont ) const;
/** Convert a unicode PdfString to a string encoded with this encoding.
*
* \param an unicode PdfString.
* \param pFont the font for which this string is converted
*
* \returns an encoded PdfRefCountedBuffer. The PdfRefCountedBuffer is
treated as a series of bytes
* and is allowed to have 0 bytes. The returned buffer must n
ot be a unicode string.
*/
virtual PdfRefCountedBuffer ConvertToEncoding( const PdfString & rStrin
g, const PdfFont* pFont ) const;
/**
* PdfIdentityEncoding is usually delete along with the font.
*
* \returns true if this encoding should be deleted automatically with
the
* font.
*/
virtual bool IsAutoDelete() const;
/**
* \returns true if this is a single byte encoding with a maximum of 2
56 values.
*/
virtual bool IsSingleByteEncoding() const;
/** Get the unicode character code for this encoding
* at the position nIndex. nIndex is a position between
* GetFirstChar() and GetLastChar()
*
* \param nIndex character code at position index
* \returns unicode character code
*
* \see GetFirstChar
* \see GetLastChar
*
* Will throw an exception if nIndex is out of range.
*/
virtual pdf_utf16be GetCharCode( int nIndex ) const;
protected:
/** Get a unique ID for this encoding
* which can used for comparisons!
*
* \returns a unique id for this encoding!
*/
inline virtual const PdfName & GetID() const;
private:
/** Gets the unicode value from a char code in this font
*
* \param lCharCode the character code (i.e. glyph id)
*
* \returns an unicode value
*/
pdf_utf16be GetUnicodeValue( long lCharCode ) const;
private:
bool m_bAutoDelete; ///< If true this encoding is deleted by it
s font.
PdfName m_id; ///< Unique ID of this encoding
};
// -----------------------------------------------------
//
// -----------------------------------------------------
inline const PdfName & PdfIdentityEncoding::GetID() const
{
return m_id;
}
// -----------------------------------------------------
//
// -----------------------------------------------------
inline bool PdfIdentityEncoding::IsAutoDelete() const
{
return m_bAutoDelete;
}
// -----------------------------------------------------
//
// -----------------------------------------------------
inline bool PdfIdentityEncoding::IsSingleByteEncoding() const
{
return false;
}
}; /* namespace PoDoFo */ }; /* namespace PoDoFo */
#endif // _PDF_ENCODING_H_ #endif // _PDF_ENCODING_H_
 End of changes. 4 change blocks. 
134 lines changed or deleted 2 lines changed or added


 PdfEncodingFactory.h   PdfEncodingFactory.h 
skipping to change at line 45 skipping to change at line 45
class PdfStandardEncoding; // OC 13.08.2010 class PdfStandardEncoding; // OC 13.08.2010
class PdfMacExpertEncoding; // OC 13.08.2010 class PdfMacExpertEncoding; // OC 13.08.2010
class PdfSymbolEncoding; // OC 13.08.2010 class PdfSymbolEncoding; // OC 13.08.2010
class PdfZapfDingbatsEncoding; // OC 13.08.2010 class PdfZapfDingbatsEncoding; // OC 13.08.2010
/** This factory creates a PdfEncoding /** This factory creates a PdfEncoding
* from an existing object in the PDF. * from an existing object in the PDF.
*/ */
class PODOFO_API PdfEncodingFactory { class PODOFO_API PdfEncodingFactory {
public: public:
/** Create a new PdfEncoding from either an
* encoding name or an encoding dictionary.
*
* \param pObject must be a name or an encoding dictionary
*
* \returns a PdfEncoding or NULL
*/
static const PdfEncoding* CreateEncoding( PdfObject* pObject );
/** Singleton method which returns a global instance /** Singleton method which returns a global instance
* of PdfDocEncoding. * of PdfDocEncoding.
* *
* \returns global instance of PdfDocEncoding * \returns global instance of PdfDocEncoding
*/ */
static const PdfEncoding* GlobalPdfDocEncodingInstance(); static const PdfEncoding* GlobalPdfDocEncodingInstance();
/** Singleton method which returns a global instance /** Singleton method which returns a global instance
* of WinAnsiEncoding. * of WinAnsiEncoding.
* *
 End of changes. 1 change blocks. 
9 lines changed or deleted 0 lines changed or added


 PdfEncrypt.h   PdfEncrypt.h 
skipping to change at line 90 skipping to change at line 90
ePdfPermissions_Print = 0x00000004, ///< Allow printing t he document ePdfPermissions_Print = 0x00000004, ///< Allow printing t he document
ePdfPermissions_Edit = 0x00000008, ///< Allow modifying the document besides annotations, form fields or chaning pages ePdfPermissions_Edit = 0x00000008, ///< Allow modifying the document besides annotations, form fields or chaning pages
ePdfPermissions_Copy = 0x00000010, ///< Allow text and g raphic extraction ePdfPermissions_Copy = 0x00000010, ///< Allow text and g raphic extraction
ePdfPermissions_EditNotes = 0x00000020, ///< Add or modify te xt annoations or form fields (if ePdfPermissions_Edit is set also allow to create interactive form fields including signature) ePdfPermissions_EditNotes = 0x00000020, ///< Add or modify te xt annoations or form fields (if ePdfPermissions_Edit is set also allow to create interactive form fields including signature)
ePdfPermissions_FillAndSign = 0x00000100, ///< Fill in existing form or signature fields ePdfPermissions_FillAndSign = 0x00000100, ///< Fill in existing form or signature fields
ePdfPermissions_Accessible = 0x00000200, ///< Extract text and graphics to support user with disabillities ePdfPermissions_Accessible = 0x00000200, ///< Extract text and graphics to support user with disabillities
ePdfPermissions_DocAssembly = 0x00000400, ///< Assemble the doc ument: insert, create, rotate delete pages or add bookmarks ePdfPermissions_DocAssembly = 0x00000400, ///< Assemble the doc ument: insert, create, rotate delete pages or add bookmarks
ePdfPermissions_HighPrint = 0x00000800 ///< Print a high res olution version of the document ePdfPermissions_HighPrint = 0x00000800 ///< Print a high res olution version of the document
} EPdfPermissions; } EPdfPermissions;
/**
* The encryption algorithm.
*/
typedef enum { typedef enum {
ePdfEncryptAlgorithm_RC4V1 = 1, ///< RC4 Version 1 encryption using a 40bit key ePdfEncryptAlgorithm_RC4V1 = 1, ///< RC4 Version 1 encryption using a 40bit key
ePdfEncryptAlgorithm_RC4V2 = 2, ///< RC4 Version 2 encryption using a key with 40-128bit ePdfEncryptAlgorithm_RC4V2 = 2, ///< RC4 Version 2 encryption using a key with 40-128bit
ePdfEncryptAlgorithm_AESV2 = 4 ///< AES encryption with an 128 bit key (PDF1.6) ePdfEncryptAlgorithm_AESV2 = 4 ///< AES encryption with an 128 bit key (PDF1.6)
} EPdfEncryptAlgorithm; } EPdfEncryptAlgorithm;
/** Create a PdfEncrypt object which can be used to encrypt a PDF file. /** Create a PdfEncrypt object which can be used to encrypt a PDF file.
* *
* \param userPassword the user password (if empty the user does not h ave * \param userPassword the user password (if empty the user does not h ave
* to enter a password to open the document) * to enter a password to open the document)
* \param ownerPassword the owner password * \param ownerPassword the owner password
* \param protection several EPdfPermissions values or'ed together to set * \param protection several EPdfPermissions values or'ed together to set
* the users permissions for this document * the users permissions for this document
* \param eRevision the revision of the encryption algorithm to be use d * \param eAlgorithm the revision of the encryption algorithm to be us ed
* \param eKeyLength the length of the encryption key ranging from 40 to 128 bits * \param eKeyLength the length of the encryption key ranging from 40 to 128 bits
* (only used if eAlgorithm == ePdfEncryptAlgorithm_ RC4V2) * (only used if eAlgorithm == ePdfEncryptAlgorithm_ RC4V2)
* *
* \see GenerateEncryptionKey with the documentID to generate the real * \see GenerateEncryptionKey with the documentID to generate the real
* encryption key using this information * encryption key using this information
*/ */
static PdfEncrypt * CreatePdfEncrypt( const std::string & userPassword, static PdfEncrypt * CreatePdfEncrypt( const std::string & userPassword,
const std::string & ownerPassword , const std::string & ownerPassword ,
int protection = ePdfPermissions_ Print | int protection = ePdfPermissions_ Print |
ePdfPermissions_Edit | ePdfPermissions_Edit |
skipping to change at line 396 skipping to change at line 399
unsigned char* textout); unsigned char* textout);
/// Calculate the binary MD5 message digest of the given data /// Calculate the binary MD5 message digest of the given data
static void GetMD5Binary(const unsigned char* data, int length, unsigne d char* digest); static void GetMD5Binary(const unsigned char* data, int length, unsigne d char* digest);
/// Generate initial vector /// Generate initial vector
void GenerateInitialVector(unsigned char iv[16]); void GenerateInitialVector(unsigned char iv[16]);
/** Create the encryption key for the current object. /** Create the encryption key for the current object.
* *
* \param pObjkey pointer to an array of at least MD5_HASHBYTES (=16) bytes length * \param objkey pointer to an array of at least MD5_HASHBYTES (=16) b ytes length
* \param pnKeyLen pointer to an integer where the actual keylength is stored. * \param pnKeyLen pointer to an integer where the actual keylength is stored.
*/ */
void CreateObjKey( unsigned char objkey[16], int* pnKeyLen ) const; void CreateObjKey( unsigned char objkey[16], int* pnKeyLen ) const;
EPdfEncryptAlgorithm m_eAlgorithm; ///< The used encryption algorith m EPdfEncryptAlgorithm m_eAlgorithm; ///< The used encryption algorith m
int m_keyLength; ///< Length of encryption key int m_keyLength; ///< Length of encryption key
int m_rValue; ///< Revision int m_rValue; ///< Revision
int m_pValue; ///< P entry in pdf document int m_pValue; ///< P entry in pdf document
EPdfKeyLength m_eKeyLength; ///< The key length EPdfKeyLength m_eKeyLength; ///< The key length
std::string m_userPass; ///< User password std::string m_userPass; ///< User password
 End of changes. 3 change blocks. 
2 lines changed or deleted 5 lines changed or added


 PdfError.h   PdfError.h 
skipping to change at line 70 skipping to change at line 70
ePdfError_InternalLogic, /**< An internal sanity check or as sertion failed. */ ePdfError_InternalLogic, /**< An internal sanity check or as sertion failed. */
ePdfError_InvalidEnumValue, /**< An invalid enum value was spec ified. */ ePdfError_InvalidEnumValue, /**< An invalid enum value was spec ified. */
ePdfError_PageNotFound, /**< The requested page could not b e found in the PDF. */ ePdfError_PageNotFound, /**< The requested page could not b e found in the PDF. */
ePdfError_NoPdfFile, /**< The file is no PDF file. */ ePdfError_NoPdfFile, /**< The file is no PDF file. */
ePdfError_NoXRef, /**< The PDF file has no or an inva lid XRef table. */ ePdfError_NoXRef, /**< The PDF file has no or an inva lid XRef table. */
ePdfError_NoTrailer, /**< The PDF file has no or an inva lid trailer. */ ePdfError_NoTrailer, /**< The PDF file has no or an inva lid trailer. */
ePdfError_NoNumber, /**< A number was expected in the P DF file, but the read string is no number. */ ePdfError_NoNumber, /**< A number was expected in the P DF file, but the read string is no number. */
ePdfError_NoObject, /**< A object was expected and non was found. */ ePdfError_NoObject, /**< A object was expected and non was found. */
ePdfError_NoEOFToken, /**< The PDF file has no or an inva lid EOF marker. */
ePdfError_InvalidTrailerSize, /**< The trailer size is invalid. * / ePdfError_InvalidTrailerSize, /**< The trailer size is invalid. * /
ePdfError_InvalidLinearization, /**< The linearization directory of a web-optimized PDF file is invalid. */ ePdfError_InvalidLinearization, /**< The linearization directory of a web-optimized PDF file is invalid. */
ePdfError_InvalidDataType, /**< The passed datatype is invalid or was not recognized */ ePdfError_InvalidDataType, /**< The passed datatype is invalid or was not recognized */
ePdfError_InvalidXRef, /**< The XRef table is invalid */ ePdfError_InvalidXRef, /**< The XRef table is invalid */
ePdfError_InvalidXRefStream, /**< A XRef steam is invalid */ ePdfError_InvalidXRefStream, /**< A XRef steam is invalid */
ePdfError_InvalidXRefType, /**< The XRef type is invalid or wa s not found */ ePdfError_InvalidXRefType, /**< The XRef type is invalid or wa s not found */
ePdfError_InvalidPredictor, /**< Invalid or unimplemented predi ctor */ ePdfError_InvalidPredictor, /**< Invalid or unimplemented predi ctor */
ePdfError_InvalidStrokeStyle, /**< Invalid stroke style during dr awing */ ePdfError_InvalidStrokeStyle, /**< Invalid stroke style during dr awing */
ePdfError_InvalidHexString, /**< Invalid hex string */ ePdfError_InvalidHexString, /**< Invalid hex string */
skipping to change at line 214 skipping to change at line 215
public: public:
// OC 17.08.2010 New to optionally replace stderr output by a callback: // OC 17.08.2010 New to optionally replace stderr output by a callback:
class LogMessageCallback class LogMessageCallback
{ {
public: public:
virtual ~LogMessageCallback() {} // every class with virtual method s needs a virtual destructor virtual ~LogMessageCallback() {} // every class with virtual method s needs a virtual destructor
virtual void LogMessage( ELogSeverity eLogSeverity, const char* psz Prefix, const char* pszMsg, va_list & args ) = 0; virtual void LogMessage( ELogSeverity eLogSeverity, const char* psz Prefix, const char* pszMsg, va_list & args ) = 0;
virtual void LogMessage( ELogSeverity eLogSeverity, const wchar_t* pszPrefix, const wchar_t* pszMsg, va_list & args ) = 0; virtual void LogMessage( ELogSeverity eLogSeverity, const wchar_t* pszPrefix, const wchar_t* pszMsg, va_list & args ) = 0;
}; };
/** Set a global static LogMessageCallback functor to repleace stderr o utput in LogMessageInternal /** Set a global static LogMessageCallback functor to repleace stderr o utput in LogMessageInternal
* \param fCallback the pointer to the new callback functor object * \param fLogMessageCallback the pointer to the new callback functor object
* \returns the pointer to the previous callback functor object * \returns the pointer to the previous callback functor object
*/ */
static LogMessageCallback* SetLogMessageCallback(LogMessageCallback* fL ogMessageCallback); static LogMessageCallback* SetLogMessageCallback(LogMessageCallback* fL ogMessageCallback);
/** Create a PdfError object initialized to ErrOk /** Create a PdfError object initialized to ErrOk
*/ */
PdfError(); PdfError();
/** Create a PdfError object with a given error code. /** Create a PdfError object with a given error code.
* \param eCode the error code of this object * \param eCode the error code of this object
skipping to change at line 425 skipping to change at line 427
static void LogMessageInternal( ELogSeverity eLogSeverity, const char* pszMsg, va_list & args ); static void LogMessageInternal( ELogSeverity eLogSeverity, const char* pszMsg, va_list & args );
static void LogMessageInternal( ELogSeverity eLogSeverity, const wchar_ t* pszMsg, va_list & args ); static void LogMessageInternal( ELogSeverity eLogSeverity, const wchar_ t* pszMsg, va_list & args );
private: private:
EPdfError m_error; EPdfError m_error;
TDequeErrorInfo m_callStack; TDequeErrorInfo m_callStack;
static bool s_DgbEnabled; static bool s_DgbEnabled;
static bool s_LogEnabled; static bool s_LogEnabled;
// OC 17.08.2010 New to optionally replace stderr output by a callback: // OC 17.08.2010 New to optionally replace stderr output by a callback:
static LogMessageCallback* m_fLogMessageCallback; static LogMessageCallback* m_fLogMessageCallback;
}; };
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
EPdfError PdfError::GetError() const EPdfError PdfError::GetError() const
{ {
 End of changes. 4 change blocks. 
2 lines changed or deleted 4 lines changed or added


 PdfExtGState.h   PdfExtGState.h 
#ifndef _PDF_EXTGSTATE_H_ #ifndef _PDF_EXTGSTATE_H_
#define _PDF_EXTGSTATE_H_ #define _PDF_EXTGSTATE_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfName.h" #include "podofo/base/PdfName.h"
#include "PdfElement.h" #include "PdfElement.h"
namespace PoDoFo { namespace PoDoFo {
class PdfObject; class PdfObject;
class PdfPage; class PdfPage;
class PdfWriter; class PdfWriter;
/** This class wraps the ExtGState object used in the Resource /** This class wraps the ExtGState object used in the Resource
* Dictionary of a Content-supporting element (page, Pattern, etc.) * Dictionary of a Content-supporting element (page, Pattern, etc.)
* The main usage is for transparency, but it also support a variety * The main usage is for transparency, but it also support a variety
* of prepress features. * of prepress features.
*/ */
class PODOFO_API PdfExtGState : public PdfElement { class PODOFO_DOC_API PdfExtGState : public PdfElement {
public: public:
/** Create a new PdfExtGState object which will introduce itself /** Create a new PdfExtGState object which will introduce itself
* automatically to every page object it is used on. * automatically to every page object it is used on.
* *
* \param pParent parent vector of objects * \param pParent parent vector of objects
* *
*/ */
PdfExtGState( PdfVecObjects* pParent ); PdfExtGState( PdfVecObjects* pParent );
/** Create a new PdfExtGState object which will introduce itself /** Create a new PdfExtGState object which will introduce itself
skipping to change at line 87 skipping to change at line 88
* \param enable enable or disable * \param enable enable or disable
*/ */
void SetNonZeroOverprint( bool enable=true ); void SetNonZeroOverprint( bool enable=true );
/** Set the Rendering Intent /** Set the Rendering Intent
* \param intent one of the predefined intents (see Podofo.h) * \param intent one of the predefined intents (see Podofo.h)
*/ */
void SetRenderingIntent( char* intent ); void SetRenderingIntent( char* intent );
/** Set the frequency for halftones /** Set the frequency for halftones
* \param screen frequency, measured in halftone cells per inch in dev ice space * \param frequency screen frequency, measured in halftone cells per i nch in device space
*/ */
void SetFrequency( double frequency ); void SetFrequency( double frequency );
private: private:
/** Initialize the object /** Initialize the object
*/ */
void Init( void ); void Init( void );
private: private:
PdfName m_Identifier; PdfName m_Identifier;
 End of changes. 3 change blocks. 
4 lines changed or deleted 5 lines changed or added


 PdfField.h   PdfField.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FIELD_H_ #ifndef _PDF_FIELD_H_
#define _PDF_FIELD_H_ #define _PDF_FIELD_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "podofo/base/PdfName.h"
#include "podofo/base/PdfString.h"
#include "PdfAnnotation.h" #include "PdfAnnotation.h"
#include "PdfName.h"
#include "PdfString.h"
namespace PoDoFo { namespace PoDoFo {
class PdfAcroForm; class PdfAcroForm;
class PdfAction; class PdfAction;
class PdfAnnotation; class PdfAnnotation;
class PdfDocument; class PdfDocument;
class PdfObject; class PdfObject;
class PdfPage; class PdfPage;
class PdfRect; class PdfRect;
skipping to change at line 73 skipping to change at line 73
*/ */
enum EPdfHighlightingMode { enum EPdfHighlightingMode {
ePdfHighlightingMode_None, ///< Do no highlighting ePdfHighlightingMode_None, ///< Do no highlighting
ePdfHighlightingMode_Invert, ///< Invert the PdfField ePdfHighlightingMode_Invert, ///< Invert the PdfField
ePdfHighlightingMode_InvertOutline, ///< Invert the fields border ePdfHighlightingMode_InvertOutline, ///< Invert the fields border
ePdfHighlightingMode_Push, ///< Display the fields down appea rance (requires an additional appearance stream to be set) ePdfHighlightingMode_Push, ///< Display the fields down appea rance (requires an additional appearance stream to be set)
ePdfHighlightingMode_Unknown = 0xff ePdfHighlightingMode_Unknown = 0xff
}; };
class PODOFO_API PdfField { class PODOFO_DOC_API PdfField {
enum { ePdfField_ReadOnly = 0x0001, enum { ePdfField_ReadOnly = 0x0001,
ePdfField_Required = 0x0002, ePdfField_Required = 0x0002,
ePdfField_NoExport = 0x0004 ePdfField_NoExport = 0x0004
}; };
protected: protected:
/** Create a new PdfAcroForm dictionary object /** Create a new PdfAcroForm dictionary object
* \param pParent parent of this action * \param pParent parent of this action
*/ */
PdfField( EPdfField eField, PdfAnnotation* pWidget, PdfAcroForm* pParen t ); PdfField( EPdfField eField, PdfAnnotation* pWidget, PdfAcroForm* pParen t );
skipping to change at line 557 skipping to change at line 557
// Peter Petrov 27 April 2008 // Peter Petrov 27 April 2008
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
inline PdfObject* PdfField::GetFieldObject() const inline PdfObject* PdfField::GetFieldObject() const
{ {
return m_pObject; return m_pObject;
} }
class PODOFO_API PdfButton : public PdfField { class PODOFO_DOC_API PdfButton : public PdfField {
protected: protected:
enum { ePdfButton_NoToggleOff = 0x0004000, enum { ePdfButton_NoToggleOff = 0x0004000,
ePdfButton_Radio = 0x0008000, ePdfButton_Radio = 0x0008000,
ePdfButton_PushButton = 0x0010000, ePdfButton_PushButton = 0x0010000,
ePdfButton_RadioInUnison = 0x2000000 ePdfButton_RadioInUnison = 0x2000000
}; };
/** Create a new PdfButton /** Create a new PdfButton
*/ */
PdfButton( EPdfField eField, PdfAnnotation* pWidget, PdfAcroForm* pPare nt ); PdfButton( EPdfField eField, PdfAnnotation* pWidget, PdfAcroForm* pPare nt );
skipping to change at line 646 skipping to change at line 646
// //
// ----------------------------------------------------- // -----------------------------------------------------
inline bool PdfButton::IsRadioButton() const inline bool PdfButton::IsRadioButton() const
{ {
return this->GetFieldFlag( static_cast<int>(ePdfButton_Radio), false ); return this->GetFieldFlag( static_cast<int>(ePdfButton_Radio), false );
} }
/** A push button is a button which has no state and value /** A push button is a button which has no state and value
* but can toggle actions. * but can toggle actions.
*/ */
class PODOFO_API PdfPushButton : public PdfButton { class PODOFO_DOC_API PdfPushButton : public PdfButton {
public: public:
/** Create a new PdfPushButton /** Create a new PdfPushButton
*/ */
PdfPushButton( PdfAnnotation* pWidget, PdfAcroForm* pParent ); PdfPushButton( PdfAnnotation* pWidget, PdfAcroForm* pParent );
/** Create a new PdfPushButton /** Create a new PdfPushButton
*/ */
PdfPushButton( PdfPage* pPage, const PdfRect & rRect, PdfAcroForm* pPar ent ); PdfPushButton( PdfPage* pPage, const PdfRect & rRect, PdfAcroForm* pPar ent );
/** Create a new PdfPushButton /** Create a new PdfPushButton
skipping to change at line 702 skipping to change at line 702
* \returns the rollover caption of this button * \returns the rollover caption of this button
*/ */
const PdfString GetAlternateCaption() const; const PdfString GetAlternateCaption() const;
private: private:
void Init(); void Init();
}; };
/** A checkbox can be checked or unchecked by the user /** A checkbox can be checked or unchecked by the user
*/ */
class PODOFO_API PdfCheckBox : public PdfButton { class PODOFO_DOC_API PdfCheckBox : public PdfButton {
public: public:
/** Create a new PdfCheckBox /** Create a new PdfCheckBox
*/ */
PdfCheckBox( PdfAnnotation* pWidget, PdfAcroForm* pParent ); PdfCheckBox( PdfAnnotation* pWidget, PdfAcroForm* pParent );
/** Create a new PdfCheckBox /** Create a new PdfCheckBox
*/ */
PdfCheckBox( PdfPage* pPage, const PdfRect & rRect, PdfAcroForm* pParen t ); PdfCheckBox( PdfPage* pPage, const PdfRect & rRect, PdfAcroForm* pParen t );
/** Create a new PdfCheckBox /** Create a new PdfCheckBox
skipping to change at line 772 skipping to change at line 772
// TODO: Dominiks PdfRadioButton // TODO: Dominiks PdfRadioButton
/** A textfield in a PDF file. /** A textfield in a PDF file.
* *
* Users can enter text into a text field. * Users can enter text into a text field.
* Single and multi line text is possible, * Single and multi line text is possible,
* as well as richtext. The text can be interpreted * as well as richtext. The text can be interpreted
* as path to a file which is going to be submitted. * as path to a file which is going to be submitted.
*/ */
class PODOFO_API PdfTextField : public PdfField { class PODOFO_DOC_API PdfTextField : public PdfField {
private: private:
enum { ePdfTextField_MultiLine = 0x0001000, enum { ePdfTextField_MultiLine = 0x0001000,
ePdfTextField_Password = 0x0002000, ePdfTextField_Password = 0x0002000,
ePdfTextField_FileSelect = 0x0100000, ePdfTextField_FileSelect = 0x0100000,
ePdfTextField_NoSpellcheck = 0x0400000, ePdfTextField_NoSpellcheck = 0x0400000,
ePdfTextField_NoScroll = 0x0800000, ePdfTextField_NoScroll = 0x0800000,
ePdfTextField_Comb = 0x1000000, ePdfTextField_Comb = 0x1000000,
ePdfTextField_RichText = 0x2000000 ePdfTextField_RichText = 0x2000000
}; };
skipping to change at line 1058 skipping to change at line 1058
return this->GetFieldFlag( static_cast<int>(ePdfTextField_RichText), fa lse ); return this->GetFieldFlag( static_cast<int>(ePdfTextField_RichText), fa lse );
} }
/** A list of items in a PDF file. /** A list of items in a PDF file.
* You cannot create this object directly, use * You cannot create this object directly, use
* PdfComboBox or PdfListBox instead. * PdfComboBox or PdfListBox instead.
* *
* \see PdfComboBox * \see PdfComboBox
* \see PdfListBox * \see PdfListBox
*/ */
class PODOFO_API PdfListField : public PdfField { class PODOFO_DOC_API PdfListField : public PdfField {
protected: protected:
enum { ePdfListField_Combo = 0x0020000, enum { ePdfListField_Combo = 0x0020000,
ePdfListField_Edit = 0x0040000, ePdfListField_Edit = 0x0040000,
ePdfListField_Sort = 0x0080000, ePdfListField_Sort = 0x0080000,
ePdfListField_MultiSelect = 0x0200000, ePdfListField_MultiSelect = 0x0200000,
ePdfListField_NoSpellcheck = 0x0400000, ePdfListField_NoSpellcheck = 0x0400000,
ePdfListField_CommitOnSelChange = 0x4000000 ePdfListField_CommitOnSelChange = 0x4000000
}; };
/** Create a new PdfTextField /** Create a new PdfTextField
skipping to change at line 1115 skipping to change at line 1115
* Removes an item for the list * Removes an item for the list
* *
* @param nIndex index of the item to remove * @param nIndex index of the item to remove
*/ */
void RemoveItem( int nIndex ); void RemoveItem( int nIndex );
/** /**
* @param nIndex index of the item * @param nIndex index of the item
* @returns the value of the item at the specified index * @returns the value of the item at the specified index
*/ */
const PdfString & GetItem( int nIndex ) const; const PdfString GetItem( int nIndex ) const;
/** /**
* @param nIndex index of the item * @param nIndex index of the item
* @returns the display text of the item or if it has no display text * @returns the display text of the item or if it has no display text
* its value is returned. This call is equivalent to GetItem() * its value is returned. This call is equivalent to GetItem()
* in this case * in this case
* *
* \see GetItem * \see GetItem
*/ */
const PdfString & GetItemDisplayText( int nIndex ) const; const PdfString GetItemDisplayText( int nIndex ) const;
/** /**
* \returns the number of items in this list * \returns the number of items in this list
*/ */
size_t GetItemCount() const; size_t GetItemCount() const;
/** Sets the currently selected item /** Sets the currently selected item
* \param nIndex index of the currently selected item * \param nIndex index of the currently selected item
*/ */
void SetSelectedItem( int nIndex ); void SetSelectedItem( int nIndex );
skipping to change at line 1280 skipping to change at line 1280
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
inline bool PdfListField::IsCommitOnSelectionChange() const inline bool PdfListField::IsCommitOnSelectionChange() const
{ {
return this->GetFieldFlag( static_cast<int>(ePdfListField_CommitOnSelCh ange), false ); return this->GetFieldFlag( static_cast<int>(ePdfListField_CommitOnSelCh ange), false );
} }
/** A combo box with a drop down list of items. /** A combo box with a drop down list of items.
*/ */
class PODOFO_API PdfComboBox : public PdfListField { class PODOFO_DOC_API PdfComboBox : public PdfListField {
public: public:
/** Create a new PdfTextField /** Create a new PdfTextField
*/ */
PdfComboBox( PdfAnnotation* pWidget, PdfAcroForm* pParent ); PdfComboBox( PdfAnnotation* pWidget, PdfAcroForm* pParent );
/** Create a new PdfTextField /** Create a new PdfTextField
*/ */
PdfComboBox( PdfPage* pPage, const PdfRect & rRect, PdfAcroForm* pParen t ); PdfComboBox( PdfPage* pPage, const PdfRect & rRect, PdfAcroForm* pParen t );
/** Create a new PdfTextField /** Create a new PdfTextField
skipping to change at line 1340 skipping to change at line 1340
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
inline bool PdfComboBox::IsEditable() const inline bool PdfComboBox::IsEditable() const
{ {
return this->GetFieldFlag( static_cast<int>(ePdfListField_Edit), false ); return this->GetFieldFlag( static_cast<int>(ePdfListField_Edit), false );
} }
/** A list box /** A list box
*/ */
class PODOFO_API PdfListBox : public PdfListField { class PODOFO_DOC_API PdfListBox : public PdfListField {
public: public:
/** Create a new PdfTextField /** Create a new PdfTextField
*/ */
PdfListBox( PdfAnnotation* pWidget, PdfAcroForm* pParent ); PdfListBox( PdfAnnotation* pWidget, PdfAcroForm* pParent );
/** Create a new PdfTextField /** Create a new PdfTextField
*/ */
PdfListBox( PdfPage* pPage, const PdfRect & rRect, PdfAcroForm* pParent ); PdfListBox( PdfPage* pPage, const PdfRect & rRect, PdfAcroForm* pParent );
/** Create a new PdfTextField /** Create a new PdfTextField
 End of changes. 12 change blocks. 
13 lines changed or deleted 13 lines changed or added


 PdfFileSpec.h   PdfFileSpec.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FILE_SPEC_H_ #ifndef _PDF_FILE_SPEC_H_
#define _PDF_FILE_SPEC_H_ #define _PDF_FILE_SPEC_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfElement.h" #include "podofo/base/PdfString.h"
#include "PdfString.h" #include "PdfElement.h"
namespace PoDoFo { namespace PoDoFo {
class PdfDocument; class PdfDocument;
/** /**
* A file specification is used in the PDF file to referr to another file. * A file specification is used in the PDF file to referr to another file.
* The other file can be a file outside of the PDF or can be embedded into * The other file can be a file outside of the PDF or can be embedded into
* the PDF file itself. * the PDF file itself.
*/ */
class PODOFO_API PdfFileSpec : public PdfElement { class PODOFO_DOC_API PdfFileSpec : public PdfElement {
public: public:
PdfFileSpec( const char* pszFilename, bool bEmbedd, PdfDocument* pParen t ); PdfFileSpec( const char* pszFilename, bool bEmbedd, PdfDocument* pParen t );
PdfFileSpec( const char* pszFilename, bool bEmbedd, PdfVecObjects* pPar ent ); PdfFileSpec( const char* pszFilename, bool bEmbedd, PdfVecObjects* pPar ent );
/* Petr P. Petrov 17 September 2009*/ /* Petr P. Petrov 17 September 2009*/
/** Embeds the file in memory from "data" buffer under "pszFileName" fi e name. /** Embeds the file in memory from "data" buffer under "pszFileName" fi e name.
*/ */
PdfFileSpec( const char* pszFilename, const unsigned char* data, ptrdif f_t size, PdfVecObjects* pParent); PdfFileSpec( const char* pszFilename, const unsigned char* data, ptrdif f_t size, PdfVecObjects* pParent);
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 PdfFilter.h   PdfFilter.h 
skipping to change at line 475 skipping to change at line 475
* *
* \returns a new PdfOutputStream that has to be deleted by the caller . * \returns a new PdfOutputStream that has to be deleted by the caller .
* *
* \see PdfFilterFactory::CreateFilterList * \see PdfFilterFactory::CreateFilterList
*/ */
static PdfOutputStream* CreateDecodeStream( const TVecFilters & filters , PdfOutputStream* pStream, static PdfOutputStream* CreateDecodeStream( const TVecFilters & filters , PdfOutputStream* pStream,
const PdfDictionary* pDicti onary = NULL ); const PdfDictionary* pDicti onary = NULL );
/** Converts a filter name to the corresponding enum /** Converts a filter name to the corresponding enum
* \param name of the filter without leading * \param name of the filter without leading
* \param bSupportShortNames the PDF Reference supports several
* short names for filters (e.g. AHx for AsciiHexDecode), if tr
ue
* support for these short names will be enabled.
* This is often used in inline images.
* \returns the filter as enum * \returns the filter as enum
*/ */
static EPdfFilter FilterNameToType( const PdfName & name ); static EPdfFilter FilterNameToType( const PdfName & name, bool bSupport ShortNames = true );
/** Converts a filter type enum to the corresponding PdfName /** Converts a filter type enum to the corresponding PdfName
* \param eFilter a filter type * \param eFilter a filter type
* \returns the filter as name * \returns the filter as name
*/ */
static const char* FilterTypeToName( EPdfFilter eFilter ); static const char* FilterTypeToName( EPdfFilter eFilter );
/** The passed PdfObject has to be a dictionary with a Filters key, /** The passed PdfObject has to be a dictionary with a Filters key,
* an array of filter names or a filter name. * an array of filter names or a filter name.
* *
 End of changes. 2 change blocks. 
1 lines changed or deleted 6 lines changed or added


 PdfFiltersPrivate.h   PdfFiltersPrivate.h 
skipping to change at line 689 skipping to change at line 689
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
EPdfFilter PdfLZWFilter::GetType() const EPdfFilter PdfLZWFilter::GetType() const
{ {
return ePdfFilter_LZWDecode; return ePdfFilter_LZWDecode;
} }
#ifdef PODOFO_HAVE_JPEG_LIB #ifdef PODOFO_HAVE_JPEG_LIB
void PODOFO_API jpeg_memory_src (j_decompress_ptr cinfo, const JOCTET * buf
fer, size_t bufsize);
/** The DCT filter can decoded JPEG compressed data. /** The DCT filter can decoded JPEG compressed data.
* *
* This filter requires JPEG lib to be available * This filter requires JPEG lib to be available
*/ */
class PdfDCTFilter : public PdfFilter { class PdfDCTFilter : public PdfFilter {
public: public:
PdfDCTFilter(); PdfDCTFilter();
virtual ~PdfDCTFilter(); virtual ~PdfDCTFilter();
 End of changes. 1 change blocks. 
0 lines changed or deleted 4 lines changed or added


 PdfFont.h   PdfFont.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FONT_H_ #ifndef _PDF_FONT_H_
#define _PDF_FONT_H_ #define _PDF_FONT_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfName.h" #include "podofo/base/PdfName.h"
#include "podofo/base/PdfEncodingFactory.h"
#include "PdfElement.h" #include "PdfElement.h"
#include "PdfEncodingFactory.h"
#include "PdfFontMetrics.h" #include "PdfFontMetrics.h"
namespace PoDoFo { namespace PoDoFo {
class PdfObject; class PdfObject;
class PdfPage; class PdfPage;
class PdfWriter; class PdfWriter;
/** Before you can draw text on a PDF document, you have to create /** Before you can draw text on a PDF document, you have to create
* a font object first. You can reuse this font object as often * a font object first. You can reuse this font object as often
* as you want. * as you want.
* *
* Use PdfDocument::CreateFont to create a new font object. * Use PdfDocument::CreateFont to create a new font object.
* It will choose a correct subclass using PdfFontFactory. * It will choose a correct subclass using PdfFontFactory.
* *
* This is only an abstract base class which is implemented * This is only an abstract base class which is implemented
* for different font formats. * for different font formats.
*/ */
class PODOFO_API PdfFont : public PdfElement { class PODOFO_DOC_API PdfFont : public PdfElement {
friend class PdfFontFactory; friend class PdfFontFactory;
public: public:
/** Create a new PdfFont object which will introduce itself /** Create a new PdfFont object which will introduce itself
* automatically to every page object it is used on. * automatically to every page object it is used on.
* *
* The font has a default font size of 12.0pt. * The font has a default font size of 12.0pt.
* *
* \param pMetrics pointer to a font metrics object. The font in the P DF * \param pMetrics pointer to a font metrics object. The font in the P DF
skipping to change at line 188 skipping to change at line 188
// Peter Petrov 24 September 2008 // Peter Petrov 24 September 2008
/** Embeds the font into PDF page /** Embeds the font into PDF page
* *
*/ */
virtual void EmbedFont(); virtual void EmbedFont();
/** Remember the glyphs used in the string in case of subsetting /** Remember the glyphs used in the string in case of subsetting
* *
* \param sText the text string which should be printed (is not allowe d to be NULL!) * \param sText the text string which should be printed (is not allowe d to be NULL!)
* \param lLen draw only lLen characters of pszText * \param lStringLen draw only lLen characters of pszText
* *
* Only call if IsSubsetting() returns true. Might throw an exception otherwise. * Only call if IsSubsetting() returns true. Might throw an exception otherwise.
* *
* \see IsSubsetting * \see IsSubsetting
*/ */
virtual void AddUsedSubsettingGlyphs( const PdfString & sText, long lStringLen ); virtual void AddUsedSubsettingGlyphs( const PdfString & sText, long lStringLen );
/** Remember the glyphname in case of subsetting
*
* \param pszGlyphName Name of the glyph to remember
*/
virtual void AddUsedGlyphname( const char * pszGlyphName );
/** Embeds pending subset-font into PDF page /** Embeds pending subset-font into PDF page
* Only call if IsSubsetting() returns true. Might throw an exception otherwise. * Only call if IsSubsetting() returns true. Might throw an exception otherwise.
* *
* \see IsSubsetting * \see IsSubsetting
*/ */
virtual void EmbedSubsetFont(); virtual void EmbedSubsetFont();
/** Check if this is a subsetting font. /** Check if this is a subsetting font.
* \returns true if this is a subsetting font * \returns true if this is a subsetting font
*/ */
 End of changes. 5 change blocks. 
5 lines changed or deleted 11 lines changed or added


 PdfFontCID.h   PdfFontCID.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FONT_CID_H_ #ifndef _PDF_FONT_CID_H_
#define _PDF_FONT_CID_H_ #define _PDF_FONT_CID_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfFont.h" #include "PdfFont.h"
namespace PoDoFo { namespace PoDoFo {
class PdfFontMetricsFreetype; class PdfFontMetricsFreetype;
/** A PdfFont that represents a CID font. /** A PdfFont that represents a CID font.
*/ */
class PdfFontCID : public PdfFont { class PdfFontCID : public PdfFont {
public: public:
skipping to change at line 56 skipping to change at line 56
PdfFontCID( PdfFontMetrics* pMetrics, const PdfEncoding* const pEncodin g, PdfFontCID( PdfFontMetrics* pMetrics, const PdfEncoding* const pEncodin g,
PdfVecObjects* pParent, bool bEmbed = true ); PdfVecObjects* pParent, bool bEmbed = true );
// Peter Petrov 30 April 2008 // Peter Petrov 30 April 2008
/** Create a PdfFont based on an existing PdfObject /** Create a PdfFont based on an existing PdfObject
* \param pMetrics pointer to a font metrics object. The font in the P DF * \param pMetrics pointer to a font metrics object. The font in the P DF
* file will match this fontmetrics object. The metrics object is * file will match this fontmetrics object. The metrics object is
* deleted along with the font. * deleted along with the font.
* \param pEncoding the encoding of this font. The font will not take ownership of this object. * \param pEncoding the encoding of this font. The font will not take ownership of this object.
* \param pObject an existing PdfObject * \param pObject an existing PdfObject
* \param bEmbed specifies the embedding of font
*/ */
PdfFontCID( PdfFontMetrics* pMetrics, const PdfEncoding* const pEncodin g, PdfObject* pObject, bool bEmbed ); PdfFontCID( PdfFontMetrics* pMetrics, const PdfEncoding* const pEncodin g, PdfObject* pObject, bool bEmbed );
// Peter Petrov 24 September 2008 // Peter Petrov 24 September 2008
/** Embeds the font into PDF page /** Embeds the font into PDF page
* *
*/ */
virtual void EmbedFont(); virtual void EmbedFont();
private: private:
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 PdfFontCache.h   PdfFontCache.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FONT_CACHE_H_ #ifndef _PDF_FONT_CACHE_H_
#define _PDF_FONT_CACHE_H_ #define _PDF_FONT_CACHE_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "Pdf3rdPtyForwardDecl.h" #include "podofo/base/Pdf3rdPtyForwardDecl.h"
#include "PdfEncoding.h" #include "podofo/base/PdfEncoding.h"
#include "PdfEncodingFactory.h" #include "podofo/base/PdfEncodingFactory.h"
#include "podofo/base/util/PdfMutex.h"
#include "PdfFont.h" #include "PdfFont.h"
#include "util/PdfMutex.h"
namespace PoDoFo { namespace PoDoFo {
class PdfFontMetrics; class PdfFontMetrics;
class PdfVecObjects; class PdfVecObjects;
/** A private structure, /** A private structure,
* which represents a font in the cache. * which represents a font in the cache.
*/ */
struct TFontCacheElement { struct TFontCacheElement {
skipping to change at line 127 skipping to change at line 127
* *
* PdfFont is an actual font that can be used in * PdfFont is an actual font that can be used in
* a PDF file (i.e. it does also font embedding) * a PDF file (i.e. it does also font embedding)
* and PdfFontMetrics provides only metrics informations. * and PdfFontMetrics provides only metrics informations.
* *
* This class is an internal class of PoDoFo * This class is an internal class of PoDoFo
* and should not be used in user applications * and should not be used in user applications
* *
* \see PdfDocument * \see PdfDocument
*/ */
class PODOFO_API PdfFontCache { class PODOFO_DOC_API PdfFontCache {
typedef std::vector<TFontCacheElement> TSortedFontList; typedef std::vector<TFontCacheElement> TSortedFontList;
typedef TSortedFontList::iterator TISortedFontList; typedef TSortedFontList::iterator TISortedFontList;
typedef TSortedFontList::const_iterator TCISortedFontList; typedef TSortedFontList::const_iterator TCISortedFontList;
#if defined(PODOFO_HAVE_FONTCONFIG) #if defined(PODOFO_HAVE_FONTCONFIG)
static Util::PdfMutex m_FcMutex; static Util::PdfMutex m_FcMutex;
#endif #endif
public: public:
/**
* Flags to control font creation.
*/
enum EFontCreationFlags { enum EFontCreationFlags {
eFontCreationFlags_None = 0, ///< No spec ial settings eFontCreationFlags_None = 0, ///< No spec ial settings
eFontCreationFlags_AutoSelectBase14 = 1, ///< Create automati cally a base14 font if the fontname matches one of them eFontCreationFlags_AutoSelectBase14 = 1, ///< Create automati cally a base14 font if the fontname matches one of them
eFontCreationFlags_Type1Subsetting = 2 ///< Create subsette d type1-font, which includes only used characters eFontCreationFlags_Type1Subsetting = 2 ///< Create subsette d type1-font, which includes only used characters
}; };
/** Create an empty font cache /** Create an empty font cache
* *
* \param pParent a PdfVecObjects which is required * \param pParent a PdfVecObjects which is required
* to create new font objects * to create new font objects
skipping to change at line 182 skipping to change at line 186
/** Get a font from the cache. If the font does not yet /** Get a font from the cache. If the font does not yet
* exist, add it to the cache. * exist, add it to the cache.
* *
* \param pszFontName a valid fontname * \param pszFontName a valid fontname
* \param bBold if true search for a bold font * \param bBold if true search for a bold font
* \param bItalic if true search for an italic font * \param bItalic if true search for an italic font
* \param bEmbedd if true a font for embedding into * \param bEmbedd if true a font for embedding into
* PDF will be created * PDF will be created
* \param eFontCreationFlags special flag to specify how fonts should be created * \param eFontCreationFlags special flag to specify how fonts should be created
* \param pEncoding the encoding of the font. The font will not take o wnership of this object. * \param pEncoding the encoding of the font. The font will not take o wnership of this object.
* \param optional: pszFileName path to a valid font file * \param pszFileName optional path to a valid font file
* *
* \returns a PdfFont object or NULL if the font could * \returns a PdfFont object or NULL if the font could
* not be created or found. * not be created or found.
*/ */
PdfFont* GetFont( const char* pszFontName, bool bBold, bool bItalic, PdfFont* GetFont( const char* pszFontName, bool bBold, bool bItalic,
bool bEmbedd, EFontCreationFlags eFontCreationFlags = eFontCreationFlags_AutoSelectBase14, bool bEmbedd, EFontCreationFlags eFontCreationFlags = eFontCreationFlags_AutoSelectBase14,
const PdfEncoding * const = PdfEncodingFactory::Globa lWinAnsiEncodingInstance(), const PdfEncoding * const = PdfEncodingFactory::Globa lWinAnsiEncodingInstance(),
const char* pszFileName = NULL ); const char* pszFileName = NULL );
#ifdef _WIN32 #ifdef _WIN32
skipping to change at line 236 skipping to change at line 240
/** Get a font with specific id from the cache. If the font does not ye t /** Get a font with specific id from the cache. If the font does not ye t
* exist, copy from existing type1-font and set id. * exist, copy from existing type1-font and set id.
* *
* \param pFont an existing font * \param pFont an existing font
* \param pszSuffix Suffix to add to font-id * \param pszSuffix Suffix to add to font-id
* *
* \returns a PdfFont object or NULL if the font could * \returns a PdfFont object or NULL if the font could
* not be created or found. * not be created or found.
*/ */
PdfFont* GetDuplicateFontType1( PdfFont * pFont, const char* pszSuff ix ); PdfFont* GetDuplicateFontType1( PdfFont* pFont, const char* pszSuffi x );
/** Get a fontsubset from the cache. If the font does not yet /** Get a fontsubset from the cache. If the font does not yet
* exist, add it to the cache. * exist, add it to the cache.
* *
* \param pszFontName a valid fontname * \param pszFontName a valid fontname
* \param bBold if true search for a bold font * \param bBold if true search for a bold font
* \param bItalic if true search for an italic font * \param bItalic if true search for an italic font
* \param pEncoding the encoding of the font. All characters * \param pEncoding the encoding of the font. All characters
* of the encoding will be included in this subset. * of the encoding will be included in this subset.
* The font will not take ownership of this object. * The font will not take ownership of this object.
* \param optional: pszFileName path to a valid font file * \param pszFileName optional path to a valid font file
* *
* \returns a PdfFont object or NULL if the font could * \returns a PdfFont object or NULL if the font could
* not be created or found. * not be created or found.
*/ */
PdfFont* GetFontSubset( const char* pszFontName, bool bBold, bool bItal ic, PdfFont* GetFontSubset( const char* pszFontName, bool bBold, bool bItal ic,
const PdfEncoding * const = PdfEncodingFactory:: GlobalWinAnsiEncodingInstance(), const PdfEncoding * const = PdfEncodingFactory:: GlobalWinAnsiEncodingInstance(),
const char* pszFileName = NULL); const char* pszFileName = NULL);
/** Embeds all pending subset-fonts /** Embeds all pending subset-fonts
* *
 End of changes. 7 change blocks. 
9 lines changed or deleted 13 lines changed or added


 PdfFontFactory.h   PdfFontFactory.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FONT_FACTORY_H_ #ifndef _PDF_FONT_FACTORY_H_
#define _PDF_FONT_FACTORY_H_ #define _PDF_FONT_FACTORY_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfFont.h" #include "PdfFont.h"
namespace PoDoFo { namespace PoDoFo {
class PdfFontMetrics; class PdfFontMetrics;
class PdfVecObjects; class PdfVecObjects;
enum EPdfFontFlags { enum EPdfFontFlags {
ePdfFont_Normal = 0x00, ePdfFont_Normal = 0x00,
ePdfFont_Embedded = 0x01, ePdfFont_Embedded = 0x01,
ePdfFont_Bold = 0x02, ePdfFont_Bold = 0x02,
ePdfFont_Italic = 0x04, ePdfFont_Italic = 0x04,
ePdfFont_BoldItalic = ePdfFont_Bold | ePdfFont_Italic, ePdfFont_BoldItalic = ePdfFont_Bold | ePdfFont_Italic,
ePdfFont_Subsetting = 0x08 ePdfFont_Subsetting = 0x08
}; };
/** This is a factory class which knows /** This is a factory class which knows
* which implementation of PdfFont is required * which implementation of PdfFont is required
* for a certain font type with certain features (like encoding). * for a certain font type with certain features (like encoding).
*/ */
class PODOFO_API PdfFontFactory { class PODOFO_DOC_API PdfFontFactory {
public: public:
/** Create a new PdfFont object. /** Create a new PdfFont object.
* *
* \param pMetrics pointer to a font metrics object. The font in the P DF * \param pMetrics pointer to a font metrics object. The font in the P DF
* file will match this fontmetrics object. The metrics object is * file will match this fontmetrics object. The metrics object is
* deleted along with the created font. In case of an error, it is deleted * deleted along with the created font. In case of an error, it is deleted
* here. * here.
* \param nFlags font flags or'ed together, specifying the font style and if it should be embedded * \param nFlags font flags or'ed together, specifying the font style and if it should be embedded
* \param pEncoding the encoding of this font. * \param pEncoding the encoding of this font.
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 PdfFontFactoryBase14Data.h   PdfFontFactoryBase14Data.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FONT_FACTORY_BASE14_DATA_H_ #ifndef _PDF_FONT_FACTORY_BASE14_DATA_H_
#define _PDF_FONT_FACTORY_BASE14_DATA_H_ #define _PDF_FONT_FACTORY_BASE14_DATA_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "podofo/base/PdfRect.h"
#include "PdfFontMetricsBase14.h" #include "PdfFontMetricsBase14.h"
#include "PdfRect.h"
/* /*
* The following are the Base 14 fonts data copied from libharu. * The following are the Base 14 fonts data copied from libharu.
* - kaushik April 12 2010 * - kaushik April 12 2010
*/ */
namespace PoDoFo { namespace PoDoFo {
struct PODOFO_CharData { struct PODOFO_CharData {
pdf_int16 char_cd; pdf_int16 char_cd;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 PdfFontMetrics.h   PdfFontMetrics.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FONT_METRICS_H_ #ifndef _PDF_FONT_METRICS_H_
#define _PDF_FONT_METRICS_H_ #define _PDF_FONT_METRICS_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "Pdf3rdPtyForwardDecl.h" #include "podofo/base/Pdf3rdPtyForwardDecl.h"
#include "PdfString.h" #include "podofo/base/PdfString.h"
namespace PoDoFo { namespace PoDoFo {
class PdfArray; class PdfArray;
class PdfObject; class PdfObject;
class PdfVariant; class PdfVariant;
/** /**
* This abstract class provides access * This abstract class provides access
* to fontmetrics informations. * to fontmetrics informations.
*/ */
class PODOFO_API PdfFontMetrics { class PODOFO_DOC_API PdfFontMetrics {
public: public:
PdfFontMetrics( EPdfFontType eFontType, const char* pszFilename, const char* pszSubsetPrefix ); PdfFontMetrics( EPdfFontType eFontType, const char* pszFilename, const char* pszSubsetPrefix );
virtual ~PdfFontMetrics(); virtual ~PdfFontMetrics();
/** Create a width array for this font which is a required part /** Create a width array for this font which is a required part
* of every font dictionary. * of every font dictionary.
* \param var the final width array is written to this PdfVariant * \param var the final width array is written to this PdfVariant
* \param nFirst first character to be in the array * \param nFirst first character to be in the array
* \param nLast last character code to be in the array * \param nLast last character code to be in the array
*/ */
virtual void GetWidthArray( PdfVariant & var, unsigned int nFirst, unsi gned int nLast ) const = 0; virtual void GetWidthArray( PdfVariant & var, unsigned int nFirst, unsi gned int nLast ) const = 0;
/** Get the width of a single glyph id /** Get the width of a single glyph id
* *
* \param nGlyphId id of the glyph
* \returns the width of a single glyph id * \returns the width of a single glyph id
*/ */
virtual double GetGlyphWidth( int nGlyphId ) const = 0; virtual double GetGlyphWidth( int nGlyphId ) const = 0;
/** Get the width of a single named glyph
*
* \param pszGlyphname name of the glyph
* \returns the width of a single named glyph
*/
virtual double GetGlyphWidth( const char* pszGlyphname ) const = 0;
/** Create the bounding box array as required by the PDF reference /** Create the bounding box array as required by the PDF reference
* so that it can be written directly to a PDF file. * so that it can be written directly to a PDF file.
* *
* \param array write the bounding box to this array. * \param array write the bounding box to this array.
*/ */
virtual void GetBoundingBox( PdfArray & array ) const = 0; virtual void GetBoundingBox( PdfArray & array ) const = 0;
/** Retrieve the width of a given text string in PDF units when /** Retrieve the width of a given text string in PDF units when
* drawn with the current font * drawn with the current font
* \param rsString a PdfString from which the width shall be calculate d * \param rsString a PdfString from which the width shall be calculate d
 End of changes. 4 change blocks. 
4 lines changed or deleted 12 lines changed or added


 PdfFontMetricsBase14.h   PdfFontMetricsBase14.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FONT_METRICS_BASE14_H_ #ifndef _PDF_FONT_METRICS_BASE14_H_
#define _PDF_FONT_METRICS_BASE14_H_ #define _PDF_FONT_METRICS_BASE14_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "podofo/base/PdfRect.h"
#include "podofo/base/PdfVariant.h"
#include "PdfFontMetrics.h" #include "PdfFontMetrics.h"
#include "PdfRect.h"
#include "PdfVariant.h"
#include <string.h> #include <string.h>
/* /*
The following are the Base 14 fonts data copied from libharu. The following are the Base 14 fonts data copied from libharu.
- kaushik April 12 2010 - kaushik April 12 2010
*/ */
namespace PoDoFo { namespace PoDoFo {
skipping to change at line 58 skipping to change at line 58
This is done to ensure all existing paths work as is. This is done to ensure all existing paths work as is.
The changes to Base 14 get added without affecting the existing workflow and fit in exactly. The changes to Base 14 get added without affecting the existing workflow and fit in exactly.
Ideally PdfFontMetrics should be abstract or the metric related interfac e should be seperated out Ideally PdfFontMetrics should be abstract or the metric related interfac e should be seperated out
from the implementation details - such as whether the font metric data i s read from a file/buffer/hard coded. from the implementation details - such as whether the font metric data i s read from a file/buffer/hard coded.
Kaushik : April 12th 2010 Kaushik : April 12th 2010
*/ */
class PODOFO_API PdfFontMetricsBase14 : public PdfFontMetrics { class PODOFO_DOC_API PdfFontMetricsBase14 : public PdfFontMetrics {
public: public:
PdfFontMetricsBase14(const char *mfont_name, PdfFontMetricsBase14(const char *mfont_name,
const PODOFO_CharData *mwidths_table, const PODOFO_CharData *mwidths_table,
bool mis_font_specific, bool mis_font_specific,
pdf_int16 mascent, pdf_int16 mascent,
pdf_int16 mdescent, pdf_int16 mdescent,
pdf_uint16 mx_height, pdf_uint16 mx_height,
pdf_uint16 mcap_height, pdf_uint16 mcap_height,
const PdfRect & mbbox); const PdfRect & mbbox);
skipping to change at line 88 skipping to change at line 88
* \param nLast last character code to be in the array * \param nLast last character code to be in the array
*/ */
virtual void GetWidthArray( PdfVariant & var, unsigned int nFirst, unsi gned int nLast ) const; virtual void GetWidthArray( PdfVariant & var, unsigned int nFirst, unsi gned int nLast ) const;
/** Get the width of a single glyph id /** Get the width of a single glyph id
* *
* \returns the width of a single glyph id * \returns the width of a single glyph id
*/ */
virtual double GetGlyphWidth( int nGlyphId ) const; virtual double GetGlyphWidth( int nGlyphId ) const;
/** Get the width of a single named glyph
*
* \param pszGlyphname name of the glyph
* \returns the width of a single named glyph
*/
virtual double GetGlyphWidth( const char* pszGlyphname ) const;
/** Create the bounding box array as required by the PDF reference /** Create the bounding box array as required by the PDF reference
* so that it can be written directly to a PDF file. * so that it can be written directly to a PDF file.
* *
* \param array write the bounding box to this array. * \param array write the bounding box to this array.
*/ */
virtual void GetBoundingBox( PdfArray & array ) const; virtual void GetBoundingBox( PdfArray & array ) const;
/** Retrieve the width of the given character in PDF units in the curre nt font /** Retrieve the width of the given character in PDF units in the curre nt font
* \param c character * \param c character
* \returns the width in PDF units * \returns the width in PDF units
 End of changes. 4 change blocks. 
4 lines changed or deleted 11 lines changed or added


 PdfFontMetricsFreetype.h   PdfFontMetricsFreetype.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FONT_METRICS_FREETYPE_H_ #ifndef _PDF_FONT_METRICS_FREETYPE_H_
#define _PDF_FONT_METRICS_FREETYPE_H_ #define _PDF_FONT_METRICS_FREETYPE_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "Pdf3rdPtyForwardDecl.h" #include "podofo/base/Pdf3rdPtyForwardDecl.h"
#include "podofo/base/PdfString.h"
#include "PdfFontMetrics.h" #include "PdfFontMetrics.h"
#include "PdfString.h"
namespace PoDoFo { namespace PoDoFo {
class PdfArray; class PdfArray;
class PdfObject; class PdfObject;
class PdfVariant; class PdfVariant;
class PODOFO_API PdfFontMetricsFreetype : public PdfFontMetrics { class PODOFO_DOC_API PdfFontMetricsFreetype : public PdfFontMetrics {
public: public:
/** Create a font metrics object for a given true type file /** Create a font metrics object for a given true type file
* \param pLibrary handle to an initialized FreeType2 library handle * \param pLibrary handle to an initialized FreeType2 library handle
* \param pszFilename filename of a truetype file * \param pszFilename filename of a truetype file
* \param pszSubsetPrefix unique prefix for font subsets (see GetFontS ubsetPrefix) * \param pszSubsetPrefix unique prefix for font subsets (see GetFontS ubsetPrefix)
*/ */
PdfFontMetricsFreetype( FT_Library* pLibrary, const char* pszFilename, PdfFontMetricsFreetype( FT_Library* pLibrary, const char* pszFilename,
const char* pszSubsetPrefix = NULL ); const char* pszSubsetPrefix = NULL );
/** Create a font metrics object for a given memory buffer /** Create a font metrics object for a given memory buffer
skipping to change at line 89 skipping to change at line 89
/** Create a width array for this font which is a required part /** Create a width array for this font which is a required part
* of every font dictionary. * of every font dictionary.
* \param var the final width array is written to this PdfVariant * \param var the final width array is written to this PdfVariant
* \param nFirst first character to be in the array * \param nFirst first character to be in the array
* \param nLast last character code to be in the array * \param nLast last character code to be in the array
*/ */
virtual void GetWidthArray( PdfVariant & var, unsigned int nFirst, unsi gned int nLast ) const; virtual void GetWidthArray( PdfVariant & var, unsigned int nFirst, unsi gned int nLast ) const;
/** Get the width of a single glyph id /** Get the width of a single glyph id
* *
* \param nGlyphId id of the glyph
* \returns the width of a single glyph id * \returns the width of a single glyph id
*/ */
virtual double GetGlyphWidth( int nGlyphId ) const; virtual double GetGlyphWidth( int nGlyphId ) const;
/** Get the width of a single named glyph
*
* \param pszGlyphname name of the glyph
* \returns the width of a single named glyph
*/
virtual double GetGlyphWidth( const char* pszGlyphname ) const;
/** Create the bounding box array as required by the PDF reference /** Create the bounding box array as required by the PDF reference
* so that it can be written directly to a PDF file. * so that it can be written directly to a PDF file.
* *
* \param array write the bounding box to this array. * \param array write the bounding box to this array.
*/ */
virtual void GetBoundingBox( PdfArray & array ) const; virtual void GetBoundingBox( PdfArray & array ) const;
/** Retrieve the width of the given character in PDF units in the curre nt font /** Retrieve the width of the given character in PDF units in the curre nt font
* \param c character * \param c character
* \returns the width in PDF units * \returns the width in PDF units
 End of changes. 5 change blocks. 
4 lines changed or deleted 12 lines changed or added


 PdfFontMetricsObject.h   PdfFontMetricsObject.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FONT_METRICS_OBJECT_H_ #ifndef _PDF_FONT_METRICS_OBJECT_H_
#define _PDF_FONT_METRICS_OBJECT_H_ #define _PDF_FONT_METRICS_OBJECT_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfArray.h" #include "podofo/base/PdfArray.h"
#include "podofo/base/PdfName.h"
#include "podofo/base/PdfString.h"
#include "PdfFontMetrics.h" #include "PdfFontMetrics.h"
#include "PdfName.h"
#include "PdfString.h"
namespace PoDoFo { namespace PoDoFo {
class PdfArray; class PdfArray;
class PdfObject; class PdfObject;
class PdfVariant; class PdfVariant;
class PODOFO_API PdfFontMetricsObject : public PdfFontMetrics { class PODOFO_DOC_API PdfFontMetricsObject : public PdfFontMetrics {
public: public:
/** Create a font metrics object based on an existing PdfObject /** Create a font metrics object based on an existing PdfObject
* *
* \param pObject an existing font descriptor object * \param pObject an existing font descriptor object
* \param pEncoding a PdfEncoding which will NOT be owned by PdfFontMe tricsObject * \param pEncoding a PdfEncoding which will NOT be owned by PdfFontMe tricsObject
*/ */
PdfFontMetricsObject( PdfObject* pFont, PdfObject* pDescriptor, const P dfEncoding* const pEncoding ); PdfFontMetricsObject( PdfObject* pFont, PdfObject* pDescriptor, const P dfEncoding* const pEncoding );
virtual ~PdfFontMetricsObject(); virtual ~PdfFontMetricsObject();
skipping to change at line 62 skipping to change at line 62
* \param nLast last character code to be in the array * \param nLast last character code to be in the array
*/ */
virtual void GetWidthArray( PdfVariant & var, unsigned int nFirst, unsi gned int nLast ) const; virtual void GetWidthArray( PdfVariant & var, unsigned int nFirst, unsi gned int nLast ) const;
/** Get the width of a single glyph id /** Get the width of a single glyph id
* *
* \returns the width of a single glyph id * \returns the width of a single glyph id
*/ */
virtual double GetGlyphWidth( int nGlyphId ) const; virtual double GetGlyphWidth( int nGlyphId ) const;
/** Get the width of a single named glyph
*
* \param pszGlyphname name of the glyph
* \returns the width of a single named glyph
*/
virtual double GetGlyphWidth( const char* pszGlyphname ) const;
/** Create the bounding box array as required by the PDF reference /** Create the bounding box array as required by the PDF reference
* so that it can be written directly to a PDF file. * so that it can be written directly to a PDF file.
* *
* \param array write the bounding box to this array. * \param array write the bounding box to this array.
*/ */
virtual void GetBoundingBox( PdfArray & array ) const; virtual void GetBoundingBox( PdfArray & array ) const;
/** Retrieve the width of the given character in PDF units in the curre nt font /** Retrieve the width of the given character in PDF units in the curre nt font
* \param c character * \param c character
* \returns the width in PDF units * \returns the width in PDF units
skipping to change at line 208 skipping to change at line 215
*/ */
PdfFontMetricsObject& operator=(const PdfFontMetricsObject& rhs); PdfFontMetricsObject& operator=(const PdfFontMetricsObject& rhs);
//Private members: //Private members:
const PdfEncoding* const m_pEncoding; const PdfEncoding* const m_pEncoding;
PdfName m_sName; PdfName m_sName;
PdfArray m_bbox; PdfArray m_bbox;
PdfArray m_width; PdfArray m_width;
PdfObject *m_missingWidth;
int m_nFirst; int m_nFirst;
int m_nLast; int m_nLast;
unsigned int m_nWeight; unsigned int m_nWeight;
int m_nItalicAngle; int m_nItalicAngle;
double m_dPdfAscent; double m_dPdfAscent;
double m_dPdfDescent; double m_dPdfDescent;
double m_dAscent; double m_dAscent;
double m_dDescent; double m_dDescent;
double m_dLineSpacing; double m_dLineSpacing;
 End of changes. 5 change blocks. 
5 lines changed or deleted 13 lines changed or added


 PdfFontSimple.h   PdfFontSimple.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FONT_SIMPLE_H_ #ifndef _PDF_FONT_SIMPLE_H_
#define _PDF_FONT_SIMPLE_H_ #define _PDF_FONT_SIMPLE_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfFont.h" #include "PdfFont.h"
namespace PoDoFo { namespace PoDoFo {
/** This is a common base class for simple fonts /** This is a common base class for simple fonts
* like truetype or type1 fonts. * like truetype or type1 fonts.
*/ */
class PdfFontSimple : public PdfFont { class PdfFontSimple : public PdfFont {
public: public:
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 PdfFontTTFSubset.h   PdfFontTTFSubset.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FONT_TTF_SUBSET_H_ #ifndef _PDF_FONT_TTF_SUBSET_H_
#define _PDF_FONT_TTF_SUBSET_H_ #define _PDF_FONT_TTF_SUBSET_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfFontMetrics.h" #include "PdfFontMetrics.h"
#include <string> #include <string>
#include <vector> #include <vector>
namespace PoDoFo { namespace PoDoFo {
class PdfInputDevice; class PdfInputDevice;
class PdfOutputDevice; class PdfOutputDevice;
skipping to change at line 46 skipping to change at line 46
// (张杨.国际) <zhang_yang@founder.com> // (张杨.国际) <zhang_yang@founder.com>
// //
// (Do not put this into doxygen documentation blocks // (Do not put this into doxygen documentation blocks
// as this will break latex documentation generation) // as this will break latex documentation generation)
/** /**
* This class is able to build a new TTF font with only * This class is able to build a new TTF font with only
* certain glyphs from an existing font. * certain glyphs from an existing font.
* *
*/ */
class PODOFO_API PdfFontTTFSubset { class PODOFO_DOC_API PdfFontTTFSubset {
public: public:
/**
* Internal enum specifying the type of a fontfile.
*/
enum EFontFileType { enum EFontFileType {
eFontFileType_TTF, ///< TrueType Font eFontFileType_TTF, ///< TrueType Font
eFontFileType_TTC, ///< TrueType Collection eFontFileType_TTC, ///< TrueType Collection
eFontFileType_OTF, ///< OpenType Font eFontFileType_OTF, ///< OpenType Font
eFontFileType_Unknown ///< Unknown eFontFileType_Unknown ///< Unknown
}; };
/** Create a new PdfFontTTFSubset from an existing /** Create a new PdfFontTTFSubset from an existing
* TTF font file. * TTF font file.
* *
* @param pszFontFileName path to a TTF file * @param pszFontFileName path to a TTF file
* @param pMetrics font metrics object for this font * @param pMetrics font metrics object for this font
* @param nFaceIndex index of the face inside of the font * @param nFaceIndex index of the face inside of the font
*/ */
PdfFontTTFSubset( const char* pszFontFileName, PdfFontMetrics* pMetrics , unsigned short nFaceIndex = 0 ); PdfFontTTFSubset( const char* pszFontFileName, PdfFontMetrics* pMetrics , unsigned short nFaceIndex = 0 );
 End of changes. 4 change blocks. 
6 lines changed or deleted 9 lines changed or added


 PdfFontTrueType.h   PdfFontTrueType.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FONT_TRUE_TYPE_H_ #ifndef _PDF_FONT_TRUE_TYPE_H_
#define _PDF_FONT_TRUE_TYPE_H_ #define _PDF_FONT_TRUE_TYPE_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfFontSimple.h" #include "PdfFontSimple.h"
namespace PoDoFo { namespace PoDoFo {
/** A PdfFont implementation that can be used /** A PdfFont implementation that can be used
* to embedd truetype fonts into a PDF file * to embedd truetype fonts into a PDF file
* or to draw with truetype fonts. * or to draw with truetype fonts.
* *
* TrueType fonts are always embedded as suggested in the PDF reference. * TrueType fonts are always embedded as suggested in the PDF reference.
*/ */
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 PdfFontType1.h   PdfFontType1.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FONT_TYPE1_H_ #ifndef _PDF_FONT_TYPE1_H_
#define _PDF_FONT_TYPE1_H_ #define _PDF_FONT_TYPE1_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfFontSimple.h" #include "PdfFontSimple.h"
namespace PoDoFo { namespace PoDoFo {
/** A PdfFont implementation that can be used /** A PdfFont implementation that can be used
* to embedd type1 fonts into a PDF file * to embedd type1 fonts into a PDF file
* or to draw with type1 fonts. * or to draw with type1 fonts.
*/ */
class PdfFontType1 : public PdfFontSimple { class PdfFontType1 : public PdfFontSimple {
public: public:
skipping to change at line 61 skipping to change at line 61
* file will match this fontmetrics object. The metrics object is * file will match this fontmetrics object. The metrics object is
* deleted along with the font. * deleted along with the font.
* \param pEncoding the encoding of this font. The font will not take ownership of this object. * \param pEncoding the encoding of this font. The font will not take ownership of this object.
* \param pObject an existing PdfObject * \param pObject an existing PdfObject
*/ */
PdfFontType1( PdfFontMetrics* pMetrics, const PdfEncoding* const pEncod ing, PdfFontType1( PdfFontMetrics* pMetrics, const PdfEncoding* const pEncod ing,
PdfObject* pObject ); PdfObject* pObject );
/** Create a PdfFont based on an existing PdfFont with a new id /** Create a PdfFont based on an existing PdfFont with a new id
* \param pFont pointer to existing font * \param pFont pointer to existing font
* \param pMetrics pointer to a font metrics object. The font in the P
DF
* file will match this fontmetrics object. The metrics object
is
* deleted along with the font.
* \param pszSuffix Suffix to add to font-id * \param pszSuffix Suffix to add to font-id
* \param pParent parent of the font object * \param pParent parent of the font object
*/ */
PdfFontType1( PdfFontType1* pFont, PdfFontMetrics* pMetrics, const char *pszSuffix, PdfVecObjects* pParent ); PdfFontType1( PdfFontType1* pFont, PdfFontMetrics* pMetrics, const char *pszSuffix, PdfVecObjects* pParent );
void InitBase14Font(); void InitBase14Font();
protected: protected:
/** Remember the glyphs used in the string in case of subsetting /** Remember the glyphs used in the string in case of subsetting
* *
* \param sText the text string which should be printed (is not allowe d to be NULL!) * \param sText the text string which should be printed (is not allowe d to be NULL!)
* \param lLen draw only lLen characters of pszText * \param lStringLen draw only lLen characters of pszText
*/ */
virtual void AddUsedSubsettingGlyphs( const PdfString & sText, long lStringLen ); virtual void AddUsedSubsettingGlyphs( const PdfString & sText, long lStringLen );
/** Remember the glyphname in case of subsetting
*
* \param sGlyphName Name of the glyph to remember
*/
virtual void AddUsedGlyphname( const char* sGlyphName );
/** Embeds pending subset-font into PDF page /** Embeds pending subset-font into PDF page
* *
*/ */
virtual void EmbedSubsetFont(); virtual void EmbedSubsetFont();
/** Embed the font file directly into the PDF file. /** Embed the font file directly into the PDF file.
* *
* \param pDescriptor font descriptor object * \param pDescriptor font descriptor object
*/ */
virtual void EmbedFontFile( PdfObject* pDescriptor ); virtual void EmbedFontFile( PdfObject* pDescriptor );
private: private:
bool FindSeac( const unsigned char * buffer, int length );
pdf_long FindInBuffer( const char* pszNeedle, const char* pszHaystack, pdf_long lLen ) const; pdf_long FindInBuffer( const char* pszNeedle, const char* pszHaystack, pdf_long lLen ) const;
int m_bUsed[8]; // bitmask for usage if char 00..ff int m_bUsed[8]; // bitmask for usage if char 00..ff
std::set<std::string> m_sUsedGlyph; // array for special chars
};
/** Helper Class needed for parsing type1-font for subsetting
*/
class PdfType1Encrypt
{
public:
/** Create a new PdfTypeEncrypt object.
*
*/
PdfType1Encrypt();
/** Encrypts a character
*
* \param plain the character to encrypt.
*
* \return encrypted cipher
*
*/
unsigned char Encrypt( unsigned char plain );
/** Decrypts a character
*
* \param cipher the cipher to decrypt.
*
* \return decrypted character
*
*/
unsigned char Decrypt( unsigned char cipher );
protected:
unsigned short int m_r;
unsigned short int m_c1;
unsigned short int m_c2;
};
class PdfType1EncryptEexec : public PdfType1Encrypt
{
public:
/** Create a new PdfType1EncryptEexec object.
*
*/
PdfType1EncryptEexec();
};
class PdfType1EncryptCharstring : public PdfType1Encrypt
{
public:
/** Create a new PdfType1EncryptCharstring object.
*
*/
PdfType1EncryptCharstring();
}; };
}; };
#endif // _PDF_FONT_TYPE1_H_ #endif // _PDF_FONT_TYPE1_H_
 End of changes. 6 change blocks. 
2 lines changed or deleted 69 lines changed or added


 PdfFontType1Base14.h   PdfFontType1Base14.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FONT_TYPE1_BASE14_H_ #ifndef _PDF_FONT_TYPE1_BASE14_H_
#define _PDF_FONT_TYPE1_BASE14_H_ #define _PDF_FONT_TYPE1_BASE14_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfFontSimple.h" #include "PdfFontSimple.h"
namespace PoDoFo { namespace PoDoFo {
/** A PdfFont implementation that can be used /** A PdfFont implementation that can be used
* draw with base14 type1 fonts into a PDF file. * draw with base14 type1 fonts into a PDF file.
*/ */
class PdfFontType1Base14 : public PdfFontSimple { class PdfFontType1Base14 : public PdfFontSimple {
public: public:
/** Create a new Type1 font object. /** Create a new Type1 font object.
* *
* \param pMetrics pointer to a font metrics object. The font in the P DF * \param pMetrics pointer to a font metrics object. The font in the P DF
* file will match this fontmetrics object. The metrics object is * file will match this fontmetrics object. The metrics object is
* deleted along with the font. * deleted along with the font.
* \param pEncoding the encoding of this font. The font will not take ownership of this object. * \param pEncoding the encoding of this font. The font will not take ownership of this object.
* \param pParent parent of the font object * \param pParent parent of the font object
* \param bEmbed if true the font will get embedded.
* *
*/ */
PdfFontType1Base14( PdfFontMetrics* pMetrics, const PdfEncoding* const pEncoding, PdfFontType1Base14( PdfFontMetrics* pMetrics, const PdfEncoding* const pEncoding,
PdfVecObjects* pParent ); PdfVecObjects* pParent );
// OC 13.08.2010 New: // OC 13.08.2010 New:
/** Create a new Type1 font object based on an existing PdfObject /** Create a new Type1 font object based on an existing PdfObject
* \param pMetrics pointer to a font metrics object. The font in the P DF * \param pMetrics pointer to a font metrics object. The font in the P DF
* file will match this fontmetrics object. The metrics object is * file will match this fontmetrics object. The metrics object is
* deleted along with the font. * deleted along with the font.
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added


 PdfFunction.h   PdfFunction.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_FUNCTION_H_ #ifndef _PDF_FUNCTION_H_
#define _PDF_FUNCTION_H_ #define _PDF_FUNCTION_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfElement.h" #include "PdfElement.h"
#include <list> #include <list>
namespace PoDoFo { namespace PoDoFo {
class PdfArray; class PdfArray;
/**
* The function type of a mathematical function in a PDF file.
*/
enum EPdfFunctionType { enum EPdfFunctionType {
ePdfFunctionType_Sampled = 0, ///< A sampled function (Type1) ePdfFunctionType_Sampled = 0, ///< A sampled function (Type1)
ePdfFunctionType_Exponential = 2, ///< An exponential interpolation fun ction (Type2) ePdfFunctionType_Exponential = 2, ///< An exponential interpolation fun ction (Type2)
ePdfFunctionType_Stitching = 3, ///< A stitching function (Type3) ePdfFunctionType_Stitching = 3, ///< A stitching function (Type3)
ePdfFunctionType_PostScript = 4 ///< A PostScript calculator function (Type4) ePdfFunctionType_PostScript = 4 ///< A PostScript calculator function (Type4)
}; };
/** /**
* This class defines a PdfFunction. * This class defines a PdfFunction.
* A function can be used in various ways in a PDF file.
* Examples are device dependent rasterization for high quality
* printing or color transformation functions for certain colorspaces.
*/ */
class PODOFO_API PdfFunction : public PdfElement { class PODOFO_DOC_API PdfFunction : public PdfElement {
public: public:
typedef std::list<PdfFunction> List; typedef std::list<PdfFunction> List;
typedef std::list<char> Sample; typedef std::list<char> Sample;
virtual ~PdfFunction(); virtual ~PdfFunction();
protected: protected:
/** Create a new PdfFunction object. /** Create a new PdfFunction object.
* *
skipping to change at line 88 skipping to change at line 94
* \param rDomain this array describes the input parameters of this Pd fFunction. If this * \param rDomain this array describes the input parameters of this Pd fFunction. If this
* function has m input parameters, this array has to c ontain 2*m numbers * function has m input parameters, this array has to c ontain 2*m numbers
* where each number describes either the lower or uppe r boundary of the input range. * where each number describes either the lower or uppe r boundary of the input range.
*/ */
void Init( EPdfFunctionType eType, const PdfArray & rDomain ); void Init( EPdfFunctionType eType, const PdfArray & rDomain );
}; };
/** This class is a PdfSampledFunction. /** This class is a PdfSampledFunction.
*/ */
class PODOFO_API PdfSampledFunction : public PdfFunction { class PODOFO_DOC_API PdfSampledFunction : public PdfFunction {
public: public:
/** Create a new PdfSampledFunction object. /** Create a new PdfSampledFunction object.
* *
* \param rDomain this array describes the input parameters of this Pd fFunction. If this * \param rDomain this array describes the input parameters of this Pd fFunction. If this
* function has m input parameters, this array has to c ontain 2*m numbers * function has m input parameters, this array has to c ontain 2*m numbers
* where each number describes either the lower or uppe r boundary of the input range. * where each number describes either the lower or uppe r boundary of the input range.
* \param rRange this array describes the output parameters of this P dfFunction. If this * \param rRange this array describes the output parameters of this P dfFunction. If this
* function has n input parameters, this array has to c ontain 2*n numbers * function has n input parameters, this array has to c ontain 2*n numbers
* where each number describes either the lower or uppe r boundary of the output range. * where each number describes either the lower or uppe r boundary of the output range.
* \param rlstSamples a list of bytes which are used to build up this function sample data * \param rlstSamples a list of bytes which are used to build up this function sample data
skipping to change at line 125 skipping to change at line 131
private: private:
/** Initialize this object. /** Initialize this object.
*/ */
void Init( const PdfArray & rDomain, const PdfArray & rRange, const Pd fFunction::Sample & rlstSamples ); void Init( const PdfArray & rDomain, const PdfArray & rRange, const Pd fFunction::Sample & rlstSamples );
}; };
/** This class is a PdfExponentialFunction. /** This class is a PdfExponentialFunction.
*/ */
class PODOFO_API PdfExponentialFunction : public PdfFunction { class PODOFO_DOC_API PdfExponentialFunction : public PdfFunction {
public: public:
/** Create a new PdfExponentialFunction object. /** Create a new PdfExponentialFunction object.
* *
* \param rDomain this array describes the input parameters of this Pd fFunction. If this * \param rDomain this array describes the input parameters of this Pd fFunction. If this
* function has m input parameters, this array has to c ontain 2*m numbers * function has m input parameters, this array has to c ontain 2*m numbers
* where each number describes either the lower or uppe r boundary of the input range. * where each number describes either the lower or uppe r boundary of the input range.
* \param rC0 * \param rC0
* \param rC1 * \param rC1
* \param dExponent * \param dExponent
* \param pParent parent vector of objects * \param pParent parent vector of objects
skipping to change at line 164 skipping to change at line 170
void Init( const PdfArray & rC0, const PdfArray & rC1, double dExponent ); void Init( const PdfArray & rC0, const PdfArray & rC1, double dExponent );
}; };
/** This class is a PdfStitchingFunction, i.e. a PdfFunction that combines /** This class is a PdfStitchingFunction, i.e. a PdfFunction that combines
* more than one PdfFunction into one. * more than one PdfFunction into one.
* *
* It combines several PdfFunctions that take 1 input parameter to * It combines several PdfFunctions that take 1 input parameter to
* a new PdfFunction taking again only 1 input parameter. * a new PdfFunction taking again only 1 input parameter.
*/ */
class PODOFO_API PdfStitchingFunction : public PdfFunction { class PODOFO_DOC_API PdfStitchingFunction : public PdfFunction {
public: public:
/** Create a new PdfStitchingFunction object. /** Create a new PdfStitchingFunction object.
* *
* \param rlstFunctions a list of functions which are used to built up this function object * \param rlstFunctions a list of functions which are used to built up this function object
* \param rDomain this array describes the input parameters of this Pd fFunction. If this * \param rDomain this array describes the input parameters of this Pd fFunction. If this
* function has m input parameters, this array has to c ontain 2*m numbers * function has m input parameters, this array has to c ontain 2*m numbers
* where each number describes either the lower or uppe r boundary of the input range. * where each number describes either the lower or uppe r boundary of the input range.
* \param rBounds the bounds array * \param rBounds the bounds array
* \param rEncode the encode array * \param rEncode the encode array
* \param pParent parent vector of objects * \param pParent parent vector of objects
 End of changes. 7 change blocks. 
5 lines changed or deleted 11 lines changed or added


 PdfHintStream.h   PdfHintStream.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_HINT_STREAM_H_ #ifndef _PDF_HINT_STREAM_H_
#define _PDF_HINT_STREAM_H_ #define _PDF_HINT_STREAM_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "podofo/base/PdfWriter.h"
#include "PdfElement.h" #include "PdfElement.h"
#include "PdfWriter.h"
namespace PoDoFo { namespace PoDoFo {
class PdfPagesTree; class PdfPagesTree;
namespace NonPublic { namespace NonPublic {
// PdfHintStream is not part of the public API and is NOT exported as part of // PdfHintStream is not part of the public API and is NOT exported as part of
// the DLL/shared library interface. Do not rely on it. // the DLL/shared library interface. Do not rely on it.
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 PdfImage.h   PdfImage.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_IMAGE_H_ #ifndef _PDF_IMAGE_H_
#define _PDF_IMAGE_H_ #define _PDF_IMAGE_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfFilter.h" #include "podofo/base/PdfFilter.h"
#include "PdfXObject.h" #include "PdfXObject.h"
namespace PoDoFo { namespace PoDoFo {
class PdfDocument; class PdfDocument;
class PdfInputStream; class PdfInputStream;
class PdfObject; class PdfObject;
class PdfVecObjects; class PdfVecObjects;
/** A PdfImage object is needed when ever you want to embedd an image /** A PdfImage object is needed when ever you want to embedd an image
* file into a PDF document. * file into a PDF document.
* The PdfImage object is embedded once and can be drawn as often * The PdfImage object is embedded once and can be drawn as often
* as you want on any page in the document using a PdfImageRef object * as you want on any page in the document using PdfPainter
* which has to be retrieved from the PdfImage object before drawing.
* *
* \see GetImageReference * \see GetImageReference
* \see PdfPainter::DrawImage * \see PdfPainter::DrawImage
* *
* \see SetImageData * \see SetImageData
*/ */
class PODOFO_API PdfImage : public PdfXObject { class PODOFO_DOC_API PdfImage : public PdfXObject {
public: public:
/** Constuct a new PdfImage object /** Constuct a new PdfImage object
* *
* \param pParent parent vector of this image * \param pParent parent vector of this image
* \param pszPrefix optional prefix for XObject-name * \param pszPrefix optional prefix for XObject-name
*/ */
PdfImage( PdfVecObjects* pParent, const char* pszPrefix = NULL ); PdfImage( PdfVecObjects* pParent, const char* pszPrefix = NULL );
/** Constuct a new PdfImage object /** Constuct a new PdfImage object
* This is an overloaded constructor. * This is an overloaded constructor.
skipping to change at line 220 skipping to change at line 219
* \param pStream stream supplieding raw image data * \param pStream stream supplieding raw image data
*/ */
void SetImageDataRaw( unsigned int nWidth, unsigned int nHeight, void SetImageDataRaw( unsigned int nWidth, unsigned int nHeight,
unsigned int nBitsPerComponent, PdfInputStream* p Stream ); unsigned int nBitsPerComponent, PdfInputStream* p Stream );
/** Converts a EPdfColorSpace enum to a name key which can be used in a /** Converts a EPdfColorSpace enum to a name key which can be used in a
* PDF dictionary. * PDF dictionary.
* \param eColorSpace a valid colorspace * \param eColorSpace a valid colorspace
* \returns a valid key for this colorspace. * \returns a valid key for this colorspace.
*/ */
static const char* ColorspaceToName( EPdfColorSpace eColorSpace ); static PdfName ColorspaceToName( EPdfColorSpace eColorSpace );
#ifdef PODOFO_HAVE_JPEG_LIB #ifdef PODOFO_HAVE_JPEG_LIB
void LoadFromJpegHandle( FILE* hInfile, PdfFileInputStream* pInStrea m ); void LoadFromJpegHandle( PdfFileInputStream* pInStream );
#endif // PODOFO_HAVE_JPEG_LIB #endif // PODOFO_HAVE_JPEG_LIB
}; };
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
inline double PdfImage::GetWidth() const inline double PdfImage::GetWidth() const
{ {
return this->GetPageSize().GetWidth(); return this->GetPageSize().GetWidth();
} }
 End of changes. 5 change blocks. 
7 lines changed or deleted 6 lines changed or added


 PdfInfo.h   PdfInfo.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
*************************************************************************** / *************************************************************************** /
#ifndef _PDF_INFO_H_ #ifndef _PDF_INFO_H_
#define _PDF_INFO_H_ #define _PDF_INFO_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "podofo/base/PdfName.h"
#include "PdfElement.h" #include "PdfElement.h"
#include "PdfName.h"
namespace PoDoFo { namespace PoDoFo {
class PdfString; class PdfString;
/** This class provides access to the documents /** This class provides access to the documents
* info dictionary, which provides information * info dictionary, which provides information
* about the PDF document. * about the PDF document.
*/ */
class PODOFO_API PdfInfo : public PdfElement { class PODOFO_DOC_API PdfInfo : public PdfElement {
public: public:
/** /**
* Enum to specifiy the initial information of the * Enum to specifiy the initial information of the
* info dictionary. * info dictionary.
*/ */
enum EPdfInfoInitial { enum EPdfInfoInitial {
ePdfInfoInitial_WriteCreationTime = 0x01, ///< Write the creati on time (current time). Default for new documents. ePdfInfoInitial_WriteCreationTime = 0x01, ///< Write the creati on time (current time). Default for new documents.
ePdfInfoInitial_WriteModificationTime = 0x02, ///< Write the modifi cation time (current time). Default for loaded documents. ePdfInfoInitial_WriteModificationTime = 0x02, ///< Write the modifi cation time (current time). Default for loaded documents.
ePdfInfoInitial_WriteProducer = 0x04 ///< Write producer k ey. Default for new documents. ePdfInfoInitial_WriteProducer = 0x04 ///< Write producer k ey. Default for new documents.
}; };
skipping to change at line 132 skipping to change at line 132
*/ */
void SetProducer( const PdfString & sProducer ); void SetProducer( const PdfString & sProducer );
// Peter Petrov 27 April 2008 // Peter Petrov 27 April 2008
/** Get the producer of the document /** Get the producer of the document
* \returns the producer * \returns the producer
*/ */
inline const PdfString & GetProducer() const; inline const PdfString & GetProducer() const;
/** Set the trapping state of the document. /** Set the trapping state of the document.
* \param sTitle title * \param sTrapped trapped
*/ */
void SetTrapped( const PdfName & sTrapped ); void SetTrapped( const PdfName & sTrapped );
/** Get the trapping state of the document /** Get the trapping state of the document
* \returns the title * \returns the title
*/ */
inline const PdfName & GetTrapped() const; inline const PdfName & GetTrapped() const;
private: private:
/** Add the initial document information to the dictionary. /** Add the initial document information to the dictionary.
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 PdfInputStream.h   PdfInputStream.h 
skipping to change at line 92 skipping to change at line 92
* \returns the number of bytes read, -1 if an error ocurred * \returns the number of bytes read, -1 if an error ocurred
* and zero if no more bytes are available for reading. * and zero if no more bytes are available for reading.
*/ */
virtual pdf_long Read( char* pBuffer, pdf_long lLen ); virtual pdf_long Read( char* pBuffer, pdf_long lLen );
/** Get the length of the file. /** Get the length of the file.
* \return the file length * \return the file length
*/ */
pdf_long GetFileLength(); pdf_long GetFileLength();
/** Get the internal FILE handle.
* \return the internal FILE handle
*/
FILE* GetHandle();
private: private:
FILE* m_hFile; FILE* m_hFile;
}; };
/** An input stream that reads data from a memory buffer /** An input stream that reads data from a memory buffer
*/ */
class PODOFO_API PdfMemoryInputStream : public PdfInputStream { class PODOFO_API PdfMemoryInputStream : public PdfInputStream {
public: public:
/** Open a file for reading data /** Open a file for reading data
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added


 PdfLocale.h   PdfLocale.h 
skipping to change at line 32 skipping to change at line 32
* PDF I/O. Avoid using this stream for anything that should be done in the * PDF I/O. Avoid using this stream for anything that should be done in the
* regional locale. * regional locale.
* *
* \warning This method may throw ePdfError_InvalidDeviceOperation * \warning This method may throw ePdfError_InvalidDeviceOperation
* if your STL does not support the locale string in PdfIOLocale . * if your STL does not support the locale string in PdfIOLocale .
* *
* If you fail to call this on a stream you use for PDF I/O you will encoun ter * If you fail to call this on a stream you use for PDF I/O you will encoun ter
* problems like German and other European users getting numbers in the for mat * problems like German and other European users getting numbers in the for mat
* "10110,4" or even "10.110,4" instead of "10110.4" . * "10110,4" or even "10.110,4" instead of "10110.4" .
*/ */
void PdfLocaleImbue(std::ios_base&); void PODOFO_API PdfLocaleImbue(std::ios_base&);
}; };
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 PdfMemDocument.h   PdfMemDocument.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_MEM_DOCUMENT_H_ #ifndef _PDF_MEM_DOCUMENT_H_
#define _PDF_MEM_DOCUMENT_H_ #define _PDF_MEM_DOCUMENT_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "podofo/base/PdfObject.h"
#include "PdfDocument.h" #include "PdfDocument.h"
#include "PdfFontCache.h" #include "PdfFontCache.h"
#include "PdfObject.h"
#include "PdfParser.h"
#include "PdfWriter.h"
namespace PoDoFo { namespace PoDoFo {
class PdfAcroForm; class PdfAcroForm;
class PdfDestination; class PdfDestination;
class PdfDictionary; class PdfDictionary;
class PdfEncrypt; class PdfEncrypt;
class PdfFileSpec; class PdfFileSpec;
class PdfFont; class PdfFont;
class PdfInfo; class PdfInfo;
class PdfNamesTree; class PdfNamesTree;
class PdfOutlines; class PdfOutlines;
class PdfPage; class PdfPage;
class PdfPagesTree; class PdfPagesTree;
class PdfParser;
class PdfRect; class PdfRect;
class PdfWriter;
/** PdfMemDocument is the core class for reading and manipulating /** PdfMemDocument is the core class for reading and manipulating
* PDF files and writing them back to disk. * PDF files and writing them back to disk.
* *
* PdfMemDocument was designed to allow easy access to the object * PdfMemDocument was designed to allow easy access to the object
* structur of a PDF file. * structur of a PDF file.
* *
* PdfMemDocument should be used whenever you want to change * PdfMemDocument should be used whenever you want to change
* the object structure of a PDF file. * the object structure of a PDF file.
* *
* When you are only creating PDF files, please use PdfStreamedDocument * When you are only creating PDF files, please use PdfStreamedDocument
* which is usually faster for creating PDFs. * which is usually faster for creating PDFs.
* *
* \see PdfDocument * \see PdfDocument
* \see PdfStreamedDocument * \see PdfStreamedDocument
* \see PdfParser * \see PdfParser
* \see PdfWriter * \see PdfWriter
*/ */
class PODOFO_API PdfMemDocument : public PdfDocument { class PODOFO_DOC_API PdfMemDocument : public PdfDocument {
friend class PdfWriter; friend class PdfWriter;
public: public:
/** Construct a new (empty) PdfMemDocument /** Construct a new (empty) PdfMemDocument
*/ */
PdfMemDocument(); PdfMemDocument();
/** Construct a PdfMemDocument from an existing PDF (on disk) /** Construct a PdfMemDocument from an existing PDF (on disk)
* \param pszFilename filename of the file which is going to be parsed /opened * \param pszFilename filename of the file which is going to be parsed /opened
skipping to change at line 243 skipping to change at line 243
*/ */
void SetPassword( const std::string & sPassword ); void SetPassword( const std::string & sPassword );
/** Encrypt the document during writing. /** Encrypt the document during writing.
* *
* \param userPassword the user password (if empty the user does not h ave * \param userPassword the user password (if empty the user does not h ave
* to enter a password to open the document) * to enter a password to open the document)
* \param ownerPassword the owner password * \param ownerPassword the owner password
* \param protection several EPdfPermissions values or'ed together to set * \param protection several EPdfPermissions values or'ed together to set
* the users permissions for this document * the users permissions for this document
* \param eRevision the revision of the encryption algorithm to be use d * \param eAlgorithm the revision of the encryption algorithm to be us ed
* \param eKeyLength the length of the encryption key ranging from 40 to 128 bits * \param eKeyLength the length of the encryption key ranging from 40 to 128 bits
* (only used if eAlgorithm == ePdfEncryptAlgorithm_ RC4V2) * (only used if eAlgorithm == ePdfEncryptAlgorithm_ RC4V2)
* *
* \see PdfEncrypt * \see PdfEncrypt
*/ */
void SetEncrypted( const std::string & userPassword, void SetEncrypted( const std::string & userPassword,
const std::string & ownerPassword, const std::string & ownerPassword,
int protection = PdfEncrypt::ePdfPermissions_Print | int protection = PdfEncrypt::ePdfPermissions_Print |
PdfEncrypt::ePdfPermissions_Edit | PdfEncrypt::ePdfPermissions_Edit |
PdfEncrypt::ePdfPermissions_Copy | PdfEncrypt::ePdfPermissions_Copy |
skipping to change at line 465 skipping to change at line 465
* \param pObj free object from memory * \param pObj free object from memory
* \param bForce if true the object will be free'd * \param bForce if true the object will be free'd
* even if IsDirty() returns true. * even if IsDirty() returns true.
* So you will loose any changes made * So you will loose any changes made
* to this object. * to this object.
* *
* \see IsDirty * \see IsDirty
*/ */
void FreeObjectMemory( PdfObject* pObj, bool bForce = false ); void FreeObjectMemory( PdfObject* pObj, bool bForce = false );
/**
* \returns the parsers encryption object or NULL if the read PDF file
was not encrypted
*/
inline const PdfEncrypt* GetEncrypt() const;
private: private:
/** Get a dictioary from the catalog dictionary by its name. /** Get a dictioary from the catalog dictionary by its name.
* \param pszName will be converted into a PdfName * \param pszName will be converted into a PdfName
* \returns the dictionary if it was found or NULL * \returns the dictionary if it was found or NULL
*/ */
PdfObject* GetNamedObjectFromCatalog( const char* pszName ) const; PdfObject* GetNamedObjectFromCatalog( const char* pszName ) const;
/** Internal method to load all objects from a PdfParser object. /** Internal method to load all objects from a PdfParser object.
* The objects will be removed from the parser and are now * The objects will be removed from the parser and are now
* owned by the PdfMemDocument. * owned by the PdfMemDocument.
skipping to change at line 570 skipping to change at line 575
} }
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
bool PdfMemDocument::IsHighPrintAllowed() const bool PdfMemDocument::IsHighPrintAllowed() const
{ {
return m_pEncrypt ? m_pEncrypt->IsHighPrintAllowed() : true; return m_pEncrypt ? m_pEncrypt->IsHighPrintAllowed() : true;
} }
// -----------------------------------------------------
//
// -----------------------------------------------------
const PdfEncrypt* PdfMemDocument::GetEncrypt() const
{
return m_pEncrypt;
}
}; };
#endif // _PDF_MEM_DOCUMENT_H_ #endif // _PDF_MEM_DOCUMENT_H_
 End of changes. 8 change blocks. 
6 lines changed or deleted 20 lines changed or added


 PdfMemStream.h   PdfMemStream.h 
skipping to change at line 110 skipping to change at line 110
*/ */
inline const char* Get() const; inline const char* Get() const;
/** Get the stream's length. The length is that of the internal /** Get the stream's length. The length is that of the internal
* stream buffer, so (eg) for a Flate-compressed stream it will be * stream buffer, so (eg) for a Flate-compressed stream it will be
* the length of the compressed data. * the length of the compressed data.
* *
* \returns the length of the internal buffer * \returns the length of the internal buffer
* \see Get() * \see Get()
*/ */
inline pdf_long GetLength() const; virtual pdf_long GetLength() const;
/** This function compresses any currently set stream /** This function compresses any currently set stream
* using the FlateDecode(ZIP) algorithm. JPEG compressed streams * using the FlateDecode(ZIP) algorithm. JPEG compressed streams
* will not be compressed again using this function. * will not be compressed again using this function.
* Entries to the filter dictionary will be added if necessary. * Entries to the filter dictionary will be added if necessary.
*/ */
void FlateCompress(); void FlateCompress();
/** This method removes all filters from the stream /** This method removes all filters from the stream
*/ */
skipping to change at line 179 skipping to change at line 179
* Expects that all filters are setup correctly. * Expects that all filters are setup correctly.
* \returns ErrOk on success * \returns ErrOk on success
*/ */
void FlateCompressStreamData(); void FlateCompressStreamData();
private: private:
PdfRefCountedBuffer m_buffer; PdfRefCountedBuffer m_buffer;
PdfOutputStream* m_pStream; PdfOutputStream* m_pStream;
PdfBufferOutputStream* m_pBufferStream; PdfBufferOutputStream* m_pBufferStream;
pdf_long m_lLength; pdf_long m_lLength;
}; };
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
const char* PdfMemStream::Get() const const char* PdfMemStream::Get() const
{ {
return m_buffer.GetBuffer(); return m_buffer.GetBuffer();
} }
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
pdf_long PdfMemStream::GetLength() const
{
return m_lLength;
}
// -----------------------------------------------------
//
// -----------------------------------------------------
const char* PdfMemStream::GetInternalBuffer() const const char* PdfMemStream::GetInternalBuffer() const
{ {
return m_buffer.GetBuffer(); return m_buffer.GetBuffer();
} }
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
pdf_long PdfMemStream::GetInternalBufferSize() const pdf_long PdfMemStream::GetInternalBufferSize() const
{ {
 End of changes. 3 change blocks. 
10 lines changed or deleted 2 lines changed or added


 PdfMemoryManagement.h   PdfMemoryManagement.h 
skipping to change at line 49 skipping to change at line 49
PODOFO_API void* podofo_realloc( void* buffer, size_t size ); PODOFO_API void* podofo_realloc( void* buffer, size_t size );
/** /**
* Wrapper around free of the c-library used by PoDoFo. * Wrapper around free of the c-library used by PoDoFo.
* *
* Use this to free memory allocated inside of PoDoFo * Use this to free memory allocated inside of PoDoFo
* with podofo_malloc. * with podofo_malloc.
*/ */
PODOFO_API void podofo_free( void* buffer ); PODOFO_API void podofo_free( void* buffer );
/**
* Check during runtime if the current architecture is big- or little-endia
n.
* \returns true if the architecture is little-endian
*/
PODOFO_API bool podofo_is_little_endian();
}; };
#endif // _PDF_XREF_STREAM_PARSER_OBJECT_H_ #endif // _PDF_XREF_STREAM_PARSER_OBJECT_H_
 End of changes. 1 change blocks. 
0 lines changed or deleted 7 lines changed or added


 PdfNamesTree.h   PdfNamesTree.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_NAMES_TREE_H_ #ifndef _PDF_NAMES_TREE_H_
#define _PDF_NAMES_TREE_H_ #define _PDF_NAMES_TREE_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfElement.h" #include "PdfElement.h"
namespace PoDoFo { namespace PoDoFo {
class PdfDictionary; class PdfDictionary;
class PdfName; class PdfName;
class PdfObject; class PdfObject;
class PdfString; class PdfString;
class PdfVecObjects; class PdfVecObjects;
enum EPdfNameLimits { enum EPdfNameLimits {
ePdfNameLimits_Before, ePdfNameLimits_Before,
ePdfNameLimits_Inside, ePdfNameLimits_Inside,
ePdfNameLimits_After ePdfNameLimits_After
}; };
class PODOFO_API PdfNamesTree : public PdfElement { class PODOFO_DOC_API PdfNamesTree : public PdfElement {
public: public:
/** Create a new PdfNamesTree object /** Create a new PdfNamesTree object
* \param pParent parent of this action * \param pParent parent of this action
*/ */
PdfNamesTree( PdfVecObjects* pParent ); PdfNamesTree( PdfVecObjects* pParent );
/** Create a PdfNamesTree object from an existing PdfObject /** Create a PdfNamesTree object from an existing PdfObject
* \param pObject the object to create from * \param pObject the object to create from
* \param pCatalog the Catalog dictionary of the owning PDF * \param pCatalog the Catalog dictionary of the owning PDF
*/ */
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 PdfObject.h   PdfObject.h 
skipping to change at line 236 skipping to change at line 236
* *
* \param pVecObjects a vector of pdf objects * \param pVecObjects a vector of pdf objects
*/ */
inline void SetOwner( PdfVecObjects* pVecObjects ); inline void SetOwner( PdfVecObjects* pVecObjects );
/** Get the owner of this object. /** Get the owner of this object.
* \return the creator of this object * \return the creator of this object
*/ */
inline PdfVecObjects* GetOwner() const; inline PdfVecObjects* GetOwner() const;
/** Get the parent of this object.
* \return the parent of this object in the object heirachy
*/
inline PdfObject* GetParent() const;
/** Creates a copy of an existing PdfObject /** Creates a copy of an existing PdfObject
* All assosiated objects and streams will be copied along with the Pd fObject * All assosiated objects and streams will be copied along with the Pd fObject
* \param rhs PdfObject to clone * \param rhs PdfObject to clone
* \returns a reference to this object * \returns a reference to this object
*/ */
const PdfObject & operator=( const PdfObject & rhs ); const PdfObject & operator=( const PdfObject & rhs );
/** This function compresses any currently set stream /** This function compresses any currently set stream
* using the FlateDecode algorithm. JPEG compressed streams * using the FlateDecode algorithm. JPEG compressed streams
* will not be compressed again using this function. * will not be compressed again using this function.
 End of changes. 1 change blocks. 
5 lines changed or deleted 0 lines changed or added


 PdfObjectStreamParserObject.h   PdfObjectStreamParserObject.h 
skipping to change at line 42 skipping to change at line 42
class PdfVecObjects; class PdfVecObjects;
/** /**
* A utility class for PdfParser that can parse * A utility class for PdfParser that can parse
* an object stream object. * an object stream object.
* *
* It is mainly here to make PdfParser more modular. * It is mainly here to make PdfParser more modular.
*/ */
class PdfObjectStreamParserObject { class PdfObjectStreamParserObject {
public: public:
typedef std::vector<long long> ObjectIdList;
/** /**
* Create a new PdfObjectStreamParserObject from an existing * Create a new PdfObjectStreamParserObject from an existing
* PdfParserObject. The PdfParserObject will be removed and deleted. * PdfParserObject. The PdfParserObject will be removed and deleted.
* All objects from the object stream will be read into memory. * All objects from the object stream will be read into memory.
* *
* \param pParser PdfParserObject for an object stream * \param pParser PdfParserObject for an object stream
* \param pVecObjects add loaded objecs to this vector of objects * \param pVecObjects add loaded objecs to this vector of objects
* \param rBuffer use this allocated buffer for caching * \param rBuffer use this allocated buffer for caching
* \param pEncrypt encryption object used to decrypt streams * \param pEncrypt encryption object used to decrypt streams
*/ */
PdfObjectStreamParserObject(PdfParserObject* pParser, PdfVecObjects* pV ecObjects, const PdfRefCountedBuffer & rBuffer, PdfEncrypt* pEncrypt ); PdfObjectStreamParserObject(PdfParserObject* pParser, PdfVecObjects* pV ecObjects, const PdfRefCountedBuffer & rBuffer, PdfEncrypt* pEncrypt );
~PdfObjectStreamParserObject(); ~PdfObjectStreamParserObject();
void Parse(); void Parse(ObjectIdList const &);
private: private:
void ReadObjectsFromStream( char* pBuffer, pdf_long lBufferLen, long lo ng lNum, long long lFirst ); void ReadObjectsFromStream( char* pBuffer, pdf_long lBufferLen, long lo ng lNum, long long lFirst, ObjectIdList const &);
private: private:
PdfParserObject* m_pParser; PdfParserObject* m_pParser;
PdfVecObjects* m_vecObjects; PdfVecObjects* m_vecObjects;
PdfRefCountedBuffer m_buffer; PdfRefCountedBuffer m_buffer;
PdfEncrypt* m_pEncrypt; PdfEncrypt* m_pEncrypt;
}; };
}; };
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 lines changed or added


 PdfOutlines.h   PdfOutlines.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_OUTLINE_H_ #ifndef _PDF_OUTLINE_H_
#define _PDF_OUTLINE_H_ #define _PDF_OUTLINE_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfElement.h" #include "PdfElement.h"
namespace PoDoFo { namespace PoDoFo {
class PdfDestination; class PdfDestination;
class PdfAction; class PdfAction;
class PdfObject; class PdfObject;
class PdfOutlineItem; class PdfOutlineItem;
class PdfString; class PdfString;
class PdfVecObjects; class PdfVecObjects;
skipping to change at line 58 skipping to change at line 58
/** /**
* A PDF outline item has an title and a destination. * A PDF outline item has an title and a destination.
* It is an element in the documents outline which shows * It is an element in the documents outline which shows
* its hierarchical structure. * its hierarchical structure.
* *
* \see PdfDocument * \see PdfDocument
* \see PdfOutlines * \see PdfOutlines
* \see PdfDestination * \see PdfDestination
*/ */
class PODOFO_API PdfOutlineItem : public PdfElement { class PODOFO_DOC_API PdfOutlineItem : public PdfElement {
public: public:
virtual ~PdfOutlineItem(); virtual ~PdfOutlineItem();
/** Create a PdfOutlineItem that is a child of this item /** Create a PdfOutlineItem that is a child of this item
* \param sTitle title of this item * \param sTitle title of this item
* \param rDest destination of this item * \param rDest destination of this item
*/ */
PdfOutlineItem* CreateChild( const PdfString & sTitle, const PdfDestina tion & rDest ); PdfOutlineItem* CreateChild( const PdfString & sTitle, const PdfDestina tion & rDest );
/** Create a PdfOutlineItem that is on the same level and follows the c urrent item. /** Create a PdfOutlineItem that is on the same level and follows the c urrent item.
skipping to change at line 127 skipping to change at line 127
* call. * call.
*/ */
void Erase(); void Erase();
/** Set the destination of this outline. /** Set the destination of this outline.
* \param rDest the destination * \param rDest the destination
*/ */
void SetDestination( const PdfDestination & rDest ); void SetDestination( const PdfDestination & rDest );
/** Get the destination of this outline. /** Get the destination of this outline.
* \param pDoc a PdfDocument owning this annotation.
* This is required to resolve names and pages.
* \returns the destination, if there is one, or NULL * \returns the destination, if there is one, or NULL
*/ */
PdfDestination* GetDestination( void ); PdfDestination* GetDestination( PdfDocument* pDoc );
/** Set the action of this outline. /** Set the action of this outline.
* \param rAction the action * \param rAction the action
*/ */
void SetAction( const PdfAction & rAction ); void SetAction( const PdfAction & rAction );
/** Get the action of this outline. /** Get the action of this outline.
* \returns the action, if there is one, or NULL * \returns the action, if there is one, or NULL
*/ */
PdfAction* GetAction( void ); PdfAction* GetAction( void );
skipping to change at line 298 skipping to change at line 300
return m_pNext; return m_pNext;
} }
/** The main PDF outlines dictionary. /** The main PDF outlines dictionary.
* *
* Do not create it by yourself but * Do not create it by yourself but
* use PdfDocument::GetOutlines() instead. * use PdfDocument::GetOutlines() instead.
* *
* \see PdfDocument * \see PdfDocument
*/ */
class PODOFO_API PdfOutlines : public PdfOutlineItem { class PODOFO_DOC_API PdfOutlines : public PdfOutlineItem {
public: public:
/** Create a new PDF outlines dictionary /** Create a new PDF outlines dictionary
* \param pParent parent vector of objects * \param pParent parent vector of objects
*/ */
PdfOutlines( PdfVecObjects* pParent ); PdfOutlines( PdfVecObjects* pParent );
/** Create a PDF outlines object from an existing dictionary /** Create a PDF outlines object from an existing dictionary
* \param pObject an existing outlines dictionary * \param pObject an existing outlines dictionary
*/ */
 End of changes. 5 change blocks. 
4 lines changed or deleted 6 lines changed or added


 PdfOutputDevice.h   PdfOutputDevice.h 
skipping to change at line 29 skipping to change at line 29
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_OUTPUT_DEVICE_H_ #ifndef _PDF_OUTPUT_DEVICE_H_
#define _PDF_OUTPUT_DEVICE_H_ #define _PDF_OUTPUT_DEVICE_H_
#include <cstdarg> #include <cstdarg>
#include <ostream> #include <ostream>
#include "PdfDefines.h" #include "PdfDefines.h"
#include "PdfLocale.h" #include "PdfLocale.h"
#include "PdfRefCountedBuffer.h"
namespace PoDoFo { namespace PoDoFo {
class PdfRefCountedBuffer;
/** This class provides an output device which operates /** This class provides an output device which operates
* either on a file or on a buffer in memory. * either on a file or on a buffer in memory.
* Additionally it can count the bytes written to the device. * Additionally it can count the bytes written to the device.
* *
* This class is suitable for inheritance to provide output * This class is suitable for inheritance to provide output
* devices of your own for PoDoFo. * devices of your own for PoDoFo.
* Just overide the required virtual methods. * Just overide the required virtual methods.
*/ */
class PODOFO_API PdfOutputDevice { class PODOFO_API PdfOutputDevice {
public: public:
skipping to change at line 121 skipping to change at line 120
* WARNING: Do not use this for doubles or floating point values * WARNING: Do not use this for doubles or floating point values
* as the output might depend on the current locale. * as the output might depend on the current locale.
* *
* \param pszFormat a format string as you would use it with printf * \param pszFormat a format string as you would use it with printf
* \returns ErrOk on success * \returns ErrOk on success
* *
* \see Write * \see Write
*/ */
virtual void Print( const char* pszFormat, ... ); virtual void Print( const char* pszFormat, ... );
/** 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.
*
* \param pszFormat a format string as you would use it with printf
* \param lBytes length of the format string in bytes when written
* \param argptr variable argument list
* \returns ErrOk on success
*
* \see Write
*/
virtual void PrintV( const char* pszFormat, long lBytes, va_list arg
ptr );
/**
* Determine the length of a format string in bytes
* when written using PrintV
*
* \param pszFormat format string
* \param args variable argument list
*
* \returns length in bytes
* \see PrintV
*/
long PrintVLen( const char* pszFormat, va_list args );
/** Write data to the buffer. Use this call instead of Print if you /** Write data to the buffer. Use this call instead of Print if you
* want to write binary data to the PdfOutputDevice. * want to write binary data to the PdfOutputDevice.
* *
* \param pBuffer a pointer to the data buffer * \param pBuffer a pointer to the data buffer
* \param lLen write lLen bytes of pBuffer to the PdfOutputDevice * \param lLen write lLen bytes of pBuffer to the PdfOutputDevice
* \returns ErrOk on success * \returns ErrOk on success
* *
* \see Print * \see Print
*/ */
virtual void Write( const char* pBuffer, size_t lLen ); virtual void Write( const char* pBuffer, size_t lLen );
/** Read data from the device
* \param pBuffer a pointer to the data buffer
* \param lLen length of the output buffer
* \returns Number of read bytes. Return 0 if EOF
*/
virtual size_t Read( char* pBuffer, size_t lLen );
/** Seek the device to the position offset from the begining /** Seek the device to the position offset from the begining
* \param offset from the beginning of the file * \param offset from the beginning of the file
*/ */
virtual void Seek( size_t offset ); virtual void Seek( size_t offset );
/** Get the current offset from the beginning of the file. /** Get the current offset from the beginning of the file.
* \return the offset form the beginning of the file. * \return the offset form the beginning of the file.
*/ */
virtual inline size_t Tell() const; virtual inline size_t Tell() const;
skipping to change at line 158 skipping to change at line 190
/** Initialize all private members /** Initialize all private members
*/ */
void Init(); void Init();
protected: protected:
size_t m_ulLength; size_t m_ulLength;
private: private:
FILE* m_hFile; FILE* m_hFile;
char* m_pBuffer; char* m_pBuffer;
size_t m_lBufferLen; size_t m_lBufferLen;
std::ostream* m_pStream; std::ostream* m_pStream;
std::istream* m_pReadStream;
bool m_pStreamOwned; bool m_pStreamOwned;
std::locale m_pStreamSavedLocale; std::locale m_pStreamSavedLocale;
PdfRefCountedBuffer* m_pRefCountedBuffer; PdfRefCountedBuffer* m_pRefCountedBuffer;
size_t m_ulPosition; size_t m_ulPosition;
PdfRefCountedBuffer m_printBuffer;
}; };
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
size_t PdfOutputDevice::GetLength() const size_t PdfOutputDevice::GetLength() const
{ {
return m_ulLength; return m_ulLength;
} }
 End of changes. 8 change blocks. 
4 lines changed or deleted 39 lines changed or added


 PdfPage.h   PdfPage.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_PAGE_H_ #ifndef _PDF_PAGE_H_
#define _PDF_PAGE_H_ #define _PDF_PAGE_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "podofo/base/PdfArray.h"
#include "podofo/base/PdfCanvas.h"
#include "podofo/base/PdfRect.h"
#include "PdfArray.h"
#include "PdfAnnotation.h" #include "PdfAnnotation.h"
#include "PdfCanvas.h"
#include "PdfContents.h" #include "PdfContents.h"
#include "PdfElement.h" #include "PdfElement.h"
#include "PdfField.h" #include "PdfField.h"
#include "PdfRect.h"
namespace PoDoFo { namespace PoDoFo {
class PdfDocument; class PdfDocument;
class PdfDictionary; class PdfDictionary;
class PdfVecObjects; class PdfVecObjects;
typedef std::map<PdfReference,PdfAnnotation*> TMapAnnotation; typedef std::map<PdfReference,PdfAnnotation*> TMapAnnotation;
typedef TMapAnnotation::iterator TIMapAnnotation; typedef TMapAnnotation::iterator TIMapAnnotation;
typedef TMapAnnotation::const_iterator TCIMapAnnotation; typedef TMapAnnotation::const_iterator TCIMapAnnotation;
/** PdfPage is one page in the pdf document. /** PdfPage is one page in the pdf document.
* It is possible to draw on a page using a PdfPainter object. * It is possible to draw on a page using a PdfPainter object.
* Every document needs at least one page. * Every document needs at least one page.
*/ */
class PODOFO_API PdfPage : public PdfElement, public PdfCanvas { class PODOFO_DOC_API PdfPage : public PdfElement, public PdfCanvas {
public: public:
/** Create a new PdfPage object. /** Create a new PdfPage object.
* \param rSize a PdfRect specifying the size of the page (i.e the /Me diaBox key) in PDF units * \param rSize a PdfRect specifying the size of the page (i.e the /Me diaBox key) in PDF units
* \param pParent add the page to this parent * \param pParent add the page to this parent
*/ */
PdfPage( const PdfRect & rSize, PdfDocument* pParent ); PdfPage( const PdfRect & rSize, PdfDocument* pParent );
/** Create a new PdfPage object. /** Create a new PdfPage object.
* \param rSize a PdfRect specifying the size of the page (i.e the /Me diaBox key) in PDF units * \param rSize a PdfRect specifying the size of the page (i.e the /Me diaBox key) in PDF units
* \param pParent add the page to this parent * \param pParent add the page to this parent
skipping to change at line 238 skipping to change at line 239
/** Get an element from the pages resources dictionary, /** Get an element from the pages resources dictionary,
* using a type (category) and a key. * using a type (category) and a key.
* *
* \param rType the type of resource to fetch (e.g. /Font, or /XObject ) * \param rType the type of resource to fetch (e.g. /Font, or /XObject )
* \param rKey the key of the resource * \param rKey the key of the resource
* *
* \returns the object of the resource or NULL if it was not found * \returns the object of the resource or NULL if it was not found
*/ */
PdfObject* GetFromResources( const PdfName & rType, const PdfName & rKe y ); PdfObject* GetFromResources( const PdfName & rType, const PdfName & rKe y );
/** Method for getting a value that can be inherited
* Possible names that can be inherited according to
* the PDF specification are: Resources, MediaBox, CropBox and Rotate
*
* \returns PdfObject - the result of the key fetching or NULL
*/
inline const PdfObject* GetInheritedKey( const PdfName & rName ) const;
private: private:
/** /**
* Initialize a new page object. * Initialize a new page object.
* m_pContents must be initialized before calling this! * m_pContents must be initialized before calling this!
* *
* @param rSize page size * @param rSize page size
*/ */
void InitNewPage( const PdfRect & rSize ); void InitNewPage( const PdfRect & rSize );
skipping to change at line 261 skipping to change at line 270
* the object is only created if needed. * the object is only created if needed.
*/ */
void CreateContents(); void CreateContents();
/** Get the bounds of a specified page box in PDF units. /** Get the bounds of a specified page box in PDF units.
* This function is internal, since there are wrappers for all standard boxes * This function is internal, since there are wrappers for all standard boxes
* \returns PdfRect the page box * \returns PdfRect the page box
*/ */
const PdfRect GetPageBox( const char* inBox ) const; const PdfRect GetPageBox( const char* inBox ) const;
/** Private method for getting a key value that could be inherited (suc /** Method for getting a key value that could be inherited (such as the
h as the boxes, resources, etc.) boxes, resources, etc.)
* \returns PdfVariant - the result of the key fetching * \returns PdfObject - the result of the key fetching or NULL
*/ */
const PdfObject* GetInheritedKeyFromObject( const char* inKey, const Pd fObject* inObject ) const; const PdfObject* GetInheritedKeyFromObject( const char* inKey, const Pd fObject* inObject ) const;
/** Get the annotations array. /** Get the annotations array.
* \param bCreate if true the annotations array is created * \param bCreate if true the annotations array is created
* if it does not exist. * if it does not exist.
* \returns the annotations array or NULL if none exists. * \returns the annotations array or NULL if none exists.
*/ */
PdfObject* GetAnnotationsArray( bool bCreate = false ) const; PdfObject* GetAnnotationsArray( bool bCreate = false ) const;
skipping to change at line 296 skipping to change at line 305
} }
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
inline const PdfRect PdfPage::GetPageSize() const inline const PdfRect PdfPage::GetPageSize() const
{ {
return this->GetMediaBox(); return this->GetMediaBox();
} }
// -----------------------------------------------------
//
// -----------------------------------------------------
inline const PdfObject* PdfPage::GetInheritedKey( const PdfName & rName ) c
onst
{
return this->GetInheritedKeyFromObject( rName.GetName().c_str(), this->
GetObject() );
}
}; };
#endif // _PDF_PAGE_H_ #endif // _PDF_PAGE_H_
 End of changes. 8 change blocks. 
8 lines changed or deleted 27 lines changed or added


 PdfPagesTree.h   PdfPagesTree.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
*************************************************************************** / *************************************************************************** /
#ifndef _PDF_PAGES_TREE_H_ #ifndef _PDF_PAGES_TREE_H_
#define _PDF_PAGES_TREE_H_ #define _PDF_PAGES_TREE_H_
#include "PdfArray.h" #include "podofo/base/PdfDefines.h"
#include "PdfDefines.h" #include "podofo/base/PdfArray.h"
#include "PdfElement.h" #include "PdfElement.h"
#include "PdfPagesTreeCache.h" #include "PdfPagesTreeCache.h"
namespace PoDoFo { namespace PoDoFo {
class PdfObject; class PdfObject;
class PdfPage; class PdfPage;
class PdfRect; class PdfRect;
enum EPdfPageInsertionPoint { enum EPdfPageInsertionPoint {
skipping to change at line 48 skipping to change at line 49
ePdfPageInsertionPoint_InsertAllPages = -3, ePdfPageInsertionPoint_InsertAllPages = -3,
ePdfPageInsertionPoint_InsertOddPagesOnly = -4, ePdfPageInsertionPoint_InsertOddPagesOnly = -4,
ePdfPageInsertionPoint_InsertEvenPagesOnly = -5 ePdfPageInsertionPoint_InsertEvenPagesOnly = -5
}; };
/** Class for managing the tree of Pages in a PDF document /** Class for managing the tree of Pages in a PDF document
* Don't use this class directly. Use PdfDocument instead. * Don't use this class directly. Use PdfDocument instead.
* *
* \see PdfDocument * \see PdfDocument
*/ */
class PODOFO_API PdfPagesTree : public PdfElement class PODOFO_DOC_API PdfPagesTree : public PdfElement
{ {
typedef std::deque< PdfObject* > PdfObjectList; typedef std::deque< PdfObject* > PdfObjectList;
public: public:
/** Construct a new PdfPagesTree /** Construct a new PdfPagesTree
*/ */
PdfPagesTree( PdfVecObjects* pParent ); PdfPagesTree( PdfVecObjects* pParent );
/** Construct a PdfPagesTree from the root /Pages object /** Construct a PdfPagesTree from the root /Pages object
* \param pPagesRoot pointer to page tree dictionary * \param pPagesRoot pointer to page tree dictionary
skipping to change at line 106 skipping to change at line 107
* \param pPage musst be a PdfObject with type /Page * \param pPage musst be a PdfObject with type /Page
*/ */
void InsertPage( int nAfterPageNumber, PdfObject* pPage ); void InsertPage( int nAfterPageNumber, PdfObject* pPage );
/** Inserts an existing page object into the internal page tree. /** Inserts an existing page object into the internal page tree.
* after the specified page number * after the specified page number
* *
* \param nAfterPageNumber an integer specifying after what page * \param nAfterPageNumber an integer specifying after what page
* - may be one of the special values from EPdfPageInsertionPo int. * - may be one of the special values from EPdfPageInsertionPo int.
* Pages are 0 based. * Pages are 0 based.
* \param nPage a PdfPage to be inserted, the PdfPage will not get own ed by the PdfPagesTree * \param pPage a PdfPage to be inserted, the PdfPage will not get own ed by the PdfPagesTree
*/ */
void InsertPage( int nAfterPageNumber, PdfPage* pPage ); void InsertPage( int nAfterPageNumber, PdfPage* pPage );
/** Creates a new page object and inserts it into the internal /** Creates a new page object and inserts it into the internal
* page tree. * page tree.
* The returned page is owned by the pages tree and will get deleted a long * The returned page is owned by the pages tree and will get deleted a long
* with it! * with it!
* *
* \param rSize a PdfRect specifying the size of the page (i.e the /Me diaBox key) in PDF units * \param rSize a PdfRect specifying the size of the page (i.e the /Me diaBox key) in PDF units
* \returns a pointer to a PdfPage object * \returns a pointer to a PdfPage object
 End of changes. 3 change blocks. 
4 lines changed or deleted 5 lines changed or added


 PdfPagesTreeCache.h   PdfPagesTreeCache.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
*************************************************************************** / *************************************************************************** /
#ifndef _PDF_PAGES_TREE_CACHE_H_ #ifndef _PDF_PAGES_TREE_CACHE_H_
#define _PDF_PAGES_TREE_CACHE_H_ #define _PDF_PAGES_TREE_CACHE_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
namespace PoDoFo { namespace PoDoFo {
class PdfPage; class PdfPage;
/** /**
* This class implements a cache infront of a PdfPagesTree * This class implements a cache infront of a PdfPagesTree
* *
* \see PdfCachedPagesTree * \see PdfCachedPagesTree
*/ */
class PODOFO_API PdfPagesTreeCache class PODOFO_DOC_API PdfPagesTreeCache
{ {
typedef std::deque< PdfPage* > PdfPageList; typedef std::deque< PdfPage* > PdfPageList;
public: public:
/** Construct a new PdfCachedPagesTree. /** Construct a new PdfCachedPagesTree.
* *
* @param nInitialSize initial size of the pagestree * @param nInitialSize initial size of the pagestree
*/ */
PdfPagesTreeCache( int nInitialSize ); PdfPagesTreeCache( int nInitialSize );
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 PdfPainter.h   PdfPainter.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_PAINTER_H_ #ifndef _PDF_PAINTER_H_
#define _PDF_PAINTER_H_ #define _PDF_PAINTER_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfRect.h" #include "podofo/base/PdfRect.h"
#include "PdfColor.h" #include "podofo/base/PdfColor.h"
#include <sstream> #include <sstream>
namespace PoDoFo { namespace PoDoFo {
class PdfCanvas; class PdfCanvas;
class PdfExtGState; class PdfExtGState;
class PdfFont; class PdfFont;
class PdfImage; class PdfImage;
class PdfMemDocument;
class PdfName; class PdfName;
class PdfObject; class PdfObject;
class PdfReference; class PdfReference;
class PdfShadingPattern; class PdfShadingPattern;
class PdfStream; class PdfStream;
class PdfString; class PdfString;
class PdfXObject; class PdfXObject;
struct TLineElement
{
TLineElement()
: pszStart( NULL ), lLen( 0L )
{
}
const char* pszStart;
pdf_long lLen;
};
/** /**
* This class provides an easy to use painter object which allows you to dr aw on a PDF page * This class provides an easy to use painter object which allows you to dr aw on a PDF page
* object. * object.
* *
* During all drawing operations, you are still able to access the stream o f the object you are * During all drawing operations, you are still able to access the stream o f the object you are
* drawing on directly. * drawing on directly.
* *
* All functions that take coordinates expect these to be in PDF User Units . Keep in mind that PDF has * All functions that take coordinates expect these to be in PDF User Units . Keep in mind that PDF has
* its coordinate system origin at the bottom left corner. * its coordinate system origin at the bottom left corner.
*/ */
class PODOFO_API PdfPainter { class PODOFO_DOC_API PdfPainter {
public: public:
/** Create a new PdfPainter object. /** Create a new PdfPainter object.
*/ */
PdfPainter(); PdfPainter();
virtual ~PdfPainter(); virtual ~PdfPainter();
/** Set the page on which the painter should draw. /** Set the page on which the painter should draw.
* The painter will draw of course on the pages * The painter will draw of course on the pages
* contents object. * contents object.
skipping to change at line 368 skipping to change at line 380
* before using this function * before using this function
* *
* \param rRect bounding rectangle of the text * \param rRect bounding rectangle of the text
* \param rsText the text which should be drawn * \param rsText the text which should be drawn
* \param eAlignment alignment of the individual text lines in the giv en bounding box * \param eAlignment alignment of the individual text lines in the giv en bounding box
* \param eVertical vertical alignment of the text in the given boundi ng box * \param eVertical vertical alignment of the text in the given boundi ng box
*/ */
inline void DrawMultiLineText( const PdfRect & rRect, const PdfString & rsText, EPdfAlignment eAlignment = ePdfAlignment_Left, inline void DrawMultiLineText( const PdfRect & rRect, const PdfString & rsText, EPdfAlignment eAlignment = ePdfAlignment_Left,
EPdfVerticalAlignment eVertical = ePdfVe rticalAlignment_Top); EPdfVerticalAlignment eVertical = ePdfVe rticalAlignment_Top);
/** Gets the text divided into individual lines, using the current font
and clipping rectangle.
*
* \param dWidth width of the text area
* \param rsText the text which should be drawn
*/
std::vector<TLineElement> GetMultiLineTextAsLines( double dWidth, const
PdfString & rsText);
/** Draw a single line of text horizontally aligned. /** Draw a single line of text horizontally aligned.
* \param dX the x coordinate of the text line * \param dX the x coordinate of the text line
* \param dY the y coordinate of the text line * \param dY the y coordinate of the text line
* \param dWidth the width of the text line * \param dWidth the width of the text line
* \param rsText the text to draw * \param rsText the text to draw
* \param eAlignmet alignment of the text line * \param eAlignment alignment of the text line
*/ */
void DrawTextAligned( double dX, double dY, double dWidth, const PdfStr ing & rsText, EPdfAlignment eAlignment ); void DrawTextAligned( double dX, double dY, double dWidth, const PdfStr ing & rsText, EPdfAlignment eAlignment );
/** Begin drawing multiple text strings on a page using a given font ob ject. /** Begin drawing multiple text strings on a page using a given font ob ject.
* You have to call SetFont before calling this function. * You have to call SetFont before calling this function.
* *
* If you want more simpler text output and do not need * If you want more simpler text output and do not need
* the advanced text position features of MoveTextPos * the advanced text position features of MoveTextPos
* use DrawText which is easier. * use DrawText which is easier.
* *
skipping to change at line 419 skipping to change at line 438
/** Draw a string on a page. /** Draw a string on a page.
* You have to call BeginText before the first call of this function * You have to call BeginText before the first call of this function
* and EndText after the last call. * and EndText after the last call.
* *
* If you want more simpler text output and do not need * If you want more simpler text output and do not need
* the advanced text position features of MoveTextPos * the advanced text position features of MoveTextPos
* use DrawText which is easier. * use DrawText which is easier.
* *
* \param sText the text string which should be printed * \param sText the text string which should be printed
* \param lLen draw only lLen characters of pszText * \param lStringLen draw only lLen characters of pszText
* *
* \see SetFont() * \see SetFont()
* \see MoveTextPos() * \see MoveTextPos()
* \see EndText() * \see EndText()
*/ */
void AddText( const PdfString & sText, pdf_long lStringLen ); void AddText( const PdfString & sText, pdf_long lStringLen );
/** Move position for text drawing on a page. /** Move position for text drawing on a page.
* You have to call BeginText before calling this function * You have to call BeginText before calling this function
* *
skipping to change at line 455 skipping to change at line 474
* If you want more simpler text output and do not need * If you want more simpler text output and do not need
* the advanced text position features of MoveTextPos * the advanced text position features of MoveTextPos
* use DrawText which is easier. * use DrawText which is easier.
* *
* \see BeginText() * \see BeginText()
* \see AddText() * \see AddText()
* \see MoveTextPos() * \see MoveTextPos()
*/ */
void EndText(); void EndText();
/** Draw a single glyph on a page using a given font object.
* \param pDocument pointer to the document, needed to generate a c
opy of the current font
* \param dX the x coordinate
* \param dY the y coordinate
* \param pszGlyphname the name of the glyph which should be printed
*
* \see SetFont()
*/
void DrawGlyph( PdfMemDocument* pDocument, double dX, double dY, const
char * pszGlyphname );
/** Draw an image on the current page. /** Draw an image on the current page.
* \param dX the x coordinate (bottom left position of the image) * \param dX the x coordinate (bottom left position of the image)
* \param dY the y coordinate (bottom position of the image) * \param dY the y coordinate (bottom position of the image)
* \param pObject an PdfXObject * \param pObject an PdfXObject
* \param dScaleX option scaling factor in x direction * \param dScaleX option scaling factor in x direction
* \param dScaleY option scaling factor in y direction * \param dScaleY option scaling factor in y direction
*/ */
void DrawImage( double dX, double dY, PdfImage* pObject, double dSca leX = 1.0, double dScaleY = 1.0); void DrawImage( double dX, double dY, PdfImage* pObject, double dSca leX = 1.0, double dScaleY = 1.0);
/** Draw an XObject on the current page. For PdfImage use DrawImage. /** Draw an XObject on the current page. For PdfImage use DrawImage.
 End of changes. 9 change blocks. 
6 lines changed or deleted 39 lines changed or added


 PdfPainterMM.h   PdfPainterMM.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_PAINTER_MM_H_ #ifndef _PDF_PAINTER_MM_H_
#define _PDF_PAINTER_MM_H_ #define _PDF_PAINTER_MM_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfPainter.h" #include "PdfPainter.h"
namespace PoDoFo { namespace PoDoFo {
class PdfCanvas; class PdfCanvas;
class PdfFont; class PdfFont;
class PdfImage; class PdfImage;
class PdfName; class PdfName;
class PdfObject; class PdfObject;
class PdfReference; class PdfReference;
skipping to change at line 61 skipping to change at line 61
* During all drawing operations, you are still able to access the stream o f the object you are * During all drawing operations, you are still able to access the stream o f the object you are
* drawing on directly. * drawing on directly.
* *
* This painter takes all coordinates in 1/1000th mm instead of PDF units. * This painter takes all coordinates in 1/1000th mm instead of PDF units.
* *
* Developer note: we use ownership rather than inheritance here, so as to use the same * Developer note: we use ownership rather than inheritance here, so as to use the same
* methods names a PdfPainter AND avoid compiler confusion on picking the r ight one. * methods names a PdfPainter AND avoid compiler confusion on picking the r ight one.
* *
* \see PdfPainter * \see PdfPainter
*/ */
class PODOFO_API PdfPainterMM : public PdfPainter { class PODOFO_DOC_API PdfPainterMM : public PdfPainter {
public: public:
/** Create a new PdfPainterMM object. /** Create a new PdfPainterMM object.
*/ */
PdfPainterMM() {} PdfPainterMM() {}
virtual ~PdfPainterMM(); virtual ~PdfPainterMM();
/** Set the line width for all stroking operations. /** Set the line width for all stroking operations.
* \param lWidth in 1/1000th mm * \param lWidth in 1/1000th mm
*/ */
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 PdfParser.h   PdfParser.h 
skipping to change at line 350 skipping to change at line 350
* Strict parsing is by default disabled. * Strict parsing is by default disabled.
* *
* If you enable strict parsing, PoDoFo will fail * If you enable strict parsing, PoDoFo will fail
* on a few more common PDF failures. Please not * on a few more common PDF failures. Please not
* that PoDoFo's parser is by default very strict * that PoDoFo's parser is by default very strict
* already and does not recover from e.g. wrong XREF * already and does not recover from e.g. wrong XREF
* tables. * tables.
* *
* \param bStrict new setting for strict parsing mode. * \param bStrict new setting for strict parsing mode.
*/ */
inline void SetStringParsing( bool bStrict ); inline void SetStrictParsing( bool bStrict );
/** /**
* \return if broken objects are ignored while parsing * \return if broken objects are ignored while parsing
*/ */
inline bool GetIgnoreBrokenObjects(); inline bool GetIgnoreBrokenObjects();
/** /**
* Specify if the parser should ignore broken * Specify if the parser should ignore broken
* objects, i.e. XRef entries that do not point * objects, i.e. XRef entries that do not point
* to valid objects. * to valid objects.
skipping to change at line 495 skipping to change at line 495
/** Checks the magic number at the start of the pdf file /** Checks the magic number at the start of the pdf file
* and sets the m_ePdfVersion member to the correct version * and sets the m_ePdfVersion member to the correct version
* of the pdf file. * of the pdf file.
* *
* \returns true if this is a pdf file, otherwise false * \returns true if this is a pdf file, otherwise false
*/ */
bool IsPdfFile(); bool IsPdfFile();
void ReadNextTrailer(); void ReadNextTrailer();
/** Checks for the existence of the %%EOF marker at the end of the file
* When strict mode is off it will also attempt to setup the parser to
ignore
* any garbage after the last %%EOF marker
* Simply raises an error if there is a problem with the marker
*
*/
void CheckEOFMarker();
private: private:
/** Free all internal data structures /** Free all internal data structures
*/ */
void Clear(); void Clear();
/** Initializes all private members /** Initializes all private members
* with their initial values. * with their initial values.
*/ */
void Init(); void Init();
skipping to change at line 531 skipping to change at line 539
private: private:
EPdfVersion m_ePdfVersion; EPdfVersion m_ePdfVersion;
bool m_bLoadOnDemand; bool m_bLoadOnDemand;
pdf_long m_nXRefOffset; pdf_long m_nXRefOffset;
long m_nFirstObject; long m_nFirstObject;
long m_nNumObjects; long m_nNumObjects;
pdf_long m_nXRefLinearizedOffset; pdf_long m_nXRefLinearizedOffset;
size_t m_nFileSize; size_t m_nFileSize;
pdf_long m_lLastEOFOffset;
TVecOffsets m_offsets; TVecOffsets m_offsets;
PdfVecObjects* m_vecObjects; PdfVecObjects* m_vecObjects;
PdfObject* m_pTrailer; PdfObject* m_pTrailer;
PdfObject* m_pLinearization; PdfObject* m_pLinearization;
PdfEncrypt* m_pEncrypt; PdfEncrypt* m_pEncrypt;
bool m_xrefSizeUnknown; bool m_xrefSizeUnknown;
skipping to change at line 610 skipping to change at line 619
// //
// ----------------------------------------------------- // -----------------------------------------------------
bool PdfParser::IsStrictParsing() const bool PdfParser::IsStrictParsing() const
{ {
return m_bStrictParsing; return m_bStrictParsing;
} }
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
void PdfParser::SetStringParsing( bool bStrict ) void PdfParser::SetStrictParsing( bool bStrict )
{ {
m_bStrictParsing = bStrict; m_bStrictParsing = bStrict;
} }
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
bool PdfParser::GetIgnoreBrokenObjects() bool PdfParser::GetIgnoreBrokenObjects()
{ {
return m_bIgnoreBrokenObjects; return m_bIgnoreBrokenObjects;
 End of changes. 4 change blocks. 
2 lines changed or deleted 12 lines changed or added


 PdfRefCountedBuffer.h   PdfRefCountedBuffer.h 
skipping to change at line 68 skipping to change at line 68
* the reference count * the reference count
* \param rhs the PdfRefCountedBuffer to copy * \param rhs the PdfRefCountedBuffer to copy
*/ */
inline PdfRefCountedBuffer( const PdfRefCountedBuffer & rhs ); inline PdfRefCountedBuffer( const PdfRefCountedBuffer & rhs );
/** Decrease the reference count and delete the buffer /** Decrease the reference count and delete the buffer
* if this is the last owner * if this is the last owner
*/ */
inline ~PdfRefCountedBuffer(); inline ~PdfRefCountedBuffer();
/** Append to the current buffers contents. /* !Non-Doxygen comment because constructor is disabled!
* Append to the current buffers contents.
* If the buffer is referenced by another PdfRefCountedBuffer * If the buffer is referenced by another PdfRefCountedBuffer
* this object detaches from this buffer and allocates an own * this object detaches from this buffer and allocates an own
* buffer. Otherwise the internal buffer is used and resized if * buffer. Otherwise the internal buffer is used and resized if
* necessary. * necessary.
* *
* \param pszString a buffer * \param pszString a buffer
* \param lLen length of the buffer * \param lLen length of the buffer
*/ */
//void Append( const char* pszString, long lLen ); //void Append( const char* pszString, long lLen );
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added


 PdfReference.h   PdfReference.h 
skipping to change at line 127 skipping to change at line 127
/** /**
* Compare to PdfReference objects. * Compare to PdfReference objects.
* \returns true if this reference has a smaller object and generation number * \returns true if this reference has a smaller object and generation number
*/ */
PODOFO_NOTHROW inline bool operator<( const PdfReference & rhs ) const; PODOFO_NOTHROW inline bool operator<( const PdfReference & rhs ) const;
/** Set the object number of this object /** Set the object number of this object
* \param o the new object number * \param o the new object number
*/ */
PODOFO_NOTHROW inline void SetObjectNumber( pdf_uint32 o ); PODOFO_NOTHROW inline void SetObjectNumber( pdf_objnum o );
/** Get the object number. /** Get the object number.
* \returns the object number of this PdfReference * \returns the object number of this PdfReference
*/ */
PODOFO_NOTHROW inline pdf_objnum ObjectNumber() const; PODOFO_NOTHROW inline pdf_objnum ObjectNumber() const;
/** Set the generation number of this object /** Set the generation number of this object
* \param g the new generation number * \param g the new generation number
*/ */
PODOFO_NOTHROW inline void SetGenerationNumber( const pdf_uint16 g ); PODOFO_NOTHROW inline void SetGenerationNumber( const pdf_gennum g );
/** Get the generation number. /** Get the generation number.
* \returns the generation number of this PdfReference * \returns the generation number of this PdfReference
*/ */
PODOFO_NOTHROW inline pdf_gennum GenerationNumber() const; PODOFO_NOTHROW inline pdf_gennum GenerationNumber() const;
/** Allows to check if a reference points to an indirect /** Allows to check if a reference points to an indirect
* object. * object.
* *
* A reference is indirect if object number and generation * A reference is indirect if object number and generation
skipping to change at line 205 skipping to change at line 205
// //
// ----------------------------------------------------- // -----------------------------------------------------
void PdfReference::SetObjectNumber( pdf_objnum o ) void PdfReference::SetObjectNumber( pdf_objnum o )
{ {
m_nObjectNo = o; m_nObjectNo = o;
} }
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
pdf_uint32 PdfReference::ObjectNumber() const pdf_objnum PdfReference::ObjectNumber() const
{ {
return m_nObjectNo; return m_nObjectNo;
} }
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
void PdfReference::SetGenerationNumber( pdf_gennum g ) void PdfReference::SetGenerationNumber( pdf_gennum g )
{ {
m_nGenerationNo = g; m_nGenerationNo = g;
} }
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
pdf_uint16 PdfReference::GenerationNumber() const pdf_gennum PdfReference::GenerationNumber() const
{ {
return m_nGenerationNo; return m_nGenerationNo;
} }
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
bool PdfReference::IsIndirect() const bool PdfReference::IsIndirect() const
{ {
return !( !m_nObjectNo && !m_nGenerationNo ); return !( !m_nObjectNo && !m_nGenerationNo );
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 PdfShadingPattern.h   PdfShadingPattern.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_SHADING_PATTERN_H_ #ifndef _PDF_SHADING_PATTERN_H_
#define _PDF_SHADING_PATTERN_H_ #define _PDF_SHADING_PATTERN_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfName.h" #include "podofo/base/PdfName.h"
#include "PdfElement.h" #include "PdfElement.h"
namespace PoDoFo { namespace PoDoFo {
class PdfColor; class PdfColor;
class PdfObject; class PdfObject;
class PdfPage; class PdfPage;
class PdfWriter; class PdfWriter;
enum EPdfShadingPatternType { enum EPdfShadingPatternType {
skipping to change at line 49 skipping to change at line 49
ePdfShadingPatternType_FreeForm = 4, ePdfShadingPatternType_FreeForm = 4,
ePdfShadingPatternType_LatticeForm = 5, ePdfShadingPatternType_LatticeForm = 5,
ePdfShadingPatternType_CoonsPatch = 6, ePdfShadingPatternType_CoonsPatch = 6,
ePdfShadingPatternType_TensorProduct = 7 ePdfShadingPatternType_TensorProduct = 7
}; };
/** /**
* This class defined a shading pattern which can be used * This class defined a shading pattern which can be used
* to fill abitrary shapes with a pattern using PdfPainter. * to fill abitrary shapes with a pattern using PdfPainter.
*/ */
class PODOFO_API PdfShadingPattern : public PdfElement { class PODOFO_DOC_API PdfShadingPattern : public PdfElement {
public: public:
virtual ~PdfShadingPattern(); virtual ~PdfShadingPattern();
/** Returns the identifier of this ShadingPattern how it is known /** Returns the identifier of this ShadingPattern how it is known
* in the pages resource dictionary. * in the pages resource dictionary.
* \returns PdfName containing the identifier (e.g. /Sh13) * \returns PdfName containing the identifier (e.g. /Sh13)
*/ */
inline const PdfName & GetIdentifier() const; inline const PdfName & GetIdentifier() const;
protected: protected:
skipping to change at line 100 skipping to change at line 100
// //
// ----------------------------------------------------- // -----------------------------------------------------
const PdfName & PdfShadingPattern::GetIdentifier() const const PdfName & PdfShadingPattern::GetIdentifier() const
{ {
return m_Identifier; return m_Identifier;
} }
/** A shading pattern that is a simple axial /** A shading pattern that is a simple axial
* shading between two colors. * shading between two colors.
*/ */
class PODOFO_API PdfAxialShadingPattern : public PdfShadingPattern { class PODOFO_DOC_API PdfAxialShadingPattern : public PdfShadingPattern {
public: public:
/** Create an axial shading pattern /** Create an axial shading pattern
* *
* \param dX0 the starting x coordinate * \param dX0 the starting x coordinate
* \param dY0 the starting y coordinate * \param dY0 the starting y coordinate
* \param dX1 the ending x coordinate * \param dX1 the ending x coordinate
* \param dY1 the ending y coordinate * \param dY1 the ending y coordinate
* \param rStart the starting color * \param rStart the starting color
* \param rEnd the ending color * \param rEnd the ending color
* \param pParent the parent * \param pParent the parent
skipping to change at line 143 skipping to change at line 143
* \param dY1 the ending y coordinate * \param dY1 the ending y coordinate
* \param rStart the starting color * \param rStart the starting color
* \param rEnd the ending color * \param rEnd the ending color
*/ */
void Init( double dX0, double dY0, double dX1, double dY1, const PdfCol or & rStart, const PdfColor & rEnd ); void Init( double dX0, double dY0, double dX1, double dY1, const PdfCol or & rStart, const PdfColor & rEnd );
}; };
/** A shading pattern that is an 2D /** A shading pattern that is an 2D
* shading between four colors. * shading between four colors.
*/ */
class PODOFO_API PdfFunctionBaseShadingPattern : public PdfShadingPattern { class PODOFO_DOC_API PdfFunctionBaseShadingPattern : public PdfShadingPatte rn {
public: public:
/** Create an 2D shading pattern /** Create an 2D shading pattern
* *
* \param rLL the color on lower left corner * \param rLL the color on lower left corner
* \param rUL the color on upper left corner * \param rUL the color on upper left corner
* \param rLR the color on lower right corner * \param rLR the color on lower right corner
* \param rUR the color on upper right corner * \param rUR the color on upper right corner
* \param rMatrix the transformation matrix mapping the coordinate spa ce * \param rMatrix the transformation matrix mapping the coordinate spa ce
* specified by the Domain entry into the shading * specified by the Domain entry into the shading
* \param pParent the parent * \param pParent the parent
skipping to change at line 186 skipping to change at line 186
* \param rUR the color on upper right corner * \param rUR the color on upper right corner
* \param rMatrix the transformation matrix mapping the coordinate spa ce * \param rMatrix the transformation matrix mapping the coordinate spa ce
* specified by the Domain entry into the shading * specified by the Domain entry into the shading
*/ */
void Init( const PdfColor & rLL, const PdfColor & rUL, const PdfColor & rLR, const PdfColor & rUR, const PdfArray & rMatrix ); void Init( const PdfColor & rLL, const PdfColor & rUL, const PdfColor & rLR, const PdfColor & rUR, const PdfArray & rMatrix );
}; };
/** A shading pattern that is a simple radial /** A shading pattern that is a simple radial
* shading between two colors. * shading between two colors.
*/ */
class PODOFO_API PdfRadialShadingPattern : public PdfShadingPattern { class PODOFO_DOC_API PdfRadialShadingPattern : public PdfShadingPattern {
public: public:
/** Create an radial shading pattern /** Create an radial shading pattern
* *
* \param dX0 the inner circles x coordinate * \param dX0 the inner circles x coordinate
* \param dY0 the inner circles y coordinate * \param dY0 the inner circles y coordinate
* \param dR0 the inner circles radius * \param dR0 the inner circles radius
* \param dX1 the outer circles x coordinate * \param dX1 the outer circles x coordinate
* \param dY1 the outer circles y coordinate * \param dY1 the outer circles y coordinate
* \param dR1 the outer circles radius * \param dR1 the outer circles radius
* \param rStart the starting color * \param rStart the starting color
 End of changes. 5 change blocks. 
6 lines changed or deleted 6 lines changed or added


 PdfStream.h   PdfStream.h 
skipping to change at line 194 skipping to change at line 194
inline void Append( const std::string& sString ); inline void Append( const std::string& sString );
/** Finish appending data to this stream. /** Finish appending data to this stream.
* BeginAppend() has to be called before this method. * BeginAppend() has to be called before this method.
* *
* \see BeginAppend * \see BeginAppend
* \see Append * \see Append
*/ */
void EndAppend(); void EndAppend();
/**
* \returns true if code is between BeginAppend()
* and EndAppend() at the moment. I.e.
* it is save to call EndAppend now.
*
* \see BeginAppend
* \see Append
*/
inline bool IsAppending() const;
/** Get the stream's length with all filters applied (eg if the stream is /** Get the stream's length with all filters applied (eg if the stream is
* Flate compressed, the length of the compressed data stream). * Flate compressed, the length of the compressed data stream).
* *
* \returns the length of the internal buffer * \returns the length of the internal buffer
*/ */
virtual pdf_long GetLength() const = 0; virtual pdf_long GetLength() const = 0;
/** Get a malloced buffer of the current stream. /** Get a malloced buffer of the current stream.
* No filters will be applied to the buffer, so * No filters will be applied to the buffer, so
* if the stream is Flate compressed the compressed copy * if the stream is Flate compressed the compressed copy
skipping to change at line 321 skipping to change at line 331
} }
// ----------------------------------------------------- // -----------------------------------------------------
// //
// ----------------------------------------------------- // -----------------------------------------------------
void PdfStream::Append( const std::string& sString ) void PdfStream::Append( const std::string& sString )
{ {
Append( sString.c_str(), sString.length() ); Append( sString.c_str(), sString.length() );
} }
// -----------------------------------------------------
//
// -----------------------------------------------------
bool PdfStream::IsAppending() const
{
return m_bAppend;
}
}; };
#endif // _PDF_STREAM_H_ #endif // _PDF_STREAM_H_
 End of changes. 2 change blocks. 
0 lines changed or deleted 18 lines changed or added


 PdfStreamedDocument.h   PdfStreamedDocument.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_STREAMED_DOCUMENT_H_ #ifndef _PDF_STREAMED_DOCUMENT_H_
#define _PDF_STREAMED_DOCUMENT_H_ #define _PDF_STREAMED_DOCUMENT_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "podofo/base/PdfImmediateWriter.h"
#include "PdfDocument.h" #include "PdfDocument.h"
#include "PdfImmediateWriter.h"
namespace PoDoFo { namespace PoDoFo {
class PdfOutputDevice; class PdfOutputDevice;
/** PdfStreamedDocument is the preferred class for /** PdfStreamedDocument is the preferred class for
* creating new PDF documents. * creating new PDF documents.
* *
* Page contents, fonts and images are written to disk * Page contents, fonts and images are written to disk
* as soon as possible and are not kept in memory. * as soon as possible and are not kept in memory.
skipping to change at line 65 skipping to change at line 65
* PdfFont* pFont = document.CreateFont( "Arial" ); * PdfFont* pFont = document.CreateFont( "Arial" );
* *
* PdfPainter painter; * PdfPainter painter;
* painter.SetPage( pPage ); * painter.SetPage( pPage );
* painter.SetFont( pFont ); * painter.SetFont( pFont );
* painter.DrawText( 56.69, pPage->GetPageSize().GetHeight() - 56.69, "Hel lo World!" ); * painter.DrawText( 56.69, pPage->GetPageSize().GetHeight() - 56.69, "Hel lo World!" );
* painter.FinishPage(); * painter.FinishPage();
* *
* document.Close(); * document.Close();
*/ */
class PODOFO_API PdfStreamedDocument : public PdfDocument { class PODOFO_DOC_API PdfStreamedDocument : public PdfDocument {
friend class PdfImage; friend class PdfImage;
friend class PdfElement; friend class PdfElement;
public: public:
/** Create a new PdfStreamedDocument. /** Create a new PdfStreamedDocument.
* All data is written to an output device * All data is written to an output device
* immediately. * immediately.
* *
* \param pDevice an output device * \param pDevice an output device
* \param eVersion the PDF version of the document to write. * \param eVersion the PDF version of the document to write.
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 PdfString.h   PdfString.h 
skipping to change at line 271 skipping to change at line 271
inline pdf_long GetUnicodeLength() const; inline pdf_long GetUnicodeLength() const;
/** Get the number of characters in the string. /** Get the number of characters in the string.
* *
* This function returns the correct number of characters in the strin g * This function returns the correct number of characters in the strin g
* for unicode and ansi strings. Always use this method if you want to * for unicode and ansi strings. Always use this method if you want to
* know the number of characters in the string * know the number of characters in the string
* as GetLength() will returns the number of bytes used for unicode st rings! * as GetLength() will returns the number of bytes used for unicode st rings!
* *
* *
* \returngs the number of characters in the string * \returns the number of characters in the string
*/ */
inline pdf_long GetCharacterLength() const; inline pdf_long GetCharacterLength() const;
/** Write this PdfString in PDF format to a PdfOutputDevice /** Write this PdfString in PDF format to a PdfOutputDevice
* *
* \param pDevice the output device. * \param pDevice the output device.
* \param eWriteMode additional options for writing this object * \param eWriteMode additional options for writing this object
* \param pEncrypt an encryption object which is used to encrypt this object * \param pEncrypt an encryption object which is used to encrypt this object
* or NULL to not encrypt this object * or NULL to not encrypt this object
*/ */
skipping to change at line 382 skipping to change at line 382
/** Frees the internal buffer /** Frees the internal buffer
* if it was allocated using malloc * if it was allocated using malloc
*/ */
void FreeBuffer(); void FreeBuffer();
/** Construct a new PdfString from a 0 terminated /** Construct a new PdfString from a 0 terminated
* string. * string.
* The input string will be copied. * The input string will be copied.
* if m_bhex is true the copied data will be hex encoded. * if m_bhex is true the copied data will be hex encoded.
* *
* \param pszString the string to copy * \param pszString the string to copy, must not be NULL
* \param lLen length of the string data to copy * \param lLen length of the string data to copy
* *
*/ */
void Init( const char* pszString, pdf_long lLen ); void Init( const char* pszString, pdf_long lLen );
/** Construct a new PdfString from a UTF8 /** Construct a new PdfString from a UTF8
* string. * string.
* The input string will be copied and converted to UTF-16be. * The input string will be copied and converted to UTF-16be.
* *
* \param pszStringUtf8 the string to copy * \param pszStringUtf8 the string to copy, ust not be NULL
* \param lLen number of bytes of the string data to copy * \param lLen number of bytes of the string data to copy
* *
*/ */
void InitFromUtf8( const pdf_utf8* pszStringUtf8, pdf_long lLen ); void InitFromUtf8( const pdf_utf8* pszStringUtf8, pdf_long lLen );
/** Swap the bytes in the buffer (UTF16be -> UTF16le) /** Swap the bytes in the buffer (UTF16be -> UTF16le)
* \param pBuf buffer * \param pBuf buffer
* \param lLen length of buffer * \param lLen length of buffer
*/ */
static void SwapBytes( char* pBuf, pdf_long lLen ); static void SwapBytes( char* pBuf, pdf_long lLen );
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 PdfTable.h   PdfTable.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_TABLE_H_ #ifndef _PDF_TABLE_H_
#define _PDF_TABLE_H_ #define _PDF_TABLE_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "podofo/base/PdfColor.h"
#include "PdfColor.h" #include "podofo/base/PdfRect.h"
#include "PdfRect.h" #include "podofo/base/PdfString.h"
#include "PdfString.h"
#include <string.h> #include <string.h>
namespace PoDoFo { namespace PoDoFo {
class PdfCanvas; class PdfCanvas;
class PdfFont; class PdfFont;
class PdfImage; class PdfImage;
class PdfPainter; class PdfPainter;
class PdfPage; class PdfPage;
skipping to change at line 52 skipping to change at line 51
* data and formatting informations to a PdfTable. * data and formatting informations to a PdfTable.
* *
* You can implement your own PdfTableModel to supply data * You can implement your own PdfTableModel to supply data
* to a PdfTable. * to a PdfTable.
* PdfSimpleTableModel is an example of a simple model. * PdfSimpleTableModel is an example of a simple model.
* *
* *
* \see PdfTable * \see PdfTable
* \see PdfSimpleTableModel * \see PdfSimpleTableModel
*/ */
class PODOFO_API PdfTableModel { class PODOFO_DOC_API PdfTableModel {
public: public:
virtual ~PdfTableModel() {}; virtual ~PdfTableModel() {};
/** /**
* \param col the column of the table cell * \param col the column of the table cell
* \param row the row of the table cell * \param row the row of the table cell
* *
* \returns the contents string of this table cell * \returns the contents string of this table cell
*/ */
virtual PdfString GetText ( int col, int row ) const = 0; virtual PdfString GetText ( int col, int row ) const = 0;
skipping to change at line 164 skipping to change at line 163
* *
* \returns the image for the specified cell or NULL if the cell has no image * \returns the image for the specified cell or NULL if the cell has no image
*/ */
virtual PdfImage* GetImage( int col, int row ) const = 0; virtual PdfImage* GetImage( int col, int row ) const = 0;
}; };
/** /**
* An implementation of a simple PdfTableModel. * An implementation of a simple PdfTableModel.
* *
*/ */
class PODOFO_API PdfSimpleTableModel : public PdfTableModel { class PODOFO_DOC_API PdfSimpleTableModel : public PdfTableModel {
public: public:
/** Creates an empty PdfSimpleTableModel /** Creates an empty PdfSimpleTableModel
* that does not contain any data. * that does not contain any data.
* *
* Using this model will result in drawing an empty table! * Using this model will result in drawing an empty table!
*/ */
PdfSimpleTableModel(); PdfSimpleTableModel();
/** Creates an empty PdfSimpleTableModel /** Creates an empty PdfSimpleTableModel
* that does not contain any data. * that does not contain any data.
skipping to change at line 574 skipping to change at line 573
{ {
return NULL; return NULL;
} }
/** /**
* This is a high level class of a table which can be drawn to a PdfPainter . * This is a high level class of a table which can be drawn to a PdfPainter .
* *
* Use this class if you have to include data into your PDF as an table. * Use this class if you have to include data into your PDF as an table.
* *
*/ */
class PODOFO_API PdfTable { class PODOFO_DOC_API PdfTable {
public: public:
/** Callback to create a new page for PdfTable. /** Callback to create a new page for PdfTable.
* *
* \see SetAutoPageBreak * \see SetAutoPageBreak
* *
* \param rClipRect this is an output parameter which has * \param rClipRect this is an output parameter which has
* to be set to the clipping rectangle * to be set to the clipping rectangle
* of the new page. If the new page has * of the new page. If the new page has
* no clipping rectangle set it to * no clipping rectangle set it to
* PdfRect( 0, 0, PdfPage::GetPageSize().GetWidth(), PdfPage::GetPageSize().GetHeight() ) * PdfRect( 0, 0, PdfPage::GetPageSize().GetWidth(), PdfPage::GetPageSize().GetHeight() )
* \param pCustom pointer to user defined data * \param pCustom pointer to user defined data
*/ */
typedef PdfPage* (*CreatePageCallback)( PdfRect & rClipRect, void* pCus tom ); typedef PdfPage* (*CreatePageCallback)( PdfRect & rClipRect, void* pCus tom );
/** Create a new PdfTable object. /** Create a new PdfTable object.
* *
* \param nCols number of columns in the table. * \param nCols number of columns in the table.
* \paran nRows number of rows in the table. * \param nRows number of rows in the table.
*/ */
PdfTable( int nCols, int nRows ); PdfTable( int nCols, int nRows );
virtual ~PdfTable(); virtual ~PdfTable();
/** Draw the table with its current settings /** Draw the table with its current settings
* on a PdfPainter. * on a PdfPainter.
* *
* \param dX x coordinate of top left of the table * \param dX x coordinate of top left of the table
* \param dY y coordinate of top left of the table * \param dY y coordinate of top left of the table
skipping to change at line 775 skipping to change at line 774
double* pdWidths, double* pdHeights, double* pdWidths, double* pdHeights,
double* pdWidth, double* pdHeight ) const; double* pdWidth, double* pdHeight ) const;
/** Draw one row of horizontal cell borders using the correct color /** Draw one row of horizontal cell borders using the correct color
* for each cell. * for each cell.
* *
* @param nRow the current row * @param nRow the current row
* @param dX left x coordinate * @param dX left x coordinate
* @param dY y coordinate * @param dY y coordinate
* @param pPainter use this painter object * @param pPainter use this painter object
* @param pdColWidth an array containing all colomun widths * @param pdColWidths an array containing all colomun widths
*/ */
void DrawHorizontalBorders( int nRow, double dX, double dY, PdfPainter* pPainter, double* pdColWidths ); void DrawHorizontalBorders( int nRow, double dX, double dY, PdfPainter* pPainter, double* pdColWidths );
/** Checks if there is enough space on the current page /** Checks if there is enough space on the current page
* for one row! If necessary a new page is created. * for one row! If necessary a new page is created.
* *
* If GetAutoPageBreak is false, this method does nothing. * If GetAutoPageBreak is false, this method does nothing.
* *
* \param pdY top of the table * \param pdY top of the table
* \param pdCurY pointer to the current y position on the page. * \param pdCurY pointer to the current y position on the page.
 End of changes. 6 change blocks. 
10 lines changed or deleted 9 lines changed or added


 PdfTokenizer.h   PdfTokenizer.h 
skipping to change at line 63 skipping to change at line 63
PdfTokenizer(); PdfTokenizer();
PdfTokenizer( const char* pBuffer, size_t lLen ); PdfTokenizer( const char* pBuffer, size_t lLen );
PdfTokenizer( const PdfRefCountedInputDevice & rDevice, const PdfRefCou ntedBuffer & rBuffer ); PdfTokenizer( const PdfRefCountedInputDevice & rDevice, const PdfRefCou ntedBuffer & rBuffer );
virtual ~PdfTokenizer(); virtual ~PdfTokenizer();
/** Reads the next token from the current file position /** Reads the next token from the current file position
* ignoring all comments. * ignoring all comments.
* *
* \param[out] pszBuf On true return, set to a pointer to the read * \param[out] pszToken On true return, set to a pointer to the read
* token (a NULL-terminated C string). The pointer is * token (a NULL-terminated C string). The pointer is
* to memory owned by PdfTokenizer and must NOT be * to memory owned by PdfTokenizer and must NOT be
* freed. The contents are invalidated on the next * freed. The contents are invalidated on the next
* call to GetNextToken(..) and by the destruction of * call to GetNextToken(..) and by the destruction of
* the PdfTokenizer. Undefined on false return. * the PdfTokenizer. Undefined on false return.
* *
* \param[out] peType On true return, if not NULL the type of the read token * \param[out] peType On true return, if not NULL the type of the read token
* will be stored into this parameter. Undefined on false * will be stored into this parameter. Undefined on false
* return. * return.
* *
* \returns True if a token was read, false if there are no * \returns True if a token was read, false if there are no
* more tokens to read. * more tokens to read.
* *
* \see GetBuffer * \see GetBuffer
*/ */
bool GetNextToken( const char *& pszToken, EPdfTokenType* peType = NULL ); virtual bool GetNextToken( const char *& pszToken, EPdfTokenType* peTyp e = NULL);
/** Reads the next token from the current file position /** Reads the next token from the current file position
* ignoring all comments and compare the passed token * ignoring all comments and compare the passed token
* to the read token. * to the read token.
* *
* If there is no next token available, throws UnexpectedEOF. * If there is no next token available, throws UnexpectedEOF.
* *
* \param pszToken a token that is compared to the * \param pszToken a token that is compared to the
* read token * read token
* *
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 PdfVecObjects.h   PdfVecObjects.h 
skipping to change at line 259 skipping to change at line 259
*/ */
inline const TPdfReferenceList & GetFreeObjects() const; inline const TPdfReferenceList & GetFreeObjects() const;
/** /**
* Renumbers all objects according to there current position in the ve ctor. * Renumbers all objects according to there current position in the ve ctor.
* All references remain intact. * All references remain intact.
* Warning! This function is _very_ calculation intensive. * Warning! This function is _very_ calculation intensive.
* *
* \param pTrailer the trailer object * \param pTrailer the trailer object
* \param pNotDelete a list of object which must not be deleted * \param pNotDelete a list of object which must not be deleted
* \param bDoGarbageCollection enable garbage collection, which delete
s
* all objects that are not reachable from the trailer. This mi
ght be slow!
*
* \see CollectGarbage
*/ */
void RenumberObjects( PdfObject* pTrailer, TPdfReferenceSet* pNotDelete = NULL ); void RenumberObjects( PdfObject* pTrailer, TPdfReferenceSet* pNotDelete = NULL, bool bDoGarbageCollection = false );
/** Insert a object into this vector. /** Insert a object into this vector.
* Overwritten from std::vector so that * Overwritten from std::vector so that
* m_bObjectCount can be increased for each object. * m_bObjectCount can be increased for each object.
* *
* \param pObj pointer to the object you want to insert * \param pObj pointer to the object you want to insert
*/ */
void push_back( PdfObject* pObj ); void push_back( PdfObject* pObj );
/** /**
skipping to change at line 371 skipping to change at line 375
inline TCIVecObjects end() const; inline TCIVecObjects end() const;
inline PdfObject*& operator[](size_t index); inline PdfObject*& operator[](size_t index);
/** Get the last object in the vector /** Get the last object in the vector
* \returns the last object in the vector or NULL * \returns the last object in the vector or NULL
* if the vector is emtpy. * if the vector is emtpy.
*/ */
inline PdfObject* GetBack(); inline PdfObject* GetBack();
/**
* Deletes all objects that are not references by other objects
* besides the trailer (which references the root dictionary, which in
* turn should reference all other objects).
*
* \param pTrailer trailer object of the PDF
*
* Warning this might be slow!
*/
void CollectGarbage( PdfObject* pTrailer );
private: private:
/** /**
* \returns the next free object reference * \returns the next free object reference
*/ */
PdfReference GetNextFreeObject(); PdfReference GetNextFreeObject();
/** /**
* Create a list of all references that point to the object * Create a list of all references that point to the object
* for each object in this vector. * for each object in this vector.
* \param pList write all references to this list * \param pList write all references to this list
 End of changes. 3 change blocks. 
1 lines changed or deleted 18 lines changed or added


 PdfWriter.h   PdfWriter.h 
skipping to change at line 33 skipping to change at line 33
#include "PdfDefines.h" #include "PdfDefines.h"
#include "PdfOutputDevice.h" #include "PdfOutputDevice.h"
#include "PdfVecObjects.h" #include "PdfVecObjects.h"
#include "PdfEncrypt.h" #include "PdfEncrypt.h"
namespace PoDoFo { namespace PoDoFo {
class PdfDictionary; class PdfDictionary;
class PdfDocument;
class PdfName; class PdfName;
class PdfObject; class PdfObject;
class PdfPage; class PdfPage;
class PdfPagesTree; class PdfPagesTree;
class PdfParser; class PdfParser;
class PdfVecObjects; class PdfVecObjects;
class PdfXRef; class PdfXRef;
namespace NonPublic { class PdfHintStream; } namespace NonPublic { class PdfHintStream; }
skipping to change at line 60 skipping to change at line 59
* Most users will want to use PdfDocument. * Most users will want to use PdfDocument.
*/ */
class PODOFO_API PdfWriter { class PODOFO_API PdfWriter {
public: public:
/** Create a PdfWriter object from a PdfParser object /** Create a PdfWriter object from a PdfParser object
* \param pParser a pdf parser object * \param pParser a pdf parser object
*/ */
PdfWriter( PdfParser* pParser ); PdfWriter( PdfParser* pParser );
/** Create a new pdf file, based on an existing pdf file.
* \param pDocument a PdfDocument
*/
PdfWriter( PdfDocument* pDocument );
/** Create a new pdf file, from an vector of PdfObjects /** Create a new pdf file, from an vector of PdfObjects
* and a trailer object. * and a trailer object.
* \param pVecObjects the vector of objects * \param pVecObjects the vector of objects
* \param pTrailer a valid trailer object * \param pTrailer a valid trailer object
*/ */
PdfWriter( PdfVecObjects* pVecObjects, const PdfObject* pTrailer ); PdfWriter( PdfVecObjects* pVecObjects, const PdfObject* pTrailer );
virtual ~PdfWriter(); virtual ~PdfWriter();
/** Writes the complete document to a PDF file. /** Writes the complete document to a PDF file.
skipping to change at line 241 skipping to change at line 235
/** Reorder and renumber all object as required for linearized PDF file s. /** Reorder and renumber all object as required for linearized PDF file s.
* This function is very slow. * This function is very slow.
* *
* \param pLinearize linearization dictionary * \param pLinearize linearization dictionary
* \param pHint primary hint stream dictionary * \param pHint primary hint stream dictionary
* \param pPage first page to display in the document * \param pPage first page to display in the document
* \param ppLast the pointer will be initialized to the last object * \param ppLast the pointer will be initialized to the last object
* belonging to the first page * belonging to the first page
*/ */
void ReorderObjectsLinearized( PdfObject* pLinearize, NonPublic::PdfHin tStream* pHint, PdfPage* pPage, PdfObject** ppLast ) PODOFO_LOCAL; //void ReorderObjectsLinearized( PdfObject* pLinearize, NonPublic::PdfH intStream* pHint, PdfPage* pPage, PdfObject** ppLast ) PODOFO_LOCAL;
/** Initialize m_pPagesTree with its correct value /** Initialize m_pPagesTree with its correct value
* Always call this function befre accessing the pages tree. * Always call this function befre accessing the pages tree.
*/ */
void FetchPagesTree(); //void FetchPagesTree();
/** Find dependencies required for creating a linearized PDF of the cat alog dictionary. /** Find dependencies required for creating a linearized PDF of the cat alog dictionary.
*/ */
void FindCatalogDependencies( PdfObject* pCatalog, const PdfName & rNam e, TPdfReferenceList* pList, bool bWithDependencies ) PODOFO_LOCAL; //void FindCatalogDependencies( PdfObject* pCatalog, const PdfName & rN ame, TPdfReferenceList* pList, bool bWithDependencies ) PODOFO_LOCAL;
/** Fill all keys in the linearization dictionary with their values /** Fill all keys in the linearization dictionary with their values
* \param pLinearize a linearization dictionary * \param pLinearize a linearization dictionary
* \param pHint the hint stream * \param pHint the hint stream
* \param pPage the first page in the linerarized PDF file * \param pPage the first page in the linerarized PDF file
* \param pLast pointer of the last object belonging to the first page * \param pLast pointer of the last object belonging to the first page
* \param pVecXRefOffset xref table entries for previous entry * \param pVecXRefOffset xref table entries for previous entry
*/ */
// void FillLinearizationDictionary( PdfObject* pLinearize, PdfOutputDe vice* pDevice, PdfPage* pPage, PdfObject* pLast, NonPublic::PdfHintStream* pHint, TVecXRefOffset* pVecXRefOffset ) PODOFO_LOCAL; // void FillLinearizationDictionary( PdfObject* pLinearize, PdfOutputDe vice* pDevice, PdfPage* pPage, PdfObject* pLast, NonPublic::PdfHintStream* pHint, TVecXRefOffset* pVecXRefOffset ) PODOFO_LOCAL;
skipping to change at line 275 skipping to change at line 269
bool m_bXRefStream; bool m_bXRefStream;
PdfEncrypt* m_pEncrypt; ///< If not NULL encrypt all strings and streams and create an encryption dictionary in the trailer PdfEncrypt* m_pEncrypt; ///< If not NULL encrypt all strings and streams and create an encryption dictionary in the trailer
PdfObject* m_pEncryptObj; ///< Used to temporarly store the encryp tion dictionary PdfObject* m_pEncryptObj; ///< Used to temporarly store the encryp tion dictionary
PdfString m_identifier; PdfString m_identifier;
private: private:
EPdfWriteMode m_eWriteMode; EPdfWriteMode m_eWriteMode;
EPdfVersion m_eVersion; EPdfVersion m_eVersion;
PdfPagesTree* m_pPagesTree;
bool m_bLinearized; bool m_bLinearized;
/** /**
* This value is required when writing * This value is required when writing
* a linearized PDF file. * a linearized PDF file.
* It represents the offset of the whitespace * It represents the offset of the whitespace
* character before the first line in the XRef * character before the first line in the XRef
* section. * section.
*/ */
 End of changes. 6 change blocks. 
10 lines changed or deleted 3 lines changed or added


 PdfXObject.h   PdfXObject.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU Library General Public * * You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the * * License along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef _PDF_XOBJECT_H_ #ifndef _PDF_XOBJECT_H_
#define _PDF_XOBJECT_H_ #define _PDF_XOBJECT_H_
#include "PdfDefines.h" #include "podofo/base/PdfDefines.h"
#include "PdfArray.h" #include "podofo/base/PdfArray.h"
#include "PdfCanvas.h" #include "podofo/base/PdfCanvas.h"
#include "podofo/base/PdfRect.h"
#include "PdfElement.h" #include "PdfElement.h"
#include "PdfRect.h"
namespace PoDoFo { namespace PoDoFo {
class PdfDictionary; class PdfDictionary;
class PdfImageRef;
class PdfObject; class PdfObject;
class PdfMemDocument; class PdfMemDocument;
/** A XObject is a content stream with several drawing commands and data /** A XObject is a content stream with several drawing commands and data
* which can be used throughout a PDF document. * which can be used throughout a PDF document.
* *
* You can draw on a XObject like you would draw onto a page and can draw * You can draw on a XObject like you would draw onto a page and can draw
* this XObject later again using a PdfPainter. * this XObject later again using a PdfPainter.
* *
* \see PdfPainter * \see PdfPainter
*/ */
class PODOFO_API PdfXObject : public PdfElement, public PdfCanvas { class PODOFO_DOC_API PdfXObject : public PdfElement, public PdfCanvas {
public: public:
/** Create a new XObject with a specified dimension /** Create a new XObject with a specified dimension
* in a given document * in a given document
* *
* \param rRect the size of the XObject * \param rRect the size of the XObject
* \param pParent the parent document of the XObject * \param pParent the parent document of the XObject
* \param pszPrefix optional prefix for XObject-name * \param pszPrefix optional prefix for XObject-name
*/ */
PdfXObject( const PdfRect & rRect, PdfDocument* pParent, const char* ps zPrefix = NULL ); PdfXObject( const PdfRect & rRect, PdfDocument* pParent, const char* ps zPrefix = NULL );
skipping to change at line 68 skipping to change at line 68
* *
* \param rRect the size of the XObject * \param rRect the size of the XObject
* \param pParent the parent vector of the XObject * \param pParent the parent vector of the XObject
* \param pszPrefix optional prefix for XObject-name * \param pszPrefix optional prefix for XObject-name
*/ */
PdfXObject( const PdfRect & rRect, PdfVecObjects* pParent, const char* pszPrefix = NULL ); PdfXObject( const PdfRect & rRect, PdfVecObjects* pParent, const char* pszPrefix = NULL );
/** Create a new XObject from a page of another document /** Create a new XObject from a page of another document
* in a given document * in a given document
* *
* \param rDoc the document to create the XObject from * \param rSourceDoc the document to create the XObject from
* \param nPage the page-number in rDoc to create the XObject from * \param nPage the page-number in rDoc to create the XObject from
* \param pParent the parent document of the XObject * \param pParent the parent document of the XObject
* \param pszPrefix optional prefix for XObject-name * \param pszPrefix optional prefix for XObject-name
* \param bUseTrimBox if true try to use trimbox for size of xo bject * \param bUseTrimBox if true try to use trimbox for size of xo bject
*/ */
PdfXObject( const PdfMemDocument & rSourceDoc, int nPage, PdfDocument* pParent, const char* pszPrefix = NULL, bool bUseTrimBox = false ); PdfXObject( const PdfMemDocument & rSourceDoc, int nPage, PdfDocument* pParent, const char* pszPrefix = NULL, bool bUseTrimBox = false );
/** Create a XObject from an existing PdfObject /** Create a XObject from an existing PdfObject
* *
* \param pObject an existing object which has to be * \param pObject an existing object which has to be
 End of changes. 5 change blocks. 
7 lines changed or deleted 7 lines changed or added


 PdfXRefStream.h   PdfXRefStream.h 
skipping to change at line 93 skipping to change at line 93
/** Write a single entry to the XRef table /** Write a single entry to the XRef table
* *
* @param pDevice the output device to which the XRef table * @param pDevice the output device to which the XRef table
* should be written. * should be written.
* @param offset the offset of the object * @param offset the offset of the object
* @param generation the generation number * @param generation the generation number
* @param cMode the mode 'n' for object and 'f' for free objects * @param cMode the mode 'n' for object and 'f' for free objects
* @param objectNumber the object number of the currently written obje ct if cMode = 'n' * @param objectNumber the object number of the currently written obje ct if cMode = 'n'
* otherwise undefined * otherwise undefined
*/ */
virtual void WriteXRefEntry( PdfOutputDevice* pDevice, pdf_uint64 offse t, pdf_uint16 generation, virtual void WriteXRefEntry( PdfOutputDevice* pDevice, pdf_uint64 offse t, pdf_gennum generation,
char cMode, pdf_objnum objectNumber = 0 ); char cMode, pdf_objnum objectNumber = 0 );
/** Called at the end of writing the XRef table. /** Called at the end of writing the XRef table.
* Sub classes can overload this method to finish a XRef table. * Sub classes can overload this method to finish a XRef table.
* *
* @param pDevice the output device to which the XRef table * @param pDevice the output device to which the XRef table
* should be written. * should be written.
*/ */
virtual void EndWrite( PdfOutputDevice* pDevice ); virtual void EndWrite( PdfOutputDevice* pDevice );
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 PdfXRefStreamParserObject.h   PdfXRefStreamParserObject.h 
skipping to change at line 40 skipping to change at line 40
namespace PoDoFo { namespace PoDoFo {
/** /**
* A utility class for PdfParser that can parse * A utility class for PdfParser that can parse
* an XRef stream object. * an XRef stream object.
* *
* It is mainly here to make PdfParser more modular. * It is mainly here to make PdfParser more modular.
*/ */
class PdfXRefStreamParserObject : public PdfParserObject { class PdfXRefStreamParserObject : public PdfParserObject {
public: public:
/** Parse the object data from the given file handle starting at /** Parse the object data from the given file handle starting at
* the current position. * the current position.
* \param pCreator pointer to a PdfVecObjects to resolve object refere nces * \param pCreator pointer to a PdfVecObjects to resolve object refere nces
* \param rDevice an open reference counted input device which is posi tioned in * \param rDevice an open reference counted input device which is posi tioned in
* front of the object which is going to be parsed. * front of the object which is going to be parsed.
* \param rBuffer buffer to use for parsing to avoid reallocations * \param rBuffer buffer to use for parsing to avoid reallocations
* \param lOffset the position in the device from which the object sha
ll be read
* if lOffset = -1, the object will be read from the cu
rrent
* position in the file.
* \param pOffsets XRef entries are stored into this array * \param pOffsets XRef entries are stored into this array
*/ */
PdfXRefStreamParserObject(PdfVecObjects* pCreator, const PdfRefCountedI nputDevice & rDevice, PdfXRefStreamParserObject(PdfVecObjects* pCreator, const PdfRefCountedI nputDevice & rDevice,
const PdfRefCountedBuffer & rBuffer, PdfParse r::TVecOffsets* pOffsets ); const PdfRefCountedBuffer & rBuffer, PdfParse r::TVecOffsets* pOffsets );
~PdfXRefStreamParserObject(); ~PdfXRefStreamParserObject();
void Parse(); void Parse();
void ReadXRefTable(); void ReadXRefTable();
 End of changes. 2 change blocks. 
5 lines changed or deleted 1 lines changed or added


 podofo.h   podofo.h 
skipping to change at line 34 skipping to change at line 34
/** /**
* This file can be used in client applications to include * This file can be used in client applications to include
* all files required by PoDoFo at once. * all files required by PoDoFo at once.
* *
* Some symbols may be declared in the PoDoFo::NonPublic namespace. * Some symbols may be declared in the PoDoFo::NonPublic namespace.
* Client applications must never rely on or use these symbols directly. * Client applications must never rely on or use these symbols directly.
* On supporting platforms they will be excluded from the DLL interface, * On supporting platforms they will be excluded from the DLL interface,
* and they are not guaranteed to continue to exist. * and they are not guaranteed to continue to exist.
*/ */
#include "PdfVersion.h" #include "podofo-base.h"
#include "PdfDefines.h"
#include "PdfAction.h"
#include "PdfAcroForm.h"
#include "PdfAnnotation.h"
#include "PdfArray.h"
#include "PdfCanvas.h"
#include "PdfColor.h"
#include "PdfContentsTokenizer.h"
#include "PdfData.h"
#include "PdfDataType.h"
#include "PdfDate.h"
#include "PdfDestination.h"
#include "PdfDictionary.h"
#include "PdfDifferenceEncoding.h"
#include "PdfDocument.h"
#include "PdfElement.h"
#include "PdfEncoding.h"
#include "PdfEncodingFactory.h"
#include "PdfEncrypt.h"
#include "PdfError.h"
#include "PdfExtGState.h"
#include "PdfField.h"
#include "PdfFileSpec.h"
#include "PdfFilter.h"
#include "PdfFont.h"
#include "PdfFontCache.h"
#include "PdfFontFactory.h"
#include "PdfFontMetrics.h"
#include "PdfFontMetricsBase14.h"
#include "PdfFontMetricsFreetype.h"
#include "PdfFontMetricsObject.h"
#include "PdfFontTTFSubset.h"
#include "PdfFunction.h"
#include "PdfImage.h"
#include "PdfInfo.h"
#include "PdfInputDevice.h"
#include "PdfMemDocument.h"
#include "PdfMemStream.h"
#include "PdfName.h"
#include "PdfNamesTree.h"
#include "PdfObject.h"
#include "PdfObjectStreamParserObject.h"
#include "PdfOutlines.h"
#include "PdfOutputDevice.h"
#include "PdfPage.h"
#include "PdfPagesTree.h"
#include "PdfPagesTreeCache.h"
#include "PdfPainter.h"
#include "PdfPainterMM.h"
#include "PdfParser.h"
#include "PdfParserObject.h"
#include "PdfRect.h"
#include "PdfRefCountedBuffer.h"
#include "PdfRefCountedInputDevice.h"
#include "PdfShadingPattern.h"
#include "PdfStream.h"
#include "PdfStreamedDocument.h"
#include "PdfString.h"
#include "PdfTable.h"
#include "PdfTokenizer.h"
#include "PdfVariant.h"
#include "PdfVecObjects.h"
#include "PdfVersion.h"
#include "PdfWriter.h"
#include "PdfXObject.h"
#include "PdfXRef.h"
#include "PdfXRefStream.h"
#include "PdfXRefStreamParserObject.h"
#if 0 // Include files from PoDoFo-doc
#ifndef _PODOFO_NO_NAMESPACE_ #include "doc/PdfAcroForm.h"
#include "doc/PdfAction.h"
#include "doc/PdfAnnotation.h"
#include "doc/PdfContents.h"
#include "doc/PdfDestination.h"
#include "doc/PdfDifferenceEncoding.h"
#include "doc/PdfDocument.h"
#include "doc/PdfElement.h"
#include "doc/PdfEncodingObjectFactory.h"
#include "doc/PdfExtGState.h"
#include "doc/PdfField.h"
#include "doc/PdfFileSpec.h"
#include "doc/PdfFontCache.h"
#include "doc/PdfFontCID.h"
#include "doc/PdfFontFactoryBase14Data.h"
#include "doc/PdfFontFactory.h"
#include "doc/PdfFont.h"
#include "doc/PdfFontMetricsBase14.h"
#include "doc/PdfFontMetricsFreetype.h"
#include "doc/PdfFontMetrics.h"
#include "doc/PdfFontMetricsObject.h"
#include "doc/PdfFontSimple.h"
#include "doc/PdfFontTrueType.h"
#include "doc/PdfFontTTFSubset.h"
#include "doc/PdfFontType1Base14.h"
#include "doc/PdfFontType1.h"
#include "doc/PdfFunction.h"
#include "doc/PdfHintStream.h"
#include "doc/PdfIdentityEncoding.h"
#include "doc/PdfImage.h"
#include "doc/PdfInfo.h"
#include "doc/PdfMemDocument.h"
#include "doc/PdfNamesTree.h"
#include "doc/PdfOutlines.h"
#include "doc/PdfPage.h"
#include "doc/PdfPagesTreeCache.h"
#include "doc/PdfPagesTree.h"
#include "doc/PdfPainter.h"
#include "doc/PdfPainterMM.h"
#include "doc/PdfShadingPattern.h"
#include "doc/PdfSignatureField.h"
#include "doc/PdfSignOutputDevice.h"
#include "doc/PdfStreamedDocument.h"
#include "doc/PdfTable.h"
#include "doc/PdfXObject.h"
#ifdef _PODOFO_NO_NAMESPACE_
using namespace PoDoFo; using namespace PoDoFo;
#endif /* _PODOFO_NO_NAMESPACE_ */ #endif /* _PODOFO_NO_NAMESPACE_ */
#endif
#endif /* _PODOFO_H_ */ #endif /* _PODOFO_H_ */
 End of changes. 3 change blocks. 
72 lines changed or deleted 49 lines changed or added


 podofo_config.h   podofo_config.h 
skipping to change at line 12 skipping to change at line 12
/* /*
* *** THIS HEADER IS INCLUDED BY PdfCompilerCompat.h *** * *** THIS HEADER IS INCLUDED BY PdfCompilerCompat.h ***
* *** DO NOT INCLUDE DIRECTLY *** * *** DO NOT INCLUDE DIRECTLY ***
*/ */
#ifndef _PDF_COMPILERCOMPAT_H #ifndef _PDF_COMPILERCOMPAT_H
#error Please include PdfDefines.h instead #error Please include PdfDefines.h instead
#endif #endif
#define PODOFO_VERSION_MAJOR 0 #define PODOFO_VERSION_MAJOR 0
#define PODOFO_VERSION_MINOR 8 #define PODOFO_VERSION_MINOR 9
#define PODOFO_VERSION_PATCH 4 #define PODOFO_VERSION_PATCH 0
/* PoDoFo configuration options */ /* PoDoFo configuration options */
#define PODOFO_MULTI_THREAD #define PODOFO_MULTI_THREAD
/* somewhat platform-specific headers */ /* somewhat platform-specific headers */
#define PODOFO_HAVE_STRINGS_H 1 #define PODOFO_HAVE_STRINGS_H 1
#define PODOFO_HAVE_ARPA_INET_H 1 #define PODOFO_HAVE_ARPA_INET_H 1
/* #undef PODOFO_HAVE_WINSOCK2_H */ /* #undef PODOFO_HAVE_WINSOCK2_H */
/* #undef PODOFO_HAVE_MEM_H */ /* #undef PODOFO_HAVE_MEM_H */
/* #undef PODOFO_HAVE_CTYPE_H */ /* #undef PODOFO_HAVE_CTYPE_H */
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 podofoapi.h   podofoapi.h 
skipping to change at line 70 skipping to change at line 70
* __attribute__((pure)) for functions w/o side effects * __attribute__((pure)) for functions w/o side effects
* (available as PODOFO_PURE_FUNCTION) * (available as PODOFO_PURE_FUNCTION)
* *
*/ */
// Peter Petrov 26 April 2008 // Peter Petrov 26 April 2008
/* Automatically defined by CMake when building a shared library */ /* Automatically defined by CMake when building a shared library */
#if defined (podofo_EXPORTS) #if defined (podofo_EXPORTS)
#define COMPILING_SHARED_PODOFO #define COMPILING_SHARED_PODOFO
#undef USING_SHARED_PODOFO #undef USING_SHARED_PODOFO
#if defined(podofo_EXPORTS)
#define COMPILING_SHARED_PODOFO_BASE
#define COMPILING_SHARED_PODOFO_DOC
#endif
#endif #endif
/* Automatically defined by CMake when building a shared library */ /* Automatically defined by CMake when building a shared library */
//#if defined(podofo_shared_EXPORTS)
#if defined(podofo_shared_EXPORTS) #if defined(podofo_shared_EXPORTS)
#define COMPILING_SHARED_PODOFO #define COMPILING_SHARED_PODOFO
#undef USING_SHARED_PODOFO
#endif #endif
/* Sanity check - can't be both compiling and using shared podofo */ /* Sanity check - can't be both compiling and using shared podofo */
#if defined(COMPILING_SHARED_PODOFO) && defined(USING_SHARED_PODOFO) #if defined(COMPILING_SHARED_PODOFO) && defined(USING_SHARED_PODOFO)
#error "Both COMPILING_SHARED_PODOFO and USING_SHARED_PODOFO defined!" #error "Both COMPILING_SHARED_PODOFO and USING_SHARED_PODOFO defined!"
#endif #endif
/* /*
* Define COMPILING_SHARED_PODOFO when building the PoDoFo library as a * Define COMPILING_SHARED_PODOFO when building the PoDoFo library as a
* DLL. When building code that uses that DLL, define USING_SHARED_PODOFO. * DLL. When building code that uses that DLL, define USING_SHARED_PODOFO.
* *
* Building or linking to a static library does not require either * Building or linking to a static library does not require either
* preprocessor symbol. * preprocessor symbol.
*/ */
#if defined(_WIN32) #if defined(_WIN32)
#if defined(COMPILING_SHARED_PODOFO) #if defined(COMPILING_SHARED_PODOFO)
#define PODOFO_API __declspec(dllexport) #define PODOFO_API __declspec(dllexport)
#elif defined(USING_SHARED_PODOFO) #define PODOFO_DOC_API __declspec(dllexport)
#define PODOFO_API __declspec(dllimport) #elif defined(USING_SHARED_PODOFO)
#define PODOFO_API __declspec(dllimport)
#define PODOFO_DOC_API __declspec(dllimport)
#else #else
#define PODOFO_API #define PODOFO_API
#define PODOFO_DOC_API
#endif #endif
/* PODOFO_LOCAL doesn't mean anything on win32, it's to exclude /* PODOFO_LOCAL doesn't mean anything on win32, it's to exclude
* symbols from the export table with gcc4. */ * symbols from the export table with gcc4. */
#define PODOFO_LOCAL #define PODOFO_LOCAL
#else #else
#if defined(PODOFO_HAVE_GCC_SYMBOL_VISIBILITY) #if defined(PODOFO_HAVE_GCC_SYMBOL_VISIBILITY)
/* Forces inclusion of a symbol in the symbol table, so /* Forces inclusion of a symbol in the symbol table, so
software outside the current library can use it. */ software outside the current library can use it. */
#define PODOFO_API __attribute__ ((visibility("default"))) #define PODOFO_API __attribute__ ((visibility("default")))
#define PODOFO_DOC_API __attribute__ ((visibility("default")))
/* Within a section exported with PODOFO_API, forces a symbol to be /* Within a section exported with PODOFO_API, forces a symbol to be
private to the library / app. Good for private members. */ private to the library / app. Good for private members. */
#define PODOFO_LOCAL __attribute__ ((visibility("hidden"))) #define PODOFO_LOCAL __attribute__ ((visibility("hidden")))
/* Forces even stricter hiding of methods/functions. The function m ust /* Forces even stricter hiding of methods/functions. The function m ust
* absolutely never be called from outside the module even via a fu nction * absolutely never be called from outside the module even via a fu nction
* pointer.*/ * pointer.*/
#define PODOFO_INTERNAL __attribute__ ((visibility("internal"))) #define PODOFO_INTERNAL __attribute__ ((visibility("internal")))
#else #else
#define PODOFO_API #define PODOFO_API
#define PODOFO_DOC_API
#define PODOFO_LOCAL #define PODOFO_LOCAL
#define PODOFO_INTERNAL #define PODOFO_INTERNAL
#endif #endif
#endif #endif
/* Throwable classes must always be exported by all binaries when /* Throwable classes must always be exported by all binaries when
* using gcc. Marking exception classes with PODOFO_EXCEPTION_API * using gcc. Marking exception classes with PODOFO_EXCEPTION_API
* ensures this. */ * ensures this. */
#ifdef _WIN32 #ifdef _WIN32
#define PODOFO_EXCEPTION_API(api) api #define PODOFO_EXCEPTION_API(api) api
skipping to change at line 151 skipping to change at line 162
* (see CODINGSTYLE.txt) .*/ * (see CODINGSTYLE.txt) .*/
#define PODOFO_NOTHROW __attribute__((nothrow)) #define PODOFO_NOTHROW __attribute__((nothrow))
#else #else
#define PODOFO_DEPRECATED #define PODOFO_DEPRECATED
#define PODOFO_PURE_FUNCTION #define PODOFO_PURE_FUNCTION
#define PODOFO_NOTHROW __declspec(nothrow) #define PODOFO_NOTHROW __declspec(nothrow)
#endif #endif
// Peter Petrov 27 April 2008 // Peter Petrov 27 April 2008
// Disable warnings // Disable warnings
#ifdef _WIN32 #if defined(_WIN32) && defined(_MSC_VER)
#pragma warning(disable: 4251) #pragma warning(disable: 4251)
#pragma warning(disable: 4309) #pragma warning(disable: 4309)
#endif // _WIN32 #endif // _WIN32
#endif // PODOFO_API_H #endif // PODOFO_API_H
 End of changes. 8 change blocks. 
3 lines changed or deleted 14 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/