void PagesTreeTest::CreateTestTreePoDoFo( PoDoFo::PdfMemDocument & rDoc ) { for(int i=0; i<PODOFO_TEST_NUM_PAGES; i++) { PdfPage* pPage = rDoc.CreatePage( PdfPage::CreateStandardPageSize( ePdfPageSize_A4 ) ); pPage->GetObject()->GetDictionary().AddKey( PODOFO_TEST_PAGE_KEY, static_cast<long long>(i) ); CPPUNIT_ASSERT_EQUAL( rDoc.GetPageCount(), i + 1 ); } }
BoxSetter::BoxSetter(const std::string& in, const std::string& out, const std::string& box, const PoDoFo::PdfRect& rect) :m_box(box), m_rect(rect) { PoDoFo::PdfMemDocument* source = new PoDoFo::PdfMemDocument(in.c_str()); int pcount(source->GetPageCount()); for ( int i = 0; i < pcount ; ++i ) { SetBox(source->GetPage ( i )); } source->Write(out.c_str()); }