GeneratePDF.js 1.0 KB

1234567891011121314151617181920212223242526272829
  1. 'use strict';
  2. /*
  3. *+------------------------------------------------------------------------+
  4. *| Licensed Materials - Property of IBM
  5. *| IBM Cognos Products: Content Explorer
  6. *| (C) Copyright IBM Corp. 2018, 2019
  7. *|
  8. *| US Government Users Restricted Rights - Use, duplication or disclosure
  9. *| restricted by GSA ADP Schedule Contract with IBM Corp.
  10. *+------------------------------------------------------------------------+
  11. */
  12. define(['../../../lib/@waca/core-client/js/core-client/ui/core/Class'], function (BaseClass) {
  13. var ActionHandler = BaseClass.extend({
  14. createPDF: function createPDF(context, pageSize, printFilters) {
  15. var printFeature = context.getCurrentContentView().getDashboardApi().getFeature('Print');
  16. var pageOptions = {
  17. pageSize: pageSize,
  18. printFilters: printFilters
  19. };
  20. var id = context.getCurrentContentView().getDashboardApi().getCanvas().getContent().getId();
  21. printFeature.print(id, context, pageOptions);
  22. }
  23. });
  24. return ActionHandler;
  25. });
  26. //# sourceMappingURL=GeneratePDF.js.map