LinearizedFormat Свойство (PdfFormat)
В этом разделе
Возвращает значение, указывающее, должен ли PDF документ иметь линеаризованный формат (быстрый веб-просмотр).
Синтаксис
'Declaration
Public ReadOnly Property LinearizedFormat As Boolean
public bool LinearizedFormat { get; }
public: __property bool get_LinearizedFormat();
public:
property bool LinearizedFormat {
bool get();
}
Property Value
True - PDF документ должен иметь линеаризованный формат (быстрый веб-просмотр); false - PDF документ не должен иметь линеаризованный формат.
Значение по умолчанию: false.
Пример
Вот пример, показывающий, как преобразовать PDF документ в линеаризованный формат (быстрый веб-просмотр):
Public Shared Sub ConvertToLinearizedFormat(inputPdfFilename As String, outputPdfFilename As String)
' open PDF document
Using document As New Vintasoft.Imaging.Pdf.PdfDocument(inputPdfFilename)
' get liearized format
Dim linearizedFormat As Vintasoft.Imaging.Pdf.PdfFormat = document.Format.GetLinearizedFormat()
' convert PDF document to linearized format
If inputPdfFilename = outputPdfFilename Then
document.Pack(linearizedFormat)
Else
document.Pack(outputPdfFilename, linearizedFormat)
End If
End Using
End Sub
public static void ConvertToLinearizedFormat(string inputPdfFilename, string outputPdfFilename)
{
// open PDF document
using (Vintasoft.Imaging.Pdf.PdfDocument document = new Vintasoft.Imaging.Pdf.PdfDocument(inputPdfFilename))
{
// get liearized format
Vintasoft.Imaging.Pdf.PdfFormat linearizedFormat = document.Format.GetLinearizedFormat();
// convert PDF document to linearized format
if (inputPdfFilename == outputPdfFilename)
document.Pack(linearizedFormat);
else
document.Pack(outputPdfFilename, linearizedFormat);
}
}
Требования
Целевые платформы: .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5
Смотрите также