Example #1
0
        /// <summary>
        /// Gets the appropriate PDFOutputFormatting based on the name
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static PDFOutputFormatting GetFormat(string name)
        {
            PDFOutputFormatting format = null;

            if (string.IsNullOrEmpty(name))
            {
                format = new PDFOutputDocumentAnyFormat(Const.DocFormat_AnyFormatName);
            }

            else if (string.Equals(Const.DocFormat_AnyFormatName, name, StringComparison.OrdinalIgnoreCase))
            {
                format = new PDFOutputDocumentAnyFormat(Const.DocFormat_AnyFormatName);
            }

            else if (string.Equals(Const.DocFormat_NoneFormatname, name, StringComparison.OrdinalIgnoreCase))
            {
                format = new PDFOutputDocumentAnyFormat(Const.DocFormat_NoneFormatname);
            }

            else
            {
                throw new PDFException(string.Format(Errors.UnknownDocumentFormat, name));
            }

            return(format);
        }
Example #2
0
 internal PDFRenderContext(DrawingOrigin origin, int pageCount, PDFOutputFormatting format, Styles.StyleStack stack, PDFItemCollection items, PDFTraceLog log, PDFPerformanceMonitor perfmon, IPDFDocument document) 
     : base(stack, items, log, perfmon, document)
 {
     this._origin = origin;
     this._offset = new PDFPoint();
     this._space = new PDFSize();
     this._pgCount = pageCount;
     this._pgindex = 0;
     this._format = format;
     
 }
Example #3
0
        //
        // .ctor
        //

        public PDFRenderContext(DrawingOrigin origin, int pageCount, PDFOutputFormatting format, Styles.Style root, PDFItemCollection items, PDFTraceLog log, PDFPerformanceMonitor perfmon, IPDFDocument document)
            : this(origin,pageCount,format, new Scryber.Styles.StyleStack(root), items, log, perfmon, document)
        {
        }
Example #4
0
 public PDFLayoutContext(Style style, PDFOutputFormatting format, PDFItemCollection items, PDFTraceLog log, PDFPerformanceMonitor perfmon, IPDFDocument document)
     : base(new StyleStack(style), items, log, perfmon, document)
 {
     this._format = format;
 }