Enum SaveFormat
Названий на: Aspose.Note Асамблея: Aspose.Note.dll (25.4.0)
Показати формат, в якому документ зберігається.
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
Визначає, що вихід є файлом BMP.
Gif = 4
Визначає, що вихід є GIF-файлом.
Html = 8
Визначає, що вихід є HTML-файлом.
Jpeg = 3
Визначає, що вихід є JPEG-файлом.
One = 7
Визначає, що вихід є файлом OneNote.
Pdf = 6
Визначає, що вихід є PDF-файлом.
Png = 1
Визначає, що вихід є файлом PNG.
Tiff = 5
Визначає, що вихід є файлом TIFF.
Examples
Покажіть, як зберегти документ за допомогою переліку 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);
Показує, як зберегти документ у форматі PDF за допомогою стандартних налаштувань.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
Document oneFile = new Document(dataDir + "Aspose.one");
dataDir += "SaveWithDefaultSettings_out.pdf";
oneFile.Save(dataDir, SaveFormat.Pdf);
Покажіть, як зберегти документ як зображення у форматі JPEG за допомогою SaveFormat.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
Document oneFile = new Document(dataDir + "Aspose.one");
dataDir += "SaveToJpegImageUsingSaveFormat_out.jpg";
oneFile.Save(dataDir, SaveFormat.Jpeg);
Показати, як зберегти документ у форматі GIF.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
Document oneFile = new Document(dataDir + "Aspose.one");
dataDir += "SaveToImageDefaultOptions_out.gif";
oneFile.Save(dataDir, SaveFormat.Gif);
Показати, як встановити якість зображення при збереженні документа як образу у форматі 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));
Покажіть, як зберегти документ як зображення у форматі Bmp за допомогою 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 });
Показує, як встановити роздільну здатність зображення при збереженні документа як образу.
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 });
Показати, як зберегти документ в якості графічного зображення.
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 });
Покажіть, як зберегти документ як зображення у форматі Tiff за допомогою компресії 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
});
Показує, як зберегти документ як зображення у форматі Tiff за допомогою компресії 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
});
Покажіть, як зберегти документ як зображення у форматі Tiff за допомогою компресії факсу 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
});
Показує, як зберегти документ як бінарний зображення за допомогою методу 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,
}
});
Показує, як зберегти документ як бінарний зображення за допомогою фіксованого прага.
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
}
});