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
}
});