-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Only a question or hint. We change our current pdf viewer to the new PdfViewer from ZK. Our pdf pages are all in landscape mode (not normal portrait mode) created. So i must to initialize the new PdfViewer with
pdfViewer.setRotation(90); // because, orientation of the reports is landscape
Is there no automatic that the pdfViewer knows the print mode of the media (protrait/landscape) when gets the pdf ?
thanks Stephan
Hi Terrytornado,
That's a pretty good suggestion, will be stealing that :) here's the feature request: https://tracker.zkoss.org/browse/ZK-4740
You can override it, but only by overriding the whole /web/js/zkex/pdfviewer/Pdfviewer.src.js and /web/js/zkex/pdfviewer/Pdfviewer.js files in your project.
You can update here:
_getPage: function _getPage(pageNum) {
var _this3 = this;
var pdfFirstRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (!this._pdf) return;
if (this._pageRendering) {
this._pendingPageNum = pageNum;
return;
}
this._pageRendering = true;
return this._pdf.getPage(pageNum).then(function (page) {
var viewport = page.getViewport({
scale: _this3._zoom,
rotation: _this3._rotation += page._pageInfo.rotate //THIS PART ADDING THE ROTATION
}),
I've also put in a feature request to improve on that, and allow granular overrides.
Asked: 2020-12-02 23:47:44 +0800
Seen: 22 times
Last updated: Dec 29 '20
bug with intboxes on mobile devices
zk keikai-how to add custom button/label to formulabar?
zk-keikai- update multiple cells parallel at same time asynchronously
zk-keikai-How to auto fit column width based on text
zk-keikai-ClipboardPateEvent-called twice
Reference a spring bean from VariableResolver