convert_html_options.dart 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /// convert_html_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 html format parameters
  12. class ConvertHTMLOptions extends Options {
  13. bool containImages;
  14. bool containAnnotations;
  15. HtmlPageOptions htmlPageOptions;
  16. ConvertHTMLOptions(
  17. {this.containImages = true,
  18. this.containAnnotations = false,
  19. this.htmlPageOptions = HtmlPageOptions.singlePage})
  20. : super() {
  21. map['containImages'] = containImages;
  22. map['containAnnotations'] = containAnnotations;
  23. map['htmlPageOptions'] = htmlPageOptions.name.capitalize();
  24. }
  25. }
  26. enum HtmlPageOptions {
  27. singlePage,
  28. singlePageNavigationByBookmark,
  29. multiplePages,
  30. multiplePagesSplitByBookmarks
  31. }