Enum PdfCrossReferenceType
- Namespace
- Syncfusion.Pdf
- Assembly
- Syncfusion.Pdf.Portable.dll
Specifies the type of the PDF cross-reference.
public enum PdfCrossReferenceType
Fields
CrossReferenceStream = 1
Cross-reference is represented by cross-reference stream. Cross-reference streams are stream objects, and contain a dictionary and a data stream. This leads to more compact representation of the file data especially along with the compression enabled. This format is supported by PDF 1.5 version and higher only.
CrossReferenceTable = 0
The cross-reference table contains information that permits random access to indirect objects within the file so that the entire file need not be read to locate any particular object. The structure is useful for incremental updates, since it allows a new cross-reference section to be added to the PDF file, containing entries only for objects that have been added or deleted. Cross-reference is represented by cross-reference table. The cross-reference table is the traditional way of representing reference type.
Examples
//Create a new document.
PdfDocument doc = new PdfDocument();
//Add a page in the PDF document.
PdfPage page = doc.Pages.Add();
//Set the CrossReferenceType as CrossReferenceStream.
doc.FileStructure.CrossReferenceType = PdfCrossReferenceType.CrossReferenceStream;
//Save the PDF document to disk.
doc.Save("FileStructure.pdf");
//Close the document.
doc.Close(true);
'Create a new document.
Dim doc As PdfDocument = New PdfDocument()
'Add a page in the PDF document.
Dim page As PdfPage = doc.Pages.Add()
'Set the CrossReferenceType as CrossReferenceStream.
doc.FileStructure.CrossReferenceType = PdfCrossReferenceType.CrossReferenceStream
'Save the PDF document to disk.
doc.Save("FileStructure.pdf")
'Close the document.
doc.Close(True)
Remarks
Default value is CrossReferenceStream