crossReferenceType property
The type of PDF cross-reference.
//Create a PDF document.
PdfDocument document = PdfDocument();
//Set the type of the PDF cross reference.
document.fileStructure.crossReferenceType =
PdfCrossReferenceType.crossReferenceStream;
//Create page and draw text.
document.pages.add().graphics.drawString(
'Hello World!', PdfStandardFont(PdfFontFamily.helvetica, 12),
brush: PdfBrushes.black, bounds: Rect.fromLTWH(0, 0, 0, 0));
//Save and dispose document.
List<int> bytes = await document.save();
document.dispose();
Implementation
late PdfCrossReferenceType crossReferenceType;