Enum SaveFormat
Název místa: Aspose.Note Shromáždění: Aspose.Note.dll (25.4.0)
Ukazuje formát, ve kterém je dokument uložen.
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
Ukazuje, že výstup je soubor BMP.
Gif = 4
Ukazuje, že výstup je GIF soubor.
Html = 8
Určuje, že výstup je soubor HTML.
Jpeg = 3
Ukazuje, že výstup je soubor JPEG.
One = 7
Ukazuje, že výstup je soubor OneNote.
Pdf = 6
Ukazuje, že výstup je soubor PDF.
Png = 1
Ukazuje, že výstup je PNG soubor.
Tiff = 5
Ukazuje, že výstup je soubor TIFF.
Examples
Ukazuje, jak uložit dokument pomocí seznamu 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);
Ukazuje, jak uložit dokument ve formátu PDF pomocí výchozích nastavení.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
Document oneFile = new Document(dataDir + "Aspose.one");
dataDir += "SaveWithDefaultSettings_out.pdf";
oneFile.Save(dataDir, SaveFormat.Pdf);
Ukazuje, jak uložit dokument jako obrázek ve formátu Jpeg pomocí SaveFormat.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
Document oneFile = new Document(dataDir + "Aspose.one");
dataDir += "SaveToJpegImageUsingSaveFormat_out.jpg";
oneFile.Save(dataDir, SaveFormat.Jpeg);
Ukazuje, jak ukládat dokument ve formátu gif.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
Document oneFile = new Document(dataDir + "Aspose.one");
dataDir += "SaveToImageDefaultOptions_out.gif";
oneFile.Save(dataDir, SaveFormat.Gif);
Ukazuje, jak nastavit kvalitu obrazu při uložení dokumentu jako obrázku ve formátu 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));
Ukazuje, jak uložit dokument jako obrázek ve formátu Bmp pomocí 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 });
Ukazuje, jak nastavit rozlišení obrazu při ukládání dokumentu jako obrázku.
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 });
Ukazuje, jak zachránit dokument jako grayscale obrázek.
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 });
Ukazuje, jak uložit dokument jako obrázek ve formátu Tiff pomocí komprese 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
});
Ukazuje, jak uložit dokument jako obrázek ve formátu Tiff pomocí komprese 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
});
Ukazuje, jak ukládat dokument jako obrázek ve formátu Tiff pomocí CCITT Group 3 faxové komprese.
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
});
Ukazuje, jak ušetřit dokument jako binární obrázek 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,
}
});
Ukazuje, jak ušetřit dokument jako binární obrázek pomocí pevného prahu.
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
}
});