Fix flutter printing pacakge UI

I downloaded the printing package from and printed the pdf.
When you run the app, a PDF is displayed and there is a print button with the icon below. Press the print button to go to the print view.

The problem is that in the print view there is Save as PDF and then there is Print. I want to get rid of the Save as PDF feature.
By analyzing the source code, I figured out how to execute _print through the print of IconButton in the PdfPriview class.

Do you know where the source of this app’s Save as PDF function or UI exists?


    sdk: flutter
  pdf: ^3.6.0
  printing: ^5.6.0


import 'dart:typed_data';

import 'package:flutter/material.dart';
import 'package:pdf/pdf.dart';
import 'package:pdf/widgets.dart' as pw;
import 'package:printing/printing.dart';
import 'package:http/http.dart' as http;

Future<void> main() async {
  runApp(MyApp('Printing Demo'));

class MyApp extends StatelessWidget {
  MyApp(this.title, {Key? key}) : super(key: key);

  final String title;

  PdfDocument? _doc;

  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(title: Text(title)),
        body: PdfPreview(
          build: (format) => _generatePdf(format, title),

  Future<Uint8List> _generatePdf(PdfPageFormat format, String title) async {
    final pdf = pw.Document(version: PdfVersion.pdf_1_5, compress: true);
    final font = await PdfGoogleFonts.nunitoExtraLight();

        pageFormat: format,
        build: (context) {
          return pw.Column(
            children: [
                width: double.infinity,
                child: pw.FittedBox(
                  child: pw.Text(title, style: pw.TextStyle(font: font)),
              pw.SizedBox(height: 20),
              pw.Flexible(child: pw.FlutterLogo())