convert_excel_options.dart 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /// convert_excel_options.dart
  2. ///
  3. /// Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
  4. ///
  5. /// THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
  6. /// AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
  7. /// UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
  8. /// This notice may not be removed from this file.
  9. import 'package:kmpdfkit_conversion_flutter/util/string_extensions.dart';
  10. import 'options.dart';
  11. /// Convert pdf to xlsx format parameters
  12. class ConvertExcelOptions extends Options {
  13. bool containImages;
  14. bool containAnnotations;
  15. ExcelWorkSheetOptions workSheetOptions;
  16. ExcelContentOptions contentOptions;
  17. ConvertExcelOptions(
  18. {this.containImages = true,
  19. this.containAnnotations = false,
  20. this.workSheetOptions = ExcelWorkSheetOptions.forEachPage,
  21. this.contentOptions = ExcelContentOptions.allContent})
  22. : super() {
  23. map['containImages'] = containImages;
  24. map['containAnnotations'] = containAnnotations;
  25. map['workSheetOptions'] = workSheetOptions.name.capitalize();
  26. map['contentOptions'] = contentOptions.name.capitalize();
  27. }
  28. }
  29. enum ExcelWorkSheetOptions { forEachTable, forEachPage, forTheDocument }
  30. enum ExcelContentOptions { onlyText, onlyTable, allContent }