(Version sent to the list w/o PDF attachment) Bart McDonald wrote: > Craig,
> Thanks for the response. To answer your question, unfortunately not. I am > using Visual Studio 6 VC++ and am not familiar with the build utility you > referenced. Unsurprisingly. `gdb' is the GNU Debugger, a debugging tool used on UNIX/Linux platforms. Us UNIX geeks tend to assume everyone, or at least everyone doing software development, uses UNIX/Linux systems unless they say otherwise. I (thankfully) know almost nothing about VC++ 6. I've used VC++ 9 a bit and could offer general instructions on how to send a useful crash dump from that, but I understand that 6 is very different and a lot more limited. I'm not surprised you're having issues tracking down the actual fault. Possibly stupid question: Why on earth are you still using VC++6 when you can get copies of VC++9 express for free from Microsoft? Code compat issues? > I am a programmer of 15+ years but I am new to the whole open > source thing. Regretfully, I am not familiar with extracting files from svn > or anything like that. As I mentioned, it crashes when I replicate the > helloworld app into 3 pages. It crashes in the 3rd instance of CreatePage. > For that application, I use Visual Studio 2008. Here is the HelloWorld > function that crashes on the 3rd CreatePage call. Attached is a tidied up version of your test function that compiles as a self-contained test executable. That's what you should really send, by the way - something we can immediately compile and test with. When built against the current svn version of podofo ( revision 1049 ) static library with gcc 4.3.3 on my Ubuntu laptop it works fine. When built against an older svn revision (sorry, I didn't check which one) which is closer to the last release, it did fail. The issue has been fixed by Dom's rewrite of the PdfPagesTree, though. Update to the latest svn and your issue should be resolved. Subversion is a revision control system, very similar to CVS. It won't be too different to whatever you're using (Visual SourceSafe? Perforce? etc). If you're not using revision control, by the way, start yesterday. There are Subversion plugins for newer versions of Visual Studio, but you'll have to do things differently. There's a great Subversion client for Windows called TortoiseSVN which I strongly recommend that you install: http://tortoisesvn.tigris.org/ then you can just check out the latest version of PoDoFo from svn using TortoiseSVN. The SVN URL is: https://podofo.svn.sourceforge.net/svnroot/podofo/podofo/trunk We don't publish snapshot zip / tar.gz files of svn, since it's so easy to just fetch the current code from SourceForge's subversion services. -- Craig Ringer
#include <podofo/podofo.h> using namespace PoDoFo; #include <iostream> void HelloWorld( const char* pszFilename ) { PdfStreamedDocument document( pszFilename ); PdfPage* pPage; PdfPage* pPage2; PdfPage* pPage3; PdfPainter painter; PdfFont* pFont; pPage = document.CreatePage( PdfPage::CreateStandardPageSize( ePdfPageSize_Letter ) ); if( !pPage ) { PODOFO_RAISE_ERROR( ePdfError_InvalidHandle ); } painter.SetPage( pPage ); pFont = document.CreateFont( "Arial" ); if( !pFont ) { PODOFO_RAISE_ERROR( ePdfError_InvalidHandle ); } pFont->SetFontSize( 18.0 ); painter.SetFont( pFont ); painter.SetColor( 1.0, 0.0, 0.0 ); painter.DrawText( 56.69, pPage->GetPageSize().GetHeight() - 56.69, "PODOFO Software Rocks!" ); painter.FinishPage(); pPage2 = document.CreatePage( PdfPage::CreateStandardPageSize( ePdfPageSize_Letter ) ); if( !pPage2 ) { PODOFO_RAISE_ERROR( ePdfError_InvalidHandle ); } painter.SetPage( pPage2 ); pFont->SetFontSize( 18.0 ); painter.SetFont( pFont ); painter.SetColor( 1.0, 0.0, 0.0 ); painter.DrawText( 56.69, pPage2->GetPageSize().GetHeight() - 56.69, "PODOFO Software Rolls!" ); painter.FinishPage(); //<<<<< Here is where it crashes pPage3 = document.CreatePage( PdfPage::CreateStandardPageSize( ePdfPageSize_Letter ) ); if( !pPage3 ) { PODOFO_RAISE_ERROR( ePdfError_InvalidHandle ); } painter.SetPage( pPage3 ); pFont->SetFontSize( 18.0 ); painter.SetFont( pFont ); painter.SetColor( 1.0, 0.0, 0.0 ); painter.DrawText( 56.69, pPage3->GetPageSize().GetHeight() - 56.69, "PODOFO Software Rocks again!" ); painter.FinishPage(); /* * Set some additional information on the PDF file. */ document.GetInfo()->SetCreator ( PdfString("examplahelloworld - A PoDoFo test application") ); document.GetInfo()->SetAuthor ( PdfString("Dominik Seichter") ); document.GetInfo()->SetTitle ( PdfString("Hello World") ); document.GetInfo()->SetSubject ( PdfString("Testing the PoDoFo PDF Library") ); document.GetInfo()->SetKeywords( PdfString("Test;PDF;Hello World;") ); document.Close(); } int main(int argc, char * argv[]) { if (argc == 2) { HelloWorld(argv[1]); } else { std::cerr << "Usage: hello [outfile.pdf]" << std::endl; } return 0; }
------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users