Jump to content

UniPDFFrame modify rotation button


azago

Recommended Posts

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

Cattura.JPG

Link to comment
Share on other sites

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

Cattura.JPG

Hi

Please use this code:

  with UniPDFFrame1, JSInterface do
  begin
    JSCallDefer('iframe.contentWindow.document.getElementById("pageRotateCw").click',[], 500);
  end;

 

Link to comment
Share on other sites

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

 

 

sample.png

Link to comment
Share on other sites

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', []);

 

Link to comment
Share on other sites


Sherzod,
in my application I have already linked the various buttons to the actions of the pdf.js

image.png.1749fd9754b44595df5ec022b4bf4ff5.png

 

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

image.png.79bfb84e44daf90545f15f77b6a48bc8.png

That is, they should execute the command as if the selection of

image.png.443bb9b1558f1f0e72e1f8ad39438218.png

image.png.27e94cbec1841660e1c0c29ac4f591e4.png

image.png.11616782859128421775b6fe61a899cb.png

 

The question
How to associate the same action as the selection scaleSelect  change to a Unibutton ?

Thanks

Angelo

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...