Ejemplo n.º 1
0
 public void StoreValues(Data data, string path)
 {
     CompressColorAndGray.StoreValues(data, path + @"CompressColorAndGray\");
     CompressMonochrome.StoreValues(data, path + @"CompressMonochrome\");
     Security.StoreValues(data, path + @"Security\");
     Signature.StoreValues(data, path + @"Signature\");
     data.SetValue(@"" + path + @"ColorModel", ColorModel.ToString());
     data.SetValue(@"" + path + @"DocumentView", DocumentView.ToString());
     data.SetValue(@"" + path + @"FastWebView", FastWebView.ToString());
     data.SetValue(@"" + path + @"PageOrientation", PageOrientation.ToString());
     data.SetValue(@"" + path + @"PageView", PageView.ToString());
     data.SetValue(@"" + path + @"ViewerStartsOnPage", ViewerStartsOnPage.ToString(CultureInfo.InvariantCulture));
 }
Ejemplo n.º 2
0
        public override bool Equals(object o)
        {
            if (!(o is PdfSettings))
            {
                return(false);
            }
            PdfSettings v = o as PdfSettings;

            if (!CompressColorAndGray.Equals(v.CompressColorAndGray))
            {
                return(false);
            }
            if (!CompressMonochrome.Equals(v.CompressMonochrome))
            {
                return(false);
            }
            if (!Security.Equals(v.Security))
            {
                return(false);
            }
            if (!Signature.Equals(v.Signature))
            {
                return(false);
            }
            if (!ColorModel.Equals(v.ColorModel))
            {
                return(false);
            }
            if (!DocumentView.Equals(v.DocumentView))
            {
                return(false);
            }
            if (!FastWebView.Equals(v.FastWebView))
            {
                return(false);
            }
            if (!PageOrientation.Equals(v.PageOrientation))
            {
                return(false);
            }
            if (!PageView.Equals(v.PageView))
            {
                return(false);
            }
            if (!ViewerStartsOnPage.Equals(v.ViewerStartsOnPage))
            {
                return(false);
            }

            return(true);
        }
        /// <summary>
        /// Returns true if ImageSaveAsPDFMRCParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of ImageSaveAsPDFMRCParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ImageSaveAsPDFMRCParameters input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     FileId == input.FileId ||
                     (FileId != null &&
                      FileId.Equals(input.FileId))
                     ) &&
                 (
                     PageRange == input.PageRange ||
                     (PageRange != null &&
                      PageRange.Equals(input.PageRange))
                 ) &&
                 (
                     Conformance == input.Conformance ||
                     Conformance.Equals(input.Conformance)
                 ) &&
                 (
                     ColorImageCompression == input.ColorImageCompression ||
                     ColorImageCompression.Equals(input.ColorImageCompression)
                 ) &&
                 (
                     BitonalImageCompression == input.BitonalImageCompression ||
                     BitonalImageCompression.Equals(input.BitonalImageCompression)
                 ) &&
                 (
                     ImageQuality == input.ImageQuality ||
                     ImageQuality.Equals(input.ImageQuality)
                 ) &&
                 (
                     DownscaleResolution == input.DownscaleResolution ||
                     DownscaleResolution.Equals(input.DownscaleResolution)
                 ) &&
                 (
                     PreserveSmoothing == input.PreserveSmoothing ||
                     PreserveSmoothing.Equals(input.PreserveSmoothing)
                 ) &&
                 (
                     FastWebView == input.FastWebView ||
                     FastWebView.Equals(input.FastWebView)
                 ) &&
                 (
                     JBIG2PMSThreshold == input.JBIG2PMSThreshold ||
                     JBIG2PMSThreshold.Equals(input.JBIG2PMSThreshold)
                 ));
        }
Ejemplo n.º 4
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("FastWebView=" + FastWebView.ToString());
            sb.AppendLine("PageOrientation=" + PageOrientation.ToString());
            sb.AppendLine("PageView=" + PageView.ToString());
            sb.AppendLine("ViewerStartsOnPage=" + ViewerStartsOnPage.ToString());

            return(sb.ToString());
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (FileId != null)
         {
             hashCode = hashCode * 59 + FileId.GetHashCode();
         }
         hashCode = hashCode * 59 + OutputVersion.GetHashCode();
         hashCode = hashCode * 59 + ImageQuality.GetHashCode();
         hashCode = hashCode * 59 + RecompressImages.GetHashCode();
         hashCode = hashCode * 59 + EnableColorDetection.GetHashCode();
         hashCode = hashCode * 59 + PackDocument.GetHashCode();
         hashCode = hashCode * 59 + PackFonts.GetHashCode();
         hashCode = hashCode * 59 + DownscaleImages.GetHashCode();
         hashCode = hashCode * 59 + DownscaleResolution.GetHashCode();
         hashCode = hashCode * 59 + FastWebView.GetHashCode();
         hashCode = hashCode * 59 + RemoveFormFields.GetHashCode();
         hashCode = hashCode * 59 + RemoveAnnotations.GetHashCode();
         hashCode = hashCode * 59 + RemoveBookmarks.GetHashCode();
         hashCode = hashCode * 59 + RemoveHyperlinks.GetHashCode();
         hashCode = hashCode * 59 + RemoveEmbeddedFiles.GetHashCode();
         hashCode = hashCode * 59 + RemoveBlankPages.GetHashCode();
         hashCode = hashCode * 59 + RemoveJavaScript.GetHashCode();
         hashCode = hashCode * 59 + EnableJPEG2000.GetHashCode();
         hashCode = hashCode * 59 + EnableJBIG2.GetHashCode();
         hashCode = hashCode * 59 + EnableCharRepair.GetHashCode();
         hashCode = hashCode * 59 + EnableMRC.GetHashCode();
         hashCode = hashCode * 59 + PreserveSmoothing.GetHashCode();
         hashCode = hashCode * 59 + DownscaleResolutionMRC.GetHashCode();
         hashCode = hashCode * 59 + RemoveMetadata.GetHashCode();
         hashCode = hashCode * 59 + RemovePageThumbnails.GetHashCode();
         hashCode = hashCode * 59 + RemovePagePieceInfo.GetHashCode();
         hashCode = hashCode * 59 + JBIG2PMSThreshold.GetHashCode();
         return(hashCode);
     }
 }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (FileId != null)
         {
             hashCode = hashCode * 59 + FileId.GetHashCode();
         }
         if (PageRange != null)
         {
             hashCode = hashCode * 59 + PageRange.GetHashCode();
         }
         hashCode = hashCode * 59 + Conformance.GetHashCode();
         hashCode = hashCode * 59 + ColorImageCompression.GetHashCode();
         hashCode = hashCode * 59 + BitonalImageCompression.GetHashCode();
         hashCode = hashCode * 59 + ImageQuality.GetHashCode();
         hashCode = hashCode * 59 + DownscaleResolution.GetHashCode();
         hashCode = hashCode * 59 + PreserveSmoothing.GetHashCode();
         hashCode = hashCode * 59 + FastWebView.GetHashCode();
         hashCode = hashCode * 59 + JBIG2PMSThreshold.GetHashCode();
         return(hashCode);
     }
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Returns true if PdfReduceParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of PdfReduceParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PdfReduceParameters input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     FileId == input.FileId ||
                     (FileId != null &&
                      FileId.Equals(input.FileId))
                     ) &&
                 (
                     OutputVersion == input.OutputVersion ||
                     OutputVersion.Equals(input.OutputVersion)
                 ) &&
                 (
                     ImageQuality == input.ImageQuality ||
                     ImageQuality.Equals(input.ImageQuality)
                 ) &&
                 (
                     RecompressImages == input.RecompressImages ||
                     RecompressImages.Equals(input.RecompressImages)
                 ) &&
                 (
                     EnableColorDetection == input.EnableColorDetection ||
                     EnableColorDetection.Equals(input.EnableColorDetection)
                 ) &&
                 (
                     PackDocument == input.PackDocument ||
                     PackDocument.Equals(input.PackDocument)
                 ) &&
                 (
                     PackFonts == input.PackFonts ||
                     PackFonts.Equals(input.PackFonts)
                 ) &&
                 (
                     DownscaleImages == input.DownscaleImages ||
                     DownscaleImages.Equals(input.DownscaleImages)
                 ) &&
                 (
                     DownscaleResolution == input.DownscaleResolution ||
                     DownscaleResolution.Equals(input.DownscaleResolution)
                 ) &&
                 (
                     FastWebView == input.FastWebView ||
                     FastWebView.Equals(input.FastWebView)
                 ) &&
                 (
                     RemoveFormFields == input.RemoveFormFields ||
                     RemoveFormFields.Equals(input.RemoveFormFields)
                 ) &&
                 (
                     RemoveAnnotations == input.RemoveAnnotations ||
                     RemoveAnnotations.Equals(input.RemoveAnnotations)
                 ) &&
                 (
                     RemoveBookmarks == input.RemoveBookmarks ||
                     RemoveBookmarks.Equals(input.RemoveBookmarks)
                 ) &&
                 (
                     RemoveHyperlinks == input.RemoveHyperlinks ||
                     RemoveHyperlinks.Equals(input.RemoveHyperlinks)
                 ) &&
                 (
                     RemoveEmbeddedFiles == input.RemoveEmbeddedFiles ||
                     RemoveEmbeddedFiles.Equals(input.RemoveEmbeddedFiles)
                 ) &&
                 (
                     RemoveBlankPages == input.RemoveBlankPages ||
                     RemoveBlankPages.Equals(input.RemoveBlankPages)
                 ) &&
                 (
                     RemoveJavaScript == input.RemoveJavaScript ||
                     RemoveJavaScript.Equals(input.RemoveJavaScript)
                 ) &&
                 (
                     EnableJPEG2000 == input.EnableJPEG2000 ||
                     EnableJPEG2000.Equals(input.EnableJPEG2000)
                 ) &&
                 (
                     EnableJBIG2 == input.EnableJBIG2 ||
                     EnableJBIG2.Equals(input.EnableJBIG2)
                 ) &&
                 (
                     EnableCharRepair == input.EnableCharRepair ||
                     EnableCharRepair.Equals(input.EnableCharRepair)
                 ) &&
                 (
                     EnableMRC == input.EnableMRC ||
                     EnableMRC.Equals(input.EnableMRC)
                 ) &&
                 (
                     PreserveSmoothing == input.PreserveSmoothing ||
                     PreserveSmoothing.Equals(input.PreserveSmoothing)
                 ) &&
                 (
                     DownscaleResolutionMRC == input.DownscaleResolutionMRC ||
                     DownscaleResolutionMRC.Equals(input.DownscaleResolutionMRC)
                 ) &&
                 (
                     RemoveMetadata == input.RemoveMetadata ||
                     RemoveMetadata.Equals(input.RemoveMetadata)
                 ) &&
                 (
                     RemovePageThumbnails == input.RemovePageThumbnails ||
                     RemovePageThumbnails.Equals(input.RemovePageThumbnails)
                 ) &&
                 (
                     RemovePagePieceInfo == input.RemovePagePieceInfo ||
                     RemovePagePieceInfo.Equals(input.RemovePagePieceInfo)
                 ) &&
                 (
                     JBIG2PMSThreshold == input.JBIG2PMSThreshold ||
                     JBIG2PMSThreshold.Equals(input.JBIG2PMSThreshold)
                 ));
        }