ElementWriter.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------------------
00002 // Copyright (c) 2001-2008 by PDFTron Systems Inc. All Rights Reserved.
00003 // Consult legal.txt regarding legal and license information.    
00004 //---------------------------------------------------------------------------------------
00005 
00006 #ifndef   H_CPPPDFElementWriter
00007 #define   H_CPPPDFElementWriter
00008 
00009 #include <PDF/Page.h>
00010 #include <PDF/Element.h>
00011 #include <Common/Matrix2D.h>
00012 #include <C/PDF/TRN_ElementWriter.h>
00013 
00014 namespace pdftron { 
00015         namespace PDF {
00016 
00017 
00022 class ElementWriter
00023 {
00024 public:
00025 
00026          ElementWriter();
00027          ~ElementWriter();
00028 
00048          void Begin(const Page& page, bool background = false, bool compress = true);
00049 
00067          void Begin(SDF::SDFDoc& doc, bool compress = true);
00068 
00074          SDF::Obj End();
00075 
00079          void WriteElement(Element element);
00080 
00095          void WritePlacedElement(Element element);
00096 
00102          void Flush(); 
00103 
00109          void WriteBuffer(const char* data, int data_sz);
00110 
00115          void WriteString(const char* str);
00116 
00118         TRN_ElementWriter mp_writer;
00119          ElementWriter(TRN_ElementWriter impl);
00121 };
00122 
00123 
00124 #include <Impl/ElementWriter.inl>
00125 
00126         };      // namespace PDF
00127 };      // namespace pdftron
00128 
00129 
00130 #endif
00131 

© 2002-2008 PDFTron Systems Inc.