Fixed the logic so that all bookmarks position the PDF properly.

High Level Steps will position at the correct location on a page.
Sections and subsections wll position on the correct page.
This commit is contained in:
Rich 2014-10-29 14:05:12 +00:00
parent 1c37a32d78
commit 599fd8e483

View File

@ -551,7 +551,9 @@ namespace Volian.Print.Library
} }
else else
{ {
PdfOutline pdo = new PdfOutline(MyPdfOutlines[lev-1], pb.PdfDestination,Regex.Replace(pb.Title, @"\\{Prerequisite Step: .*?\\}", ""), false); PdfDestination dest =pb.PdfDestination;
if(dest==null) dest = new PdfDestination(PdfDestination.FIT);
PdfOutline pdo = new PdfOutline(MyPdfOutlines[lev-1], dest,Regex.Replace(pb.Title, @"\\{Prerequisite Step: .*?\\}", ""), false);
if (MyPdfOutlines.Count == lev) if (MyPdfOutlines.Count == lev)
MyPdfOutlines.Add(pdo); MyPdfOutlines.Add(pdo);
else else