Hello everyone,
I have problems using PdfXObject in my sample. It creates PDF file but file
cannot be opened in Adobe Reader. Problem is that if I use state in XObject
when file i created that state is not defined in XObject level just on document
level. What I'm doing wrong? Here is the code:
==========================
PdfStreamedDocument document( "c:\\test.pdf" );
PdfPage* pPage;
PdfPainter painter, painter2;
pPage = document.CreatePage( PdfPage::CreateStandardPageSize(
ePdfPageSize_Letter ) );
if( pPage )
{
PdfExtGState state1(&document);
state1.SetFillOpacity(.5);
PdfExtGState state2(&document);
state2.SetFillOpacity(1);
PdfRect myRect(0,0,300,300);
PdfXObject pdfXO(myRect,&document);
PdfExtGState state3(&document);
state3.SetFillOpacity(1);
painter.SetPage( &pdfXO );
painter.SetExtGState(&state3);
painter.SetColor(0,0,1);
painter.FillRect(150,150,120,120);
painter.SetColor(0,1,0);
painter.FillRect(250,250,100,100);
painter.FinishPage();
painter.SetPage( pPage );
painter.SetExtGState(&state2);
painter.SetColor(1,0,0);
painter.FillRect(200,200,100,100);
painter.SetExtGState(&state1);
painter.DrawXObject(100,100,&pdfXO);
painter.FinishPage();
}
document.Close();
==========================
Regards,
Igor------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users