Skip to content

Commit

Permalink
use JobParamsPDFV2 in Canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimkibana committed Oct 8, 2021
1 parent 2ab0ce0 commit 3c00e25
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type { RedirectOptions } from 'src/plugins/share/public';
import { CANVAS_APP_LOCATOR } from '../../../../common/locator';
import { CanvasAppLocatorParams } from '../../../../common/locator';
import { CanvasWorkpad } from '../../../../types';
import { JobParamsPDFV2 } from '../../../../../reporting/public';

export interface CanvasWorkpadSharingData {
workpad: Pick<CanvasWorkpad, 'id' | 'name' | 'height' | 'width'>;
Expand All @@ -18,7 +19,7 @@ export interface CanvasWorkpadSharingData {
export function getPdfJobParams(
{ workpad: { id, name: title, width, height }, pageCount }: CanvasWorkpadSharingData,
version: string
) {
): JobParamsPDFV2 {
// The viewport in Reporting by specifying the dimensions. In order for things to work,
// we need a viewport that will include all of the pages in the workpad. The viewport
// also needs to include any offset values from the 0,0 position, otherwise the cropped
Expand Down Expand Up @@ -52,5 +53,7 @@ export function getPdfJobParams(
objectType: 'canvas workpad',
locatorParams,
title,
browserTimezone: '',
version: '',
};
}

0 comments on commit 3c00e25

Please sign in to comment.