Class PdfOptions
نام ها : Aspose.Imaging.ImageOptions جمع آوری: Aspose.Imaging.dll (25.4.0)
گزینه های PDF
public class PdfOptions : ImageOptionsBase, IDisposable, IHasXmpData, IHasMetadata, ICloneable
Inheritance
object ← DisposableObject ← ImageOptionsBase ← PdfOptions
Implements
IDisposable , IHasXmpData , IHasMetadata , ICloneable
اعضای ارثی
ImageOptionsBase.Clone() , ImageOptionsBase.ReleaseManagedResources() , ImageOptionsBase.KeepMetadata , ImageOptionsBase.XmpData , ImageOptionsBase.Source , ImageOptionsBase.Palette , ImageOptionsBase.ResolutionSettings , ImageOptionsBase.VectorRasterizationOptions , ImageOptionsBase.BufferSizeHint , ImageOptionsBase.MultiPageOptions , ImageOptionsBase.FullFrame , ImageOptionsBase.ProgressEventHandler , DisposableObject.Dispose() , DisposableObject.ReleaseManagedResources() , DisposableObject.ReleaseUnmanagedResources() , DisposableObject.VerifyNotDisposed() , DisposableObject.Disposed , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
مثال زیر نشان می دهد که چگونه یک تصویر چند صفحه وکتور را به فرمت PDF به طور کلی بدون اشاره به یک نوع تصویر خاص تبدیل کنیم.
string dir = "C:\\aspose.imaging\\net\\misc\\ImagingReleaseQATester\\Tests\\testdata\\2548";
string inputFilePath = System.IO.Path.Combine(dir, "Multipage.cdr");
string outputFilePath = System.IO.Path.Combine(dir, "Multipage.cdr.pdf");
Aspose.Imaging.ImageOptionsBase exportOptions = new Aspose.Imaging.ImageOptions.PdfOptions();
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(inputFilePath))
{
exportOptions.MultiPageOptions = null;
// Export only first two pages to the corresponding pages of the output PDF document.
Aspose.Imaging.IMultipageImage multipageImage = image as Aspose.Imaging.IMultipageImage;
if (multipageImage != null && (multipageImage.Pages != null && multipageImage.PageCount > 2))
{
exportOptions.MultiPageOptions = new Aspose.Imaging.ImageOptions.MultiPageOptions(new Aspose.Imaging.IntRange(0, 2));
}
if (image is Aspose.Imaging.VectorImage)
{
exportOptions.VectorRasterizationOptions = (Aspose.Imaging.ImageOptions.VectorRasterizationOptions)image.GetDefaultOptions(new object[] { Aspose.Imaging.Color.White, image.Width, image.Height });
exportOptions.VectorRasterizationOptions.TextRenderingHint = Aspose.Imaging.TextRenderingHint.SingleBitPerPixel;
exportOptions.VectorRasterizationOptions.SmoothingMode = Aspose.Imaging.SmoothingMode.None;
}
image.Save(outputFilePath, exportOptions);
}
Constructors
PdfOptions()
public PdfOptions()
Properties
PageSize
دریافت یا اندازه صفحه را تنظیم کنید.
public SizeF PageSize { get; set; }
ارزش املاک
PdfCoreOptions
گزینه های اصلی PDF
public PdfCoreOptions PdfCoreOptions { get; set; }
ارزش املاک
PdfDocumentInfo
دریافت یا تنظیم داده های متا برای سند.
public PdfDocumentInfo PdfDocumentInfo { get; set; }
ارزش املاک
UseOriginalImageResolution
دریافت یا تنظیم یک مقدار نشان دهنده استفاده از رزولوشن DPI تصویر اصلی
public bool UseOriginalImageResolution { get; set; }