Hi all,

I try to display an PDF page inside another document:

        PoDoFo::PdfPage* actPage = NULL;
        PoDoFo::PdfPainter painter;

        PoDoFo::PdfMemDocument actDoc1("testdoc1.pdf");
        actPage = actDoc1.GetPage(0);
        PoDoFo::PdfRect pageSize;
        if (NULL != actPage)
        {
                pageSize = actPage->GetPageSize();      
                actPage = actDoc1.CreatePage(pageSize);
                if (NULL != actPage)
                {
                        PoDoFo::PdfXObject extPDF("insertDoc.pdf", 0, &actDoc1);
                        PoDoFo::PdfRect extSize = extPDF.GetPageSize();
                        PoDoFo::PdfPainter painter;
                        painter.SetPage(actPage);
                        double angle = 90.0;
                        double radAngle = angle/(180 * 3.141592);
                        painter.Save();
                        painter.SetTransformationMatrix(cos(radAngle), 
sin(radAngle), -sin(radAngle), cos(radAngle), 0.0, 0.0);
                        painter.DrawXObject(0.0, 0.0, &extPDF);
                        painter.Restore();
                        painter.FinishPage();
                        
                        actDoc1.Write("output1.pdf");
                }
        }       

According to the PDf spec this should rotate extPDF around radAngle. But the 
transformations looks to small?

Anyone has an idea? 

Greets,

Patrik

-- 
GMX DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit 
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to