|
@@ -1,45 +1,47 @@
|
|
|
-import 'dart:async';
|
|
|
-import 'dart:typed_data';
|
|
|
-import 'package:fis_lib_pdf/ultils/pdf_type_enum.dart';
|
|
|
-import 'package:fis_lib_pdf/ultils/recources_catch.dart';
|
|
|
-import 'package:pdf/pdf.dart';
|
|
|
-import 'package:fis_lib_print/printing.dart';
|
|
|
-import 'ultils/pdf_render_factory.dart';
|
|
|
+// import 'dart:async';
|
|
|
+// import 'dart:typed_data';
|
|
|
+// import 'package:fis_lib_pdf/ultils/pdf_type_enum.dart';
|
|
|
+// import 'package:fis_lib_pdf/ultils/recources_catch.dart';
|
|
|
+// import 'package:pdf/pdf.dart';
|
|
|
+// import 'package:fis_lib_print/printing.dart';
|
|
|
+// import 'ultils/pdf_render_factory.dart';
|
|
|
|
|
|
-///PDF相关的操作方法
|
|
|
-///打印、下载、导出等
|
|
|
-class PDFRelevantHelper {
|
|
|
- ///根据指定二进制文件打印PDF
|
|
|
- static Future<void> printByGivenPDFBytes(
|
|
|
- String fileName, Uint8List pdfBytes, PdfPageFormat pdfPageFormat) async {
|
|
|
- ResourcesCache.currentGivenPDFBinaryFile = pdfBytes;
|
|
|
- await Printing.layoutPdf(
|
|
|
- onLayout: (format) => PDFRenderFactory.GetPDFRenderByPDFTypeEnum(
|
|
|
- PDFTypeEnum.pdfBytes)(format),
|
|
|
- name: fileName,
|
|
|
- format: pdfPageFormat,
|
|
|
- dynamicLayout: true,
|
|
|
- usePrinterSettings: false,
|
|
|
- );
|
|
|
- }
|
|
|
+/// FIXME 2023-12-20 发现该类无引用,暂时屏蔽
|
|
|
+/// PDF相关的操作方法
|
|
|
+/// 打印、下载、导出等
|
|
|
|
|
|
- ///根据指定二进制文件下载PDF (仅web有效)
|
|
|
- static Future<void> downloadByGivenPDFBytes(
|
|
|
- String fileName, Uint8List pdfBytes) async {
|
|
|
- ResourcesCache.currentGivenPDFBinaryFile = pdfBytes;
|
|
|
- await Printing.sharePdf(
|
|
|
- bytes: pdfBytes,
|
|
|
- filename: fileName,
|
|
|
- );
|
|
|
- }
|
|
|
+// class PDFRelevantHelper {
|
|
|
+// ///根据指定二进制文件打印PDF
|
|
|
+// static Future<void> printByGivenPDFBytes(
|
|
|
+// String fileName, Uint8List pdfBytes, PdfPageFormat pdfPageFormat) async {
|
|
|
+// ResourcesCache.currentGivenPDFBinaryFile = pdfBytes;
|
|
|
+// await Printing.layoutPdf(
|
|
|
+// onLayout: (format) => PDFRenderFactory.GetPDFRenderByPDFTypeEnum(
|
|
|
+// PDFTypeEnum.pdfBytes)(format),
|
|
|
+// name: fileName,
|
|
|
+// format: pdfPageFormat,
|
|
|
+// dynamicLayout: true,
|
|
|
+// usePrinterSettings: false,
|
|
|
+// );
|
|
|
+// }
|
|
|
|
|
|
- ///调用导出回调函数实现壳子内的导出业务
|
|
|
- static Future<void> exportByGivenPDFBytes(
|
|
|
- String fileName, Uint8List pdfBytes) async {
|
|
|
- ResourcesCache.currentGivenPDFBinaryFile = pdfBytes;
|
|
|
- await Printing.sharePdf(
|
|
|
- bytes: pdfBytes,
|
|
|
- filename: fileName,
|
|
|
- );
|
|
|
- }
|
|
|
-}
|
|
|
+// ///根据指定二进制文件下载PDF (仅web有效)
|
|
|
+// static Future<void> downloadByGivenPDFBytes(
|
|
|
+// String fileName, Uint8List pdfBytes) async {
|
|
|
+// ResourcesCache.currentGivenPDFBinaryFile = pdfBytes;
|
|
|
+// await Printing.sharePdf(
|
|
|
+// bytes: pdfBytes,
|
|
|
+// filename: fileName,
|
|
|
+// );
|
|
|
+// }
|
|
|
+
|
|
|
+// ///调用导出回调函数实现壳子内的导出业务
|
|
|
+// static Future<void> exportByGivenPDFBytes(
|
|
|
+// String fileName, Uint8List pdfBytes) async {
|
|
|
+// ResourcesCache.currentGivenPDFBinaryFile = pdfBytes;
|
|
|
+// await Printing.sharePdf(
|
|
|
+// bytes: pdfBytes,
|
|
|
+// filename: fileName,
|
|
|
+// );
|
|
|
+// }
|
|
|
+// }
|