Hi,
I am trying to use the ImportedPage function. However I am getting an "indexoutofrangeexception was unhandled by user code" error. I am also getting the same error with the ImportedPageData function. Here is my code.
1.
// Create a PDF Document
Document document = new Document();
// Create an ImportedPage and add it to the document
ImportedPage page = new ImportedPage(@"C:\TaskOrder.pdf", 2);
document.Pages.Add(page);
// Outputs the document to the current web page
document.DrawToWeb();
2.
// Create a Page and add it to the document
ceTe.DynamicPDF.Page page = new ceTe.DynamicPDF.Page();
document.Pages.Add(page);
// Create an ImportedPageData and add it to the page
ImportedPageData data = new ImportedPageData(@"C:\TaskOrder.pdf", 2, -200, -100, 0.24f);
page.Elements.Add(data);
// Save the PDF
document.Draw(@"C:\MyDocument.pdf");
IndexOutofRangeException
Re: IndexOutofRangeException
Support · Aug 11, 2008Hello,
You can use the MergeDocument object and pass the filepath in the constructor. You can also specify which page you want to merge. Following is the sample code:
MergeDocument document = new MergeDocument((@"C:\TaskOrder.pdf", 2, 1);
// Create a page and add it to the document
ceTe.DynamicPDF.Page page = new ceTe.DynamicPDF.Page();
document.Pages.Add(page);
document.DrawToWeb();
Thanks,
ceTe Software Support Team
Re: IndexOutofRangeException
Forum member · Aug 11, 2008That worked.
Thanks,
Joe