Ejemplo n.º 1
0
        //--------------------------------------------------------------------------------------------------

        public PdfDom3DAnnotation(PdfDomDocument document, double[] rect, PdfDomStream stream)
            : base(document, "3D", rect)
        {
            document.Version = PdfVersion.PDF_1_6;

            _Stream           = stream;
            Attributes["3DD"] = stream;
        }
Ejemplo n.º 2
0
        //--------------------------------------------------------------------------------------------------

        MemoryStream _Export(Drawing drawing)
        {
            _Document       = new PdfDomDocument();
            _Page           = _Document.AddPage();
            _Content        = _Page.AddContent();
            _ContentBuilder = new PdfContentBuilder();

            var aabb = drawing.GetBoundingBox();

            if (!aabb.IsVoid())
            {
                double xmin = 0, xmax = 0, ymin = 0, ymax = 0;
                aabb.Get(ref xmin, ref ymin, ref xmax, ref ymax);
                _Page.MediaBox = new[] { xmin, ymin, xmax, ymax };
            }

            // Export
            drawing.Render(this);

            var stream = _Document.WriteToStream();

            _Document = null;
            return(stream);
        }
Ejemplo n.º 3
0
        //--------------------------------------------------------------------------------------------------

        public PdfDomFontDescriptor(PdfDomDocument document)
            : base(document, "FontDescriptor")
        {
            _FontStream = new PdfDomStream(document, "");
        }