Hi Leonard, I don't think inheritance works :( Here is example I mentioned in previous post. I replaced state3 with state2 in XObject and now Acrobat is complaining about missing ExtGS7 - which is properly defined on the page.
Regards, Igor _____ From: Leonard Rosenthol [mailto:[email protected]] To: igorg [mailto:[email protected]], [email protected] [mailto:[email protected]] Sent: Tue, 17 Feb 2009 16:52:08 -0500 Subject: RE: [Podofo-users] PdfXobject question While it SHOULD be defined in the XObject, "inheritance" will find it if you put it on the page. In your case, it's not anywhere - so you get the message from Acrobat/Reader. There may be a bug in PoDoFo today about doing resources on XObjects - do some debugging and see what you come up with... Leonard -----Original Message----- From: igorg [mailto:[email protected]] Sent: Tuesday, February 17, 2009 4:49 PM To: Leonard Rosenthol; [email protected] Subject: Re: [Podofo-users] PdfXobject question Hi Leonard, ExtGState9 is not defined on page as I'm not using it on the page, only in XObject. Even if ExtGS9 is defined on the page it would still cause the same problem as ExtGS9 is not defined in XObject. You can easily test this just by replacing "painter.SetExtGState(&state3);" with "painter.SetExtGState(&state2);" Now problem will be with ExtGS7 not defined even though it is defined on page. My question is is it possible to define ExtGState on XObject level? Thanks, Igor _____ From: Leonard Rosenthol [mailto:[email protected]] To: igorg [mailto:[email protected]], [email protected] [mailto:[email protected]] Sent: Tue, 17 Feb 2009 16:23:27 -0500 Subject: Re: [Podofo-users] PdfXobject question I think you mean page level, but there is no ExtGState9 on the page either :(. This is the type of thing that is REALLY EASY to find when you open the PDF up in a editor of some sort – even if only a text editor for viewing... Leonard On 2/17/09 4:17 PM, "igorg" <[email protected]> wrote: Yes, I know. ExtGS9 is "state3" and as I mentioned in the first post it is only defined on document level not on XObject level. Do you know how to define ExtGstate on XObject level? Thanks, Igor From: Leonard Rosenthol [mailto:[email protected]] To: igorg [mailto:[email protected]], [email protected] [mailto:[email protected]] Sent: Tue, 17 Feb 2009 16:05:41 -0500 Subject: Re: [Podofo-users] PdfXobject question Your Xobject has no resource named ExtGS9. On 2/17/09 4:01 PM, "igorg" <[email protected]> wrote: Hi Leonard, here is the PDF (attached). NOTE: If I comment out following line: painter.SetExtGState(&state3); everything works OK (except that transparency should be applied to XObject as a group not each object in XObject) Regards, Igor _____ From: Leonard Rosenthol [mailto:[email protected]] To: igorg [mailto:[email protected]], [email protected] [mailto:[email protected]] Sent: Tue, 17 Feb 2009 15:17:48 -0500 Subject: Re: [Podofo-users] PdfXobject question Post the PDF that is giving you problems... Leonard On 2/17/09 1:47 PM, "igorg" <[email protected]> wrote: 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 -- Leonard Rosenthol PDF Standards Architect Adobe Systems Incorporated -- Leonard Rosenthol PDF Standards Architect Adobe Systems Incorporated
test.pdf
Description: application/binary
------------------------------------------------------------------------------ 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
