Problem setting FullScreenMode

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

cew
User
Posts: 213
Joined: Tue Feb 01, 2011 8:14 am

Problem setting FullScreenMode

Post by cew »

Hi,

using F11 toggling fullscreenmode works fine.

Now I want to set if from code using the following lines:

Code: Select all

        SetProperty("Commands[\"FullScreenMode\"].State", "On", 0);
        DoVerb(null, "ExecuteCommand", "FullScreenMode", out dataOut);
Without setting the command to "On", I get the "Command is disabled currently" exception.

The command also does not work in your "FullDemo" demo project.
Steps to reproduce:
1. Document-Tab: load a pdf
2. View-Tab: activate some toolbars,
3. Commands-Tab:
  • a: select "33014 FullScreenMode" (currently offline) and hit button "Turn On"
    b: select item again and click "Execute"
=> nothing happens.

Also I can't enable "FullScreenModeExit". But I think that's because the fullscreen mode is not active, right?

Could you please have a look at these topics?
Thank you!


Best regards
cew
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: Problem setting FullScreenMode

Post by Vasyl - PDF-XChange »

Hi, cew.

I'm afraid the "FullScreenMode" command is inaccessible in SDK mode, this feature is for end-user only.

In v3 SDK we will implement it for developers also...

Currently you may realize your own "FullScreen" feature. For this:
- maximize your form to current work-area
- maximize our control in your form
- hide all toolbars/subpanes in our control...

Best
Regards.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
cew
User
Posts: 213
Joined: Tue Feb 01, 2011 8:14 am

Re: Problem setting FullScreenMode

Post by cew »

Vasyl-Tracker Dev Team wrote: I'm afraid the "FullScreenMode" command is inaccessible in SDK mode, this feature is for end-user only.
Nice wording for a "bug" of a documented command.
See PDF-XChange Viewer SDK Reference

Code: Select all

2.2.2.2.1 Command List
FullScreenMode                33014      FullScreen Full Screen    Maximizes Window to Full Screen
FullScreenModeExit           33020      Full Screen Exit             Restores Window from Full Screen
It took me more than 2 hours to find out that it's "end-user only"

Best
cew
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Problem setting FullScreenMode

Post by John - Tracker Supp »

Apologies CEW for the misinformation in the Help File - this is due to the fact it was extracted from a table containing over 500 UI commands in the Viewer that allow functionality currently in the end user viewer to be added to the Developer SDK - now or at a future date.

In compiling the Help - this was added in error ...

It cannot easily be added in the current application architecture to the SDK due to the way the the form container functions when placed in your application - as already intimated this will be modified to allow this functionality in Version 3 of the SDK.

It was a genuine error and we do apologise for the wasted time ...
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
EzWz
User
Posts: 42
Joined: Mon Oct 10, 2011 9:03 am

Re: Problem setting FullScreenMode

Post by EzWz »

Hi, i'm a developer dealing with the same problem. In the reply i see this function is not yet available and we need to simulate this functionality somehow for now.
I don't want to hijack this topic, but since it is the same issue i post it here.

Situation:
The user is viewing a windowed viewer that is part of a complete userinterface with a bunch of other stuff.
Some button on a toolbar under the viewer has a "fullscreen" function.
The user presses the button, expecting a full view of the document in the viewer.

Obviously i can make a fullscreen container with a fullscreen viewer on it.
I can load the same document in this 2nd - fullscreen - viewer than was being shown in the first - windowed - viewer.
It would be nice though if you could post how we can make it so that we get the same position in the document as was shown in the first viewer (i.e. the user scrolled down to page 3, so i want to copy this position to the fullscreen viewer). Same might go for the zoom setting and the pagelayout and maybe there are more like these?

So basicly my question is: if we need to simulate this fullscreen functionality, how do i copy the position and layout settings from the first to the second viewer and which settings should this be?
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: Problem setting FullScreenMode

Post by Vasyl - PDF-XChange »

Hi, EzWz.

You may obtain the current page index, page zoom and layout and apply it to new document in FS-simulation:

Code: Select all

// read from existing 'normal' document
int curPage;
normalPdfViewer.GetDocumentProperty(srcDocId, "Pages.Current", out curPage, 0);
double pageZoom; // double, percents
normalPdfViewer.GetDocumentProperty(srcDocId, "Pages.Zoom", out pageZoom, 0);
int pageZoomMode; // fit-width, fit-page, etc
normalPdfViewer.GetDocumentProperty(srcDocId, "Pages.ZoomMode", out pageZoomMode, 0);
int pageLayout; // single-page, one-column, two-columns
normalPdfViewer.GetDocumentProperty(srcDocId, "Pages.Layout", out pageLayout, 0);
// apply to corresponding document in FS-simulation: 
simulFsPdfViewer.SetDocumentProperty(FsDocId, "Pages.Zoom", pageZoom, 0);
simulFsPdfViewer.SetDocumentProperty(FsDocId, "Pages.ZoomMode", pageZoomMode, 0);
simulFsPdfViewer.SetDocumentProperty(FsDocId, "Pages.Layout", pageLayout, 0);
simulFsPdfViewer.SetDocumentProperty(FsDocId, "Pages.Current", curPage, 0);
...
Info: with V3 SDK you will be able to display any document in FS-mode, without any simulation...

HTH
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
1shadow
User
Posts: 13
Joined: Tue May 21, 2013 7:19 am

Re: Problem setting FullScreenMode

Post by 1shadow »

Hi, is this resolved already?
If not please provide a date of the release where it should be "fixed" :)
Thank you!
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19868
Joined: Mon Jan 12, 2009 8:07 am

Re: Problem setting FullScreenMode

Post by Stefan - PDF-XChange »

Hello 1shadow,

The PDF Editor SDK (Viewer V3) is not yet released - so you would need to use the workaround offered by Vasyl above for now.

Regards,
Stefan
1shadow
User
Posts: 13
Joined: Tue May 21, 2013 7:19 am

Re: Problem setting FullScreenMode

Post by 1shadow »

Could you direct me to how I could trigger the "Simulation Mode". I'm using your Xchange Viewer SDK in combination with java. I'm using pure OLE Calls, where, as I understand, is the Fullscreen function disabled. So anything that I open through OLE Container will have this functionality disabled.
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: Problem setting FullScreenMode

Post by Vasyl - PDF-XChange »

Hi 1shadow.

The 'Simulation Mode' means that you need to:

1. Create your own OLE-container as simple popup window without caption and borders.
2. This window must embed our pdf-control and our control (without toolbars and menus, the tab-bar is hidden also) must take entire client area of this window (process each WM_SIZE event). Note: your program can use more than one of our controls at the same time.
3. add to your UI the button 'Go to Fullscreen' or something similar..
4. when user activates FS then your application should create such popup window with embedded pdf-control, programmatically open the same document, go to the same page, and then - show and maximize this popup window on the desktop.

HTH.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.