Hi.
I have a portfolio and i have to make some links to other documents in the
portfolio.

I've done some examples manually with acrobat and with preflight i can see a
structure like this:

http://itext-general.2136553.n4.nabble.com/file/n4094837/LinkOK.jpg 

So i've created it programmatically with itext with this code:

        Dim stamp As New PdfStamper(Reader, New
IO.FileStream("D:\sygest\jbt\out.pdf", IO.FileMode.CreateNew))
        Dim Campo As PdfFormField =
PdfFormField.CreateCheckBox(stamp.Writer)
        Campo.SetWidget(New iTextSharp.text.Rectangle(10, 10, 100, 50),
PdfAnnotation.HIGHLIGHT_INVERT)
        Campo.SetFieldFlags(PdfAnnotation.FLAGS_PRINT)
        Campo.FieldName = "prova"
        Campo.BorderStyle = New PdfBorderDictionary(1, 1)
        Campo.SetPage()
        Dim D As New PdfDestination(PdfDestination.FIT)
        D.AddFirst(New PdfNumber(6))
        Dim Tc As New collection.PdfTargetDictionary(False)
        Tc.Put(PdfName.R, PdfName.P)
        Dim Tcf As New collection.PdfTargetDictionary(False)
        Tcf.EmbeddedFileName = "<0>Link Page.pdf"
        Tcf.Put(PdfName.R, PdfName.C)
        Tc.Put(PdfName.T, Tcf)
        Dim Act As PdfAction = PdfAction.GotoEmbedded(Nothing, Tc, D, False)
        Act.Remove(PdfName.NEWWINDOW)
        Campo.Action = Act
        stamp.AddAnnotation(Campo, 2)
        stamp.Close()

And the result is like this
http://itext-general.2136553.n4.nabble.com/file/n4094837/LinkNotOK.jpg 


Then i manually put the created file in the portfolio and only the "manual
one" is working (it opens the right file at the righe page). 

The test file is available at 
http://www.sygest.it/upgrade/itext/out.pdf
http://www.sygest.it/upgrade/itext/out.pdf 
The portfolio (to be completed) file is available at
http://www.sygest.it/upgrade/itext/PIPPO.pdf
http://www.sygest.it/upgrade/itext/PIPPO.pdf 

Why the link properties are display in different way and the link is not
working ?
http://itext-general.2136553.n4.nabble.com/file/n4094837/linkopt.jpg 

Thank you.

--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/GotoEmbedded-GoToE-and-Portfolio-tp4094837p4094837.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
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