PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Jul 01, 2024 10:14 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: pdf links
PostPosted: Sat Mar 05, 2011 1:22 pm 
Offline

Joined: Fri Mar 04, 2011 1:28 pm
Posts: 4
Hi all I have created Link below is the code

public void AddPdfPage(int idx)
{
page = inputDocument1.Pages[idx];
page = outputDocument.AddPage(page);
gfx = XGraphics.FromPdfPage(page);
}

public void AddLinksFirstPage(string strText, string strPageText, int intLPage, int index, int intSelWidth)
{
font = new XFont("Arial", 11, XFontStyle.Regular | XFontStyle.Underline);
link = gfx.Transformer.WorldToDefaultPage(new XRect(new XPoint(70, 100 + (index * 20)), new XSize(530, 15 * intSelWidth)));
lin = new PdfRectangle(link);

gfx.DrawString(strText, font, XBrushes.Blue, 70, 100 + (index * 20), XStringFormat.TopLeft);
font = new XFont("Arial", 11, XFontStyle.Regular);
gfx.DrawString(strPageText.PadLeft(10), font, XBrushes.Blue, 530, 100 + (index * 20), XStringFormat.TopCenter);

page.AddDocumentLink(lin, intLPage);
}

this call for multiples pages

i hope the problem is at
Elements[Keys.Dest] = new PdfLiteral("[{0} 0 R/XYZ null 0 null 0]", dest.ObjectNumber);

but when kept "XYZ null null 0" with "FITB" working, i need inherit mode.

any feedback will be great.

Thanks
Nagarjuna


Attachments:
File comment: focus to 26 page
Third.JPG
Third.JPG [ 156.36 KiB | Viewed 3894 times ]
File comment: click on index with page focus to 7
Second.JPG
Second.JPG [ 152.78 KiB | Viewed 3894 times ]
File comment: generated pdf
First.JPG
First.JPG [ 150.56 KiB | Viewed 3894 times ]
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 47 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group