azago Posted August 7, 2020 Posted August 7, 2020 I need to be able to rotate the images of a PDF inside the UniPDFFrame object The problem is that the rotation buttons are on the inside the secondarytoolbar 1) Is it possible to rearrange the buttons so that the rotation buttons are at the same level as the zoom buttons (toolbarViewer) ? alternatively 2) It is possible to send (using an external button) a command to UniPDFFrame to execute PageRotateCw or PageRotateCcw or 3) It is possible to send a char 'r' o Shift-r (shortcut) to UniPDFFrame to execute rotation In the letter case i tried generic delphi code PostMessage(UniPDFFrame.Handle, WM_CHAR, Ord('r'), 0); but non working Thank's Angelo Quote
Hayri ASLAN Posted August 8, 2020 Posted August 8, 2020 On 8/7/2020 at 6:09 AM, azago said: I need to be able to rotate the images of a PDF inside the UniPDFFrame object The problem is that the rotation buttons are on the inside the secondarytoolbar 1) Is it possible to rearrange the buttons so that the rotation buttons are at the same level as the zoom buttons (toolbarViewer) ? alternatively 2) It is possible to send (using an external button) a command to UniPDFFrame to execute PageRotateCw or PageRotateCcw or 3) It is possible to send a char 'r' o Shift-r (shortcut) to UniPDFFrame to execute rotation In the letter case i tried generic delphi code PostMessage(UniPDFFrame.Handle, WM_CHAR, Ord('r'), 0); but non working Thank's Angelo Hi Please use this code: with UniPDFFrame1, JSInterface do begin JSCallDefer('iframe.contentWindow.document.getElementById("pageRotateCw").click',[], 500); end; Quote
azago Posted August 8, 2020 Author Posted August 8, 2020 Thank's Page Rotate work. I have an evolution on my software. I replaced the bar of pdf.js with a UniToolbar. How to send a command from change the zoom, for example "page width" to current pdf ? It's a selection and not working the click action. Thank's Angelo Quote
Sherzod Posted August 8, 2020 Posted August 8, 2020 4 hours ago, azago said: How to send a command from change the zoom You can try this approach I think: UniPDFFrame1.JSInterface.JSCall('iframe.contentDocument.getElementById("zoomIn").click', []); UniPDFFrame1.JSInterface.JSCall('iframe.contentDocument.getElementById("zoomOut").click', []); Quote
azago Posted August 9, 2020 Author Posted August 9, 2020 Sherzod, in my application I have already linked the various buttons to the actions of the pdf.js What I miss and what I would like to be able to do is associate to these last 3 buttons the action of changing pdf scales That is, they should execute the command as if the selection of The question How to associate the same action as the selection scaleSelect change to a Unibutton ? Thanks Angelo Quote
Sherzod Posted August 10, 2020 Posted August 10, 2020 22 hours ago, azago said: How to associate the same action as the selection scaleSelect change to a Unibutton ? Hi, I will try to check. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.