示例#1
0
        public PdfSettings Copy()
        {
            PdfSettings copy = new PdfSettings();

            copy.CompressColorAndGray = CompressColorAndGray.Copy();
            copy.CompressMonochrome   = CompressMonochrome.Copy();
            copy.Security             = Security.Copy();
            copy.Signature            = Signature.Copy();
            copy.ColorModel           = ColorModel;
            copy.DocumentView         = DocumentView;
            copy.EnablePdfAValidation = EnablePdfAValidation;
            copy.NoFonts            = NoFonts;
            copy.PageOrientation    = PageOrientation;
            copy.PageView           = PageView;
            copy.ViewerStartsOnPage = ViewerStartsOnPage;
            return(copy);
        }
示例#2
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("[CompressColorAndGray]");
            sb.AppendLine(CompressColorAndGray.ToString());
            sb.AppendLine("[CompressMonochrome]");
            sb.AppendLine(CompressMonochrome.ToString());
            sb.AppendLine("[Security]");
            sb.AppendLine(Security.ToString());
            sb.AppendLine("[Signature]");
            sb.AppendLine(Signature.ToString());
            sb.AppendLine("ColorModel=" + ColorModel.ToString());
            sb.AppendLine("DocumentView=" + DocumentView.ToString());
            sb.AppendLine("PageOrientation=" + PageOrientation.ToString());
            sb.AppendLine("PageView=" + PageView.ToString());
            sb.AppendLine("ViewerStartsOnPage=" + ViewerStartsOnPage.ToString());

            return(sb.ToString());
        }
示例#3
0
        public void ReplaceWith(PdfSettings source)
        {
            CompressColorAndGray.ReplaceWith(source.CompressColorAndGray);
            CompressMonochrome.ReplaceWith(source.CompressMonochrome);
            Security.ReplaceWith(source.Security);
            Signature.ReplaceWith(source.Signature);
            if (ColorModel != source.ColorModel)
            {
                ColorModel = source.ColorModel;
            }

            if (DocumentView != source.DocumentView)
            {
                DocumentView = source.DocumentView;
            }

            if (EnablePdfAValidation != source.EnablePdfAValidation)
            {
                EnablePdfAValidation = source.EnablePdfAValidation;
            }

            if (NoFonts != source.NoFonts)
            {
                NoFonts = source.NoFonts;
            }

            if (PageOrientation != source.PageOrientation)
            {
                PageOrientation = source.PageOrientation;
            }

            if (PageView != source.PageView)
            {
                PageView = source.PageView;
            }

            if (ViewerStartsOnPage != source.ViewerStartsOnPage)
            {
                ViewerStartsOnPage = source.ViewerStartsOnPage;
            }
        }
示例#4
0
        public void ReplaceWith(CompressMonochrome source)
        {
            if (Compression != source.Compression)
            {
                Compression = source.Compression;
            }

            if (Dpi != source.Dpi)
            {
                Dpi = source.Dpi;
            }

            if (Enabled != source.Enabled)
            {
                Enabled = source.Enabled;
            }

            if (Resampling != source.Resampling)
            {
                Resampling = source.Resampling;
            }
        }