Alcumus / react-doc-viewer

Apache License 2.0
243 stars 103 forks source link

Default pagination option with PDF #90

Open fredc97 opened 3 years ago

fredc97 commented 3 years ago

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, };`

blackhill commented 2 years ago

Did you find a solution @fredc97?

zhuweicz commented 1 year ago

@blackhill please try the following,

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

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