public Superpage(XPdfForm form, uint startPage, uint numPages, ISuperpageLayout layout)
        {
            subpages = new List<Subpage>();
            for (uint i = 0; i < numPages; i++) {
                subpages.Add(new Subpage(form, startPage + i, layout.GetSubpageLayout(i)));
            }

            this.layout = layout;
        }
        public static IList<Superpage> Layout(XPdfForm form, ISuperpageLayout layout)
        {
            var superpages = new List<Superpage>();
            for (uint start = 0; start < form.PageCount; start += layout.Count) {
                var numPages = (uint)Math.Min(layout.Count, form.PageCount - start);
                superpages.Add(new Superpage(form, start, numPages, layout));
            }

            return superpages;
        }
 public PocketModDocument(string fileName, ISuperpageLayout layout)
 {
     superpages = Superpage.Layout(XPdfForm.FromFile(fileName), layout);
 }