Enum SaveFormat

Enum SaveFormat

Nazwa przestrzeń: Aspose.Note Zgromadzenie: Aspose.Note.dll (25.4.0)

Oznacza format, w którym dokument jest zapisany.

public enum SaveFormat
   {
      Docx,        // <-- no changes here
      Pdf,         // <-- no changes here
      FlatOpcml,  // <-- no changes here
      Dot,         // <-- no changes here
      Rtf,         // <-- no changes here
      Text,        // <-- no changes here
      Html,        // <-- no changes here
      Mhtml       // <-- no changes here
   }

Fields

Bmp = 2

Oznacza, że wydajność jest plikiem BMP.

Gif = 4

Oznacza, że wydajność jest plikiem GIF.

Html = 8

Oznacza, że wydajność jest plikiem HTML.

Jpeg = 3

Oznacza to, że wydajność jest plikiem JPEG.

One = 7

Określa, że wyjście jest plikiem OneNote.

Pdf = 6

Oznacza, że wydanie jest plikiem PDF.

Png = 1

Oznacza, że wydajność jest plikiem PNG.

Tiff = 5

Oznacza, że wydajność jest plikiem TIFF.

Examples

Pokaż, jak zapisać dokument za pomocą listy SaveFormat.

string inputFile = "Sample1.one";
   string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   string outputFile = "SaveDocToOneNoteFormatUsingSaveFormat_out.one";
   Document document = new Document(dataDir + inputFile);
   document.Save(dataDir + outputFile, SaveFormat.One);

Pokaż, jak zapisać dokument w formacie PDF za pomocą ustawień domyślnych.

string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   Document oneFile = new Document(dataDir + "Aspose.one");
   dataDir += "SaveWithDefaultSettings_out.pdf";
   oneFile.Save(dataDir, SaveFormat.Pdf);

Pokaż, jak zapisać dokument jako obraz w formacie JPEG za pomocą programu SaveFormat.

string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   Document oneFile = new Document(dataDir + "Aspose.one");
   dataDir += "SaveToJpegImageUsingSaveFormat_out.jpg";
   oneFile.Save(dataDir, SaveFormat.Jpeg);

Pokaż, jak zapisać dokument w formacie gif.

string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   Document oneFile = new Document(dataDir + "Aspose.one");
   dataDir += "SaveToImageDefaultOptions_out.gif";
   oneFile.Save(dataDir, SaveFormat.Gif);

Pokaż, jak ustawić jakość obrazu podczas przechowywania dokumentu w formie JPEG.

string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   Document doc = new Document(dataDir + "Aspose.one");
   dataDir += @"\SetOutputImageResolution_out.jpg";
   doc.Save(dataDir, new ImageSaveOptions { Quality = 100 }.WithFormat(SaveFormat.Jpeg));

Pokaż, jak zapisać dokument jako obraz w formacie Bmp za pomocą opcji ImageSaveOptions.

string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   Document oneFile = new Document(dataDir + "Aspose.one");
   dataDir += "SaveToBmpImageUsingImageSaveOptions_out.bmp";
   oneFile.Save(dataDir, new ImageSaveOptions { SaveFormat = SaveFormat.Bmp });

Pokaż, jak ustawić rozdzielczość obrazu podczas przechowywania dokumentu jako obraz.

string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   Document doc = new Document(dataDir + "Aspose.one");
   dataDir += "SetOutputImageResolution_out.jpg";
   doc.Save(dataDir, new ImageSaveOptions { Resolution = 220, SaveFormat = SaveFormat.Jpeg });

Pokaż, jak zapisać dokument jako obraz grayscale.

string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   Document oneFile = new Document(dataDir + "Aspose.one");
   dataDir += "SaveAsGrayscaleImage_out.png";
   oneFile.Save(dataDir, new ImageSaveOptions { SaveFormat = SaveFormat.Png, ColorMode = ColorMode.GrayScale });

Pokaż, jak zapisać dokument jako obraz w formacie Tiff za pomocą kompresji PackBits.

string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   Document oneFile = new Document(Path.Combine(dataDir, "Aspose.one"));
   var dst = Path.Combine(dataDir, "SaveToTiffUsingPackBitsCompression.tiff");
   oneFile.Save(dst, new ImageSaveOptions(SaveFormat.Tiff)
                 {
                     TiffCompression = TiffCompression.PackBits
                 });

Pokaż, jak zapisać dokument jako obraz w formacie Tiff za pomocą kompresji Jpeg.

string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   Document oneFile = new Document(Path.Combine(dataDir, "Aspose.one"));
   var dst = Path.Combine(dataDir, "SaveToTiffUsingJpegCompression.tiff");
   oneFile.Save(dst, new ImageSaveOptions(SaveFormat.Tiff)
   {
      TiffCompression = TiffCompression.Jpeg,
      Quality = 93
   });

Pokaż, jak zapisać dokument jako obraz w formacie Tiff za pomocą kompresji faksu CCITT Group 3.

string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   Document oneFile = new Document(Path.Combine(dataDir, "Aspose.one"));
   var dst = Path.Combine(dataDir, "SaveToTiffUsingCcitt3Compression.tiff");
   oneFile.Save(dst, new ImageSaveOptions(SaveFormat.Tiff)
   {
      ColorMode = ColorMode.BlackAndWhite,
      TiffCompression = TiffCompression.Ccitt3
   });

Pokaż, jak zaoszczędzić dokument jako obraz binarny za pomocą metody Otsu.

string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   Document oneFile = new Document(dataDir + "Aspose.one");
   dataDir += @"\SaveToBinaryImageUsingOtsuMethod_out.png";
   oneFile.Save(dataDir, new ImageSaveOptions(SaveFormat.Png)
   {
      ColorMode = ColorMode.BlackAndWhite,
      BinarizationOptions = new ImageBinarizationOptions()
      {
         BinarizationMethod = BinarizationMethod.Otsu,
      }
   });

Pokazuje, jak zaoszczędzić dokument jako obraz binarny za pomocą stałego próg.

string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   Document oneFile = new Document(dataDir + "Aspose.one");
   dataDir += "SaveToBinaryImageUsingFixedThreshold_out.png";
   oneFile.Save(dataDir,
                  new ImageSaveOptions(SaveFormat.Png)
                  {
                      ColorMode = ColorMode.BlackAndWhite,
                      BinarizationOptions = new ImageBinarizationOptions()
                      {
                          BinarizationMethod = BinarizationMethod.FixedThreshold,
                          BinarizationThreshold = 123
                      }
                  });
 Polski