Alcumus/react-doc-viewer

Default pagination option with PDF

Opened this issue · 3 comments

Do I need to create a new custom renderer if I need the paginated state to false by default ? Or a config exist to customize the initialPDFState. Thank you

`export type IPDFState = {
zoomLevel: number;
paginated: boolean;
numPages: number;
currentPage: number;
mainState?: IMainState;
};

export const initialPDFState: IPDFState = {
zoomLevel: 1,
paginated: true,
numPages: 0,
currentPage: 1,
};`

Did you find a solution @fredc97?

@blackhill please try the following,

import * as state from 'react-doc-viewer/build/plugins/pdf/state/reducer';
state.initialPDFState.paginated = false;

@zhuweicz your solution, works for me.. thanks..