Hi podofo developers;
Thanks for the open source pdf project.
when the was  compiling  with podofo_config.h and test.cpp, result "test.pdf" 
is include wrong data.

podofo_config.h
-------------------------------------------------------------------------------------------------
#define PODOFO_VERSION_MAJOR @PODOFO_VERSION_MAJOR@
#define PODOFO_VERSION_MINOR @PODOFO_VERSION_MINOR@
#define PODOFO_VERSION_PATCH @PODOFO_VERSION_PATCH@

/* PoDoFo configuration options */
#define PODOFO_MULTI_THREAD

#define PODOFO_HAVE_STRINGS_H 0
#define PODOFO_HAVE_ARPA_INET_H 0
#define PODOFO_HAVE_WINSOCK2_H 1
#define PODOFO_HAVE_MEM_H 0
#define PODOFO_HAVE_CTYPE_H 1

#define PODOFO_HAVE_STDINT_H 1
#define PODOFO_HAVE_BASETSD_H 1 
#define PODOFO_HAVE_SYS_TYPES_H 1
/* Integer types - type names */
#define PDF_INT8_TYPENAME   char
#define PDF_INT16_TYPENAME  short
#define PDF_INT32_TYPENAME  int
#define PDF_INT64_TYPENAME  long
#define PDF_UINT8_TYPENAME  unsigned char
#define PDF_UINT16_TYPENAME unsigned short
#define PDF_UINT32_TYPENAME unsigned int
#define PDF_UINT64_TYPENAME unsigned long

#define TEST_BIG

/* Libraries */
#define PODOFO_HAVE_JPEG_LIB
#define PODOFO_HAVE_PNG_LIB
#define PODOFO_HAVE_TIFF_LIB
-------------------------------------------------------------------------------------------------

and with test.cpp
-------------------------------------------------------------------------------------------------
#include <podofo/podofo.h>
using namespace PoDoFo;
int main(void)
{
    char *bytes;
    PdfRefCountedBuffer *buf=new PdfRefCountedBuffer();
    PdfOutputDevice *od=new PdfOutputDevice(buf);
    PdfStreamedDocument document(od);
     PdfPainter painter;
     PdfPage* pPage;
     pPage = document.CreatePage(PdfPage::CreateStandardPageSize( 
ePdfPageSize_A4 ));
     if( !pPage ) 
        PODOFO_RAISE_ERROR( ePdfError_InvalidHandle );
     painter.SetPage( pPage );
     painter.FinishPage();
     document.Close();
     FILE *file=fopen("d:/test.pdf","wb");
     fwrite(buf->GetBuffer(),1,buf->GetSize(),file);
     fclose(file);
-------------------------------------------------------------------------------------------------

test.pdf
-------------------------------------------------------------------------------------------------
%PDF-1.3
%âãÏÓ
5 0 obj<</Filter/FlateDecode/Length 6 0 R>>
stream
xœETXNULNULNULNULSOH
endstream
endobj
1 0 obj<</Type/Catalog/Pages 3 0 R>>
endobj
2 0 obj<</CreationDate(D:20121227105251+02'00')/Producer(PoDoFo - 
http://podofo.sf.net)>>
endobj
3 0 obj<</Type/Pages/Count 5866656152145625089/Kids[ 4 0 R]>>
endobj
4 0 obj<</Type/Page/Contents 5 0 R/MediaBox[ 0.000000 0.000000 595.000000 
842.000000]/Parent 3 0 R/Resources<</ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>>>
endobj
6 0 obj 5866653094128910344
endobj
xref
0 7
281470681743360 00102 ¸ 
0000000092 00110 ¸ 
0000000136 00110 ¸ 
0000000233 00110 ¸ 
0000000302 00110 ¸ 
0000000015 00110 ¸ 
0000000464 00110 ¸ 
trailer
<</ID[<7C7384EF75BCEB3C5C48030CD58F0E33><7C7384EF75BCEB3C5C48030CD58F0E33>]/Info
 2 0 R/Root 1 0 R/Size 5866657990391627783>>
startxref
499
%%EOF
-------------------------------------------------------------------------------------------------

                                          
------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to