Esempio n. 1
0
 private void TestForExistingPages(RollUpFixedDocument rollUpFixedDocument)
 {
     if (rollUpFixedDocument.BaseUri != null)
     {
         rollUpFixedDocument.CreatePagesFromSource();
     }
     else if (rollUpFixedDocument.FixedDocument != null)
     {
         rollUpFixedDocument.CreatePagesFromFixedDocument();
     }
 }
Esempio n. 2
0
 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);
     }
 }
Esempio n. 3
0
        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);
            }
        }
Esempio n. 4
0
 private void TestForExistingPages(RollUpFixedDocument rollUpFixedDocument)
 {
     if (rollUpFixedDocument.BaseUri != null)
     {
         rollUpFixedDocument.CreatePagesFromSource();
     }
     else if (rollUpFixedDocument.FixedDocument != null)
     {
         rollUpFixedDocument.CreatePagesFromFixedDocument();
     }
 }
Esempio n. 5
0
 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);
     }
 }
Esempio n. 6
0
 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);
     }
 }