/** Creates a GoTo action to an internal page.
* @param page the page to go. First page is 1
* @param dest the destination for the page
* @param writer the writer for this action
* @return a GoTo action
*/
public static PdfAction GotoLocalPage(int page, PdfDestination dest, PdfWriter writer)
{
PdfIndirectReference piref = writer.GetPageReference(page);
dest.AddPage(piref);
PdfAction action = new PdfAction();
action.Put(PdfName.S, PdfName.GOTO);
action.Put(PdfName.D, dest);
return(action);
}