private void TestForExistingPages(RollUpFixedDocument rollUpFixedDocument) { if (rollUpFixedDocument.BaseUri != null) { rollUpFixedDocument.CreatePagesFromSource(); } else if (rollUpFixedDocument.FixedDocument != null) { rollUpFixedDocument.CreatePagesFromFixedDocument(); } }
private void FillDocumentReference(DocumentReference documentReference, RollUpFixedDocument document) { if (document.BaseUri != null) { documentReference.Source = document.Source; (documentReference as IUriContext).BaseUri = document.BaseUri; } else if (document.FixedDocument != null) { documentReference.SetDocument(document.FixedDocument); } else { AddPages(documentReference, document); } }
private void AddPages(DocumentReference documentReference, RollUpFixedDocument document) { var fixedDocument = new FixedDocument(); documentReference.SetDocument(fixedDocument); foreach (var page in document.Pages) { var pageContent = new PageContent(); if (page.BaseUri == null) { ((IAddChild)pageContent).AddChild(page.FixedPage); } else { pageContent.Source = page.Source; ((IUriContext)pageContent).BaseUri = page.BaseUri; } pageContent.GetPageRoot(true); fixedDocument.Pages.Add(pageContent); } }
private void AddPages(DocumentReference documentReference, RollUpFixedDocument document) { var fixedDocument = new FixedDocument(); documentReference.SetDocument(fixedDocument); foreach (var page in document.Pages) { var pageContent = new PageContent(); if (page.BaseUri == null) { ((IAddChild) pageContent).AddChild(page.FixedPage); } else { pageContent.Source = page.Source; ((IUriContext) pageContent).BaseUri = page.BaseUri; } pageContent.GetPageRoot(true); fixedDocument.Pages.Add(pageContent); } }