Hi,.
I have to add this script http://www.sygest.it/upgrade/itext/Imball3D.js to 
this PDF http://www.sygest.it/upgrade/itext/Y00000107_u3d.pdf

with this itextSharp (5.0.6.0)  code . But the 3DD annot isn't anymore
visible in the destination file 
http://www.sygest.it/upgrade/itext/Y00000107.4D.pdf.
Can you please give me a hint ? A working example is in
http://www.sygest.it/upgrade/itext/Y00000107_differentModel.pdf.

All these file in a zipped
version:http://www.sygest.it/upgrade/itext/itext.zip

Dim pagedicFrom As PdfDictionary = New PdfDictionary
        pagedicFrom = _reader.GetPageN(PgDest)

        Dim jsFiStream As New IO.FileStream("Imball3D.js", FileMode.Open)
        Dim jsStream As PdfStream = New PdfStream(jsFiStream, _Dest.Writer)





        Dim annotarray As PdfArray = New PdfArray
        annotarray = PdfReader.GetPdfObject(pagedicFrom.Get(PdfName.ANNOTS))
        If Not (annotarray Is Nothing) Then
            Dim ArrayLen As Integer = annotarray.ArrayList.Count - 1
            For idx As Integer = 0 To ArrayLen
                If idx <= ArrayLen Then
                    Dim annotDic As PdfDictionary
                    annotDic =
PdfReader.GetPdfObject(annotarray.ArrayList(idx))
                    Dim sSubType As String =
annotDic.Get(PdfName.SUBTYPE).ToString
                    If (sSubType = "/3D") Then
                        Dim objP As PdfObject = Nothing
                        Dim DictP As PdfDictionary = Nothing
                        Dim objParent As PdfObject = Nothing
                        Dim DictParent As PdfDictionary = Nothing

                        objP = annotDic.Get(New PdfName("3DD"))
                        If Not IsNothing(objP) Then
                            DictP = PdfReader.GetPdfObjectRelease(objP)
                        End If

                        Dim AnnotationCorretta As PdfDictionary  'Annotation
destinazione nuova
                        AnnotationCorretta =
PdfReader.GetPdfObjectRelease(DictP)

                        AnnotationCorretta.Remove(New
PdfName("OnInstantiate"))
                        AnnotationCorretta.Put(New PdfName("OnInstantiate"),
jsStream)
                      
                    End If
                End If
            Next

        End If


thank you

--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Scrit-in-PDF3D-tp3444852p3444852.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
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

Reply via email to