>I got it what r u saying. but i need code sample. We, the members of the iText mailing list, are here to help folks. We're not here to Do Their Jobs. What you're asking is rapidly aproaching "do my job for me".
(and now, having said that...) I'm pretty sure the whole "layers" aspect of this is simply complicating the issue. I suggest you get the object data tool working without any actual layer info, then add it in later. Yep. I blew out the layer information from Important.pdf, and the Object Data tool continued to work Just Fine. Things their structure tree has that yours lacks: 1) /Pg references their page. 2) All their /A dictionaries are either /O /Layout or /O /UserProperties WITH A /P ARRAY, even if that array is empty. Aha! Removing the /Pg reference of the first child of the StructTreeRoot broke the Object Data tool... to such an extent that Acrobat Pro 9 crashed: Steps to reproduce (Windows XP 2002 SP3, Acro pro 9.1.3): 1) Open the attached PDF (note that "Important No Layers" has layers... shrug) 2) Click on the "Model Tree" icon on the far left. NOTE: This will bring up the PAGE view 3) Click repeatedly on the displayed page -> Kaboom. 3.1) Click anywhere else once -> Kaboom --Mark Storer Senior Software Engineer Cardiff.com #include <disclaimer> typedef std::Disclaimer<Cardiff> DisCard; > -----Original Message----- > From: Amit Sinha [mailto:amit.si...@dataworld.co.in] > Sent: Wednesday, October 14, 2009 5:10 AM > To: itext-questions@lists.sourceforge.net > Subject: Re: [iText-questions] Object Data Tool doesn't recognize my > shape as an object in Marked content pdf. > > > > Hi, > I got it what r u saying. but i need code sample. i m attaching a > document. Please read it and send me some code sample. Please. > > http://www.nabble.com/file/p25889888/Quarry.doc Quarry.doc > > > > Leonard Rosenthol-3 wrote: > > > > You have confirmed what I've already told you twice. > > > > You are "tagging" your content with LAYERS (OCGs) and NOT > Properties!! > > You need to attach the structure to the content and the page. > > > > If you don't understand what I am saying, PLEASE read the PDF > > Reference/ISO 32000-1! > > > > Leonard > > > > -----Original Message----- > > From: Amit Sinha [mailto:amit.si...@dataworld.co.in] > > Sent: Wednesday, October 14, 2009 12:39 AM > > To: itext-questions@lists.sourceforge.net > > Subject: Re: [iText-questions] Object Data Tool doesn't > recognize my shape > > as an object in Marked content pdf. > > > > > > Hi, > > Thanks for reply. I am attaching my output pdf. Please > diagnose the > > problem pls. > > > > http://www.nabble.com/file/p25885220/om1.pdf om1.pdf > > > > > > > > Mark Storer-2 wrote: > >> > >> Could you post your output as well? I find it much easier > to look at a > >> document's object tree in something like RUPS when > diagnosing problems of > >> this sort. RUPS is available here: > >> > >> http://sourceforge.net/projects/itext/files/ > >> > >> Given the internal layout of "a working PDF" and "my > program's PDF", it's > >> much easier to figure out how to change my program to match. > >> > >> --Mark Storer > >> Senior Software Engineer > >> Cardiff.com > >> > >> #include <disclaimer> > >> typedef std::Disclaimer<Cardiff> DisCard; > >> > >> > >> > >>> -----Original Message----- > >>> From: Amit Sinha [mailto:amit.si...@dataworld.co.in] > >>> Sent: Tuesday, October 13, 2009 5:16 AM > >>> To: itext-questions@lists.sourceforge.net > >>> Subject: Re: [iText-questions] Object Data Tool doesn't > recognize my > >>> shape as an object in Marked content pdf. > >>> > >>> > >>> > >>> I need pdf like this attachment. > >>> http://www.nabble.com/file/p25871790/Important.pdf Important.pdf > >>> > >>> Model tree is coming fine but when i click on the element > >>> Object data tool > >>> doesn't recognize shape. > >>> Is it possible for u to give me code sample. i m very > thankful to u. > >>> http://www.nabble.com/file/p25871790/Important.pdf Important.pdf > >>> > >>> > >>> > >>> Leonard Rosenthol-3 wrote: > >>> > > >>> > You are trying to mix layers (OCGs/Optional Content) with > >>> User Properties. > >>> > Pick one. > >>> > > >>> > -----Original Message----- > >>> > From: Amit Sinha [mailto:amit.si...@dataworld.co.in] > >>> > Sent: Tuesday, October 13, 2009 7:22 AM > >>> > To: itext-questions@lists.sourceforge.net > >>> > Subject: Re: [iText-questions] Object Data Tool doesn't > >>> recognize my shape > >>> > as an object in Marked content pdf. > >>> > > >>> > > >>> > > >>> > Hi I need consulting help. What is the standerd fee for > >>> help. Please > >>> > tell me. > >>> > > >>> > I am trying to build a PDF that contains a simple graphic > >>> (square) with > >>> > two > >>> > "Object Data" properties. > >>> > When I open the resulting PDF in Acrobat the Object Data > >>> Tool doesn't > >>> > recognize my shape as an object. > >>> > > >>> > My Code is given Below. > >>> > > >>> > Document document = new Document(PageSize.A4.Rotate()); > >>> > try > >>> > { > >>> > PdfWriter writer = > >>> PdfWriter.GetInstance(document, new > >>> > FileStream(RESULT, FileMode.Create)); > >>> > > writer.SetAtLeastPdfVersion(PdfWriter.VERSION_1_7); > >>> > writer.SetTagged(); > >>> > > >>> > document.Open(); > >>> > PdfContentByte cb = writer.DirectContent; > >>> > >>> > PdfStructureTreeRoot tree = > >>> writer.StructureTreeRoot; > >>> > > >>> > PdfStructureElement MainLayer = new > >>> > PdfStructureElement(tree, new PdfName("Layers")); > >>> > PdfDictionary userpropertiesMainLayer = new > >>> > PdfDictionary(); > >>> > userpropertiesMainLayer.Put(PdfName.O, > >>> > PdfName.USERPROPERTIES); > >>> > userpropertiesMainLayer.Put(PdfName.S, new > >>> > PdfName("Figure")); > >>> > MainLayer.Put(PdfName.A, > userpropertiesMainLayer); > >>> > > >>> > PdfStructureElement eTop = new > >>> > PdfStructureElement(MainLayer, new PdfName("POI")); > >>> > PdfDictionary userpropertiesTOP = new > >>> PdfDictionary(); > >>> > userpropertiesTOP.Put(PdfName.O, > >>> PdfName.USERPROPERTIES); > >>> > userpropertiesTOP.Put(PdfName.S, new > >>> PdfName("Figure")); > >>> > eTop.Put(PdfName.A, userpropertiesTOP); > >>> > > >>> > PdfStructureElement tag = new > >>> PdfStructureElement(eTop, > >>> > new > >>> > PdfName("FIRST")); > >>> > > >>> > PdfDictionary userproperties = new > PdfDictionary(); > >>> > userproperties.Put(PdfName.O, > >>> PdfName.USERPROPERTIES); > >>> > userproperties.Put(PdfName.S, new > >>> PdfName("Figure")); > >>> > PdfArray properties = new PdfArray(); > >>> > PdfDictionary property1 = new PdfDictionary(); > >>> > property1.Put(PdfName.N, new > PdfString("Value1")); > >>> > property1.Put(PdfName.V, new > PdfString("Value2")); > >>> > properties.Add(property1); > >>> > PdfDictionary property2 = new PdfDictionary(); > >>> > property2.Put(PdfName.N, new > PdfString("Value3")); > >>> > property2.Put(PdfName.V, new > PdfString("Value4")); > >>> > properties.Add(property2); > >>> > PdfDictionary property3 = new PdfDictionary(); > >>> > property3.Put(PdfName.N, new > PdfString("Value5")); > >>> > property3.Put(PdfName.V, new > PdfString("Value6")); > >>> > properties.Add(property3); > >>> > userproperties.Put(PdfName.P, properties); > >>> > > >>> > tag.Put(PdfName.A, userproperties); > >>> > > >>> > PdfLayer Lay1 = new PdfLayer("Tag > Object", writer); > >>> > cb.BeginMarkedContentSequence(tag); > >>> > cb.BeginLayer(Lay1); > >>> > cb.SetColorFill(Color.RED); > >>> > cb.Rectangle(340f, 340f, 80f, 100f); > >>> > cb.Fill(); > >>> > cb.EndLayer(); > >>> > cb.EndMarkedContentSequence(); > >>> > > >>> > } > >>> > catch (DocumentException de) > >>> > { > >>> > > >>> > } > >>> > catch (IOException ioe) > >>> > { > >>> > > >>> > } > >>> > document.Close(); > >>> > > >>> > > >>> > Please Help me > >>> > > >>> > -- > >>> > View this message in context: > >>> > > >>> http://www.nabble.com/Object-Data-Tool-doesn%27t-recognize-my- > >>> shape-as-an-object-in-Marked-content-pdf.-tp25868117p25871090.html > >>> > Sent from the iText - General mailing list archive at > Nabble.com. > >>> > > >>> > > >>> > > >>> -------------------------------------------------------------- > >>> ---------------- > >>> > Come build with us! The BlackBerry(R) Developer > Conference in SF, CA > >>> > is the only developer event you need to attend this year. > >>> Jumpstart your > >>> > developing skills, take BlackBerry mobile applications to > >>> market and stay > >>> > ahead of the curve. Join us from November 9 - 12, 2009. > >>> Register now! > >>> > http://p.sf.net/sfu/devconference > >>> > _______________________________________________ > >>> > iText-questions mailing list > >>> > iText-questions@lists.sourceforge.net > >>> > https://lists.sourceforge.net/lists/listinfo/itext-questions > >>> > > >>> > Buy the iText book: http://www.1t3xt.com/docs/book.php > >>> > Check the site with examples before you ask questions: > >>> > http://www.1t3xt.info/examples/ > >>> > You can also search the keywords list: > >>> > http://1t3xt.info/tutorials/keywords/ > >>> > > >>> > > >>> -------------------------------------------------------------- > >>> ---------------- > >>> > Come build with us! The BlackBerry(R) Developer > Conference in SF, CA > >>> > is the only developer event you need to attend this year. > >>> Jumpstart your > >>> > developing skills, take BlackBerry mobile applications to > >>> market and stay > >>> > ahead of the curve. Join us from November 9 - 12, 2009. > >>> Register now! > >>> > http://p.sf.net/sfu/devconference > >>> > _______________________________________________ > >>> > iText-questions mailing list > >>> > iText-questions@lists.sourceforge.net > >>> > https://lists.sourceforge.net/lists/listinfo/itext-questions > >>> > > >>> > Buy the iText book: http://www.1t3xt.com/docs/book.php > >>> > Check the site with examples before you ask questions: > >>> > http://www.1t3xt.info/examples/ > >>> > You can also search the keywords list: > >>> > http://1t3xt.info/tutorials/keywords/ > >>> > > >>> > > >>> > >>> -- > >>> View this message in context: > >>> http://www.nabble.com/Object-Data-Tool-doesn%27t-recognize-my- > >> shape-as-an-object-in-Marked-content-pdf.-tp25868117p25871790.html > >> Sent from the iText - General mailing list archive at Nabble.com. > >> > >> > >> > -------------------------------------------------------------- > ---------------- > >> Come build with us! The BlackBerry(R) Developer Conference > in SF, CA > >> is the only developer event you need to attend this year. > Jumpstart your > >> developing skills, take BlackBerry mobile applications to > market and stay > >> ahead of the curve. Join us from November 9 - 12, 2009. > Register now! > >> http://p.sf.net/sfu/devconference > >> _______________________________________________ > >> iText-questions mailing list > >> iText-questions@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/itext-questions > >> > >> Buy the iText book: http://www.1t3xt.com/docs/book.php > >> Check the site with examples before you ask questions: > >> http://www.1t3xt.info/examples/ > >> You can also search the keywords list: > >> http://1t3xt.info/tutorials/keywords/ > >> > >> > -------------------------------------------------------------- > ---------------- > >> Come build with us! The BlackBerry(R) Developer Conference > in SF, CA > >> is the only developer event you need to attend this year. > Jumpstart your > >> developing skills, take BlackBerry mobile applications to > market and stay > >> ahead of the curve. Join us from November 9 - 12, 2009. > Register now! > >> http://p.sf.net/sfu/devconference > >> _______________________________________________ > >> iText-questions mailing list > >> iText-questions@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/itext-questions > >> > >> Buy the iText book: http://www.1t3xt.com/docs/book.php > >> Check the site with examples before you ask questions: > >> http://www.1t3xt.info/examples/ > >> You can also search the keywords list: > >> http://1t3xt.info/tutorials/keywords/ > >> > >> > > > > -- > > View this message in context: > > > http://www.nabble.com/Object-Data-Tool-doesn%27t-recognize-my- > shape-as-an-object-in-Marked-content-pdf.-tp25868117p25885220.html > > Sent from the iText - General mailing list archive at Nabble.com. > > > > > > > -------------------------------------------------------------- > ---------------- > > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > > is the only developer event you need to attend this year. > Jumpstart your > > developing skills, take BlackBerry mobile applications to > market and stay > > ahead of the curve. Join us from November 9 - 12, 2009. > Register now! > > http://p.sf.net/sfu/devconference > > _______________________________________________ > > iText-questions mailing list > > iText-questions@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > Buy the iText book: http://www.1t3xt.com/docs/book.php > > Check the site with examples before you ask questions: > > http://www.1t3xt.info/examples/ > > You can also search the keywords list: > > http://1t3xt.info/tutorials/keywords/ > > > > > -------------------------------------------------------------- > ---------------- > > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > > is the only developer event you need to attend this year. > Jumpstart your > > developing skills, take BlackBerry mobile applications to > market and stay > > ahead of the curve. Join us from November 9 - 12, 2009. > Register now! > > http://p.sf.net/sfu/devconference > > _______________________________________________ > > iText-questions mailing list > > iText-questions@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > Buy the iText book: http://www.1t3xt.com/docs/book.php > > Check the site with examples before you ask questions: > > http://www.1t3xt.info/examples/ > > You can also search the keywords list: > > http://1t3xt.info/tutorials/keywords/ > > > > > > -- > View this message in context: > http://www.nabble.com/Object-Data-Tool-doesn%27t-recognize-my- shape-as-an-object-in-Marked-content-pdf.-tp25868117p25889888.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
Important No Layers.pdf
Description: Important No Layers.pdf
------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference
_______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/