openAt method
void
openAt(
- PdfPage page, {
- PdfOpenActionView view = PdfOpenActionView.fit,
- double? left,
- double? top,
- double? zoom,
Makes the document open at page, with the chosen view.
Implementation
void openAt(
PdfPage page, {
PdfOpenActionView view = PdfOpenActionView.fit,
double? left,
double? top,
double? zoom,
}) {
final destination = PdfArray(<PdfDataType>[
page.ref(),
PdfName(view.name),
if (view == PdfOpenActionView.xyz) ...<PdfDataType>[
PdfNum(left ?? 0),
PdfNum(top ?? 0),
PdfNum(zoom ?? 0),
],
if (view == PdfOpenActionView.fitWidth) PdfNum(top ?? 0),
]);
_catalog[PdfNameTokens.openAction] = destination;
}