Class PdfSaveOptions

Class PdfSaveOptions

이름 공간 : Aspose.Cells 모임: Aspose.Cells.dll (25.4.0)

PDF 파일을 저장할 수 있는 옵션을 나타냅니다.

public class PdfSaveOptions : PaginatedSaveOptions

Inheritance

object SaveOptions PaginatedSaveOptions PdfSaveOptions

Constructors

PdfSaveOptions()

PDF 파일을 저장할 수 있는 옵션을 만듭니다.

public PdfSaveOptions()

Properties

Bookmark

Aspose.Cells.Rendering.PdfBookmarkEntry?text=PdfBookmarkEntry 객체를 얻고 설정합니다.

public PdfBookmarkEntry Bookmark { get; set; }

부동산 가치

PdfBookmarkEntry

CalculateFormula

PDF 파일을 저장하기 전에 양식을 계산해야 하는지 여부를 지정합니다.

public bool CalculateFormula { get; set; }

부동산 가치

bool

Remarks

기본 값은 가짜입니다.

Compliance

출력 문서에 대한 PDF 표준 준수 수준을 얻거나 설정합니다.

public PdfCompliance Compliance { get; set; }

부동산 가치

PdfCompliance

Remarks

원본은 PDF17입니다.

CreatedTime

얻고 PDF 문서를 생성하는 시간을 설정합니다.

public DateTime CreatedTime { get; set; }

부동산 가치

DateTime

Remarks

그것이 설정되지 않으면 PDF를 생성 할 때가 될 것입니다.

CustomPropertiesExport

Aspose.Cells.Properties.CustomDocumentPropertyCollection이 PDF 파일로 수출되는 방법을 결정하는 값을 얻거나 설정합니다.

public PdfCustomPropertiesExport CustomPropertiesExport { get; set; }

부동산 가치

PdfCustomPropertiesExport

DisplayDocTitle

창의 제목 바가 문서 제목을 표시해야 하는지 여부를 지정합니다.

public bool DisplayDocTitle { get; set; }

부동산 가치

bool

Remarks

잘못된 경우, 제목 바는 대신 PDF 파일의 이름을 표시해야합니다.가짜 가치는 가짜입니다.

EmbedAttachments

Excel에서 Ole 개체에 대한 첨부 파일을 삽입해야 하는지 여부를 지정합니다.

public bool EmbedAttachments { get; set; }

부동산 가치

bool

Remarks

기본 값은 가짜입니다. PDF/A 준수가 설정되거나 PDF 암호화가 활성화되면 가짜가 있어야 합니다.

EmbedStandardWindowsFonts

진짜 유형의 글꼴을 삽입하는 진짜입니다.그것은 단지 ASCII 문자 32-127에 영향을 미칩니다.127 이상의 캐릭터 코드에 대한 글꼴은 항상 삽입됩니다.글꼴은 항상 PDF/A-1a, PDF/A-1b 표준에 포함되어 있습니다.결론은 사실이다.

public bool EmbedStandardWindowsFonts { get; set; }

부동산 가치

bool

ExportDocumentStructure

문서 구조를 수출하는지 여부를 지정합니다.

public bool ExportDocumentStructure { get; set; }

부동산 가치

bool

FontEncoding

Gets or sets embedded font encoding in pdf.에 삽입된 글꼴 코딩을 PDF로 삽입하거나 설정합니다.

public PdfFontEncoding FontEncoding { get; set; }

부동산 가치

PdfFontEncoding

Remarks

기본 값은 Aspose.Cells.Rendering.PdfFontEncoding.Identity입니다

ImageType

차트와 모양을 변환할 때 이미지 유형을 나타냅니다.

[Obsolete("Chart and Shape are always rendered as vector elements(e.g. point, line) for rendering quality.")]
[Browsable(false)]
public ImageType ImageType { get; set; }

부동산 가치

ImageType

Remarks

참고: 이 회원은 이제 오래되었습니다. 대신,차트와 모양은 항상 품질을 제공하기 위해 벡터 요소(예: 포인트, 라인)로 표시됩니다.이 부동산은 2022년 6월 이후 12개월 후에 제거될 예정이다.아스포스는 당신이 경험할 수있는 불편에 대해 사과합니다.

OptimizationType

PDF 최적화 유형을 얻고 설정합니다.

public PdfOptimizationType OptimizationType { get; set; }

부동산 가치

PdfOptimizationType

Remarks

기본 값은 Aspose.Cells.Rendering.PdfOptimizationType.Standard입니다.

PdfCompression

압축 알고리즘을 표시합니다.

public PdfCompressionCore PdfCompression { get; set; }

부동산 가치

PdfCompressionCore

Producer

생성된 PDF 문서의 제작자를 얻고 설정합니다.

public string Producer { get; set; }

부동산 가치

string

Remarks

값이 0이거나 유효한 라이센스가 설정되지 않으면 Aspose.Cells vVERSION 라인이 사용됩니다.

SecurityOptions

이 옵션을 설정하면 xls2pdf 결과에서 보안이 필요합니다.

public PdfSecurityOptions SecurityOptions { get; set; }

부동산 가치

PdfSecurityOptions

Examples

다음 코드는 PDF 출력에 대한 고도 해상도 인쇄 허가를 설정합니다.

Workbook wb = new Workbook();
wb.Worksheets[0].Cells["A1"].Value = "Aspose";

PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();


PdfSecurityOptions pdfSecurityOptions = new PdfSecurityOptions();

//set owner password
pdfSecurityOptions.OwnerPassword = "YourOwnerPassword";

//set user password
pdfSecurityOptions.UserPassword = "YourUserPassword";

//set print permisson
pdfSecurityOptions.PrintPermission = true;

//set high resolution for print
pdfSecurityOptions.FullQualityPrintPermission = true;


pdfSaveOptions.SecurityOptions = pdfSecurityOptions;

wb.Save("output.pdf", pdfSaveOptions);

Watermark

수출 또는 수출에 물 표지판을 설정합니다.

public RenderingWatermark Watermark { get; set; }

부동산 가치

RenderingWatermark

Examples

다음 코드는 출력 pdf에 물표를 설정합니다.

//prepare a workbook with 3 pages.
Workbook wb = new Workbook();
wb.Worksheets[0].Cells["A1"].PutValue("Page1");
int index = wb.Worksheets.Add();
wb.Worksheets[index].Cells["A1"].PutValue("Page2");
index = wb.Worksheets.Add();
wb.Worksheets[index].Cells["A1"].PutValue("Page3");
wb.Worksheets[index].PageSetup.PaperSize = PaperSizeType.PaperA3;

//create a font for watermark, and specify bold, italic, color
RenderingFont font = new RenderingFont("Calibri", 68);
font.Italic = true;
font.Bold = true;
font.Color = Color.Blue;

//create a watermark from text and the specified font
RenderingWatermark watermark = new RenderingWatermark("Watermark", font);

//specify horizontal and vertical alignment
watermark.HAlignment = TextAlignmentType.Center;
watermark.VAlignment = TextAlignmentType.Center;

//specify rotation
watermark.Rotation = 30;

//specify opacity
watermark.Opacity = 0.6f;

//specify the scale to page(e.g. 100, 50) in percent.
watermark.ScaleToPagePercent = 50;

//spcify watermark for rendering to pdf.
PdfSaveOptions options = new PdfSaveOptions();
options.Watermark = watermark;

wb.Save("output_watermark.pdf", options);

Methods

SetImageResample(이트, 이트)

원하는 PPI(인치 당 픽셀)의 샘플 이미지와 jpeg 품질의 세트. 모든 이미지는 지정된 품질 설정으로 JPEG로 변환됩니다.그리고 지정된 PPI (인치당 픽셀)보다 큰 이미지는 다시 샘플링됩니다.

public void SetImageResample(int desiredPPI, int jpegQuality)

Parameters

desiredPPI int

원하는 픽셀 / 인치. 220 높은 품질. 150 스크린 품질. 96 이메일 품질.

jpegQuality int

0 - 100 % JPEG 품질

Examples

다음 코드는 원하는 PPI를 96 및 jpeg 품질을 80으로 설정합니다.

//load the source file with images.
Workbook wb = new Workbook("Book1.xlsx");

PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();

//set desired PPI as 96 and jpeg quality as 80.
pdfSaveOptions.SetImageResample(96, 80);

wb.Save("output.pdf", pdfSaveOptions);
 한국어