예제 #1
0
 private void TestForExistingPages(RollUpFixedDocument rollUpFixedDocument)
 {
     if (rollUpFixedDocument.BaseUri != null)
     {
         rollUpFixedDocument.CreatePagesFromSource();
     }
     else if (rollUpFixedDocument.FixedDocument != null)
     {
         rollUpFixedDocument.CreatePagesFromFixedDocument();
     }
 }
예제 #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);
     }
 }
예제 #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);
            }
        }
예제 #4
0
 private void TestForExistingPages(RollUpFixedDocument rollUpFixedDocument)
 {
     if (rollUpFixedDocument.BaseUri != null)
     {
         rollUpFixedDocument.CreatePagesFromSource();
     }
     else if (rollUpFixedDocument.FixedDocument != null)
     {
         rollUpFixedDocument.CreatePagesFromFixedDocument();
     }
 }
예제 #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);
     }
 }
예제 #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);
     }
 }