Hi. I have a PDF3D file exported from a CAD program. I have to get U3D model in a new PDF. Following the tea Pot examples i can inflate the U3d stream, the right matrix , my problem is on the "preview" . I can't get the PdfAppearance to work. this is the source PDF dictionary. <http://itext-general.2136553.n4.nabble.com/file/n4659343/Immagine.png> this is the code i use to import image and create Appearance...
Dim ap As PdfAppearance = _Dest.GetOverContent(1).CreateAppearance(rect.Width(), rect.Height()) Dim NodoImm As XmlNode = xDom.SelectSingleNode("/XML/node[@name='AP']/node[@name='N']/node[@name='Resources']/node[@name='XObject']/node[@name='Im0']/Binary_stream") If Not IsNothing(NodoImm) AndAlso Not IsNothing(NodoImm.ChildNodes(0)) Then Dim NodoMatrice As XmlNode = xDom.SelectSingleNode("/XML/node[@name='AP']/node[@name='N']/node[@name='Matrix']") Dim pdfa As PdfArray = _3dStrToPdfNumberArray(NodoMatrice.ChildNodes(0).Value) Dim imgb() As Byte = System.Convert.FromBase64String(NodoImm.ChildNodes(0).Value) Dim img As iTextSharp.text.Image = iTextSharp.text.Image.GetInstance(imgb) Dim m As New System.Drawing.Drawing2D.Matrix(Val(pdfa.ArrayList(0).ToString), Val(pdfa.ArrayList(1).ToString), Val(pdfa.ArrayList(2).ToString), Val(pdfa.ArrayList(3).ToString), Val(pdfa.ArrayList(4).ToString), Val(pdfa.ArrayList(5).ToString)) ap.AddImage(img, m) 'Dim dict As PdfDictionary = ap.Additional 'dict.Put(PdfName.NAME, New PdfName("X")) End If ' annot.SetAppearance(PdfAnnotation.APPEARANCE_NORMAL, ap) this is the dictionary of PDF generated <http://itext-general.2136553.n4.nabble.com/file/n4659343/Immagine_mia.png> The difference are: ProcSet and Metadata ? Is this the problem ? -- View this message in context: http://itext-general.2136553.n4.nabble.com/U3D-and-PdfAppearance-tp4659343.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php