You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can we control all of the window parameters? I think this will be useful.
Actually I only need fullscreen property but controlling the other properties could be good.
I think we could make an object property (windowParams) and override it.
classExampleextendsReact.Component{render(){return(<div><ReactToPrintwindowParams={{fullscreen: 'yes',}}trigger={()=><ahref="#">Print this out!</a>}content={()=>this.componentRef}/><ComponentToPrintref={el=>(this.componentRef=el)}/></div>);}}
And we could convert this object to string. index.js
constwindowParameters={status: 'no',toolbar: 'no',scrollbar: 'yes',
...windowParams}//Need a good stringify algorithm or npm projectletprintWindow=window.open("","Print",windowParameters.stringifyProperly(),"false");
What do you think?
The text was updated successfully, but these errors were encountered:
@codesignist It sounds reasonable but I am hoping to get away from the older implementation done via a window popup and rely on the iframe one i created in the beta release. A lot of people have cross origin issues I would love to resolve with that
Can we control all of the window parameters? I think this will be useful.
Actually I only need fullscreen property but controlling the other properties could be good.
https://github.com/gregnb/react-to-print/blob/f03aa02caf9a871b9cbf90e9a3c5d1a09fa4f144/src/index.js#L59
I think we could make an object property (windowParams) and override it.
And we could convert this object to string.
index.js
What do you think?
The text was updated successfully, but these errors were encountered: