Hi,tacker support
I have three questions about Viewer SDK, hope you can provide some useful suggestion to me.
1、(About stamp)
I want to make a annotation as stamp just like this(Please check the file at the attachment), is there any way to do it through code via the SDK?
,
2、(About customize Viewer UI)
I cannot remove unnecessary items from menu, Does it have anything to do with licence?
3、(About toolbars visible)
I try to make some toolbars visible, some of operations were successful(example View.Bars[\"Menu\"].Visible), the other were failed(example View.Bars[\"PagesNavigation\"].Visible, View.Panes[\"Thumbnails\"].Visible and Bookmarks), What's the problem here?
Look forward to your reply!
if possible,Reply in c\c++ code please!
Regards,
Jin
some quesitons about Viewer SDK
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
-
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: some quesitons about Viewer SDK
Hi Jin.
1. launch the app with embedded pdf-control. Like end-user use the Customize Toolbars feature (right-click on any toolbar, select "Customize..." item) and build your own toolbars content.
2. next - use the "Menu/Edit/Export All Settings" feature and save all existing settings (including new toolbars layout) into a file (look also to FullDemo example from our SDK examples, tab "I/O Settings").
3. next - on each start of your app - call pdfViewer.LoadSettings(settingsFileName);
HTH
You may add text-box annot by running the JavaScript. For example:1、(About stamp)
I want to make a annotation as stamp just like this(Please check the file at the attachment), is there any way to do it through code via the SDK?
Code: Select all
string js = "
var annot = this.addAnnot
({
page: 0,
rect: [200, 280, 420, 300],
type: "FreeText",
contents: "Please check the file at the attachment.",
});
if (annot != null)
annot.readOnly = true;"
pdfViewer.RunJavaScript(js);
You may do it in next way:2、(About customize Viewer UI)
I cannot remove unnecessary items from menu, Does it have anything to do with licence?
1. launch the app with embedded pdf-control. Like end-user use the Customize Toolbars feature (right-click on any toolbar, select "Customize..." item) and build your own toolbars content.
2. next - use the "Menu/Edit/Export All Settings" feature and save all existing settings (including new toolbars layout) into a file (look also to FullDemo example from our SDK examples, tab "I/O Settings").
3. next - on each start of your app - call pdfViewer.LoadSettings(settingsFileName);
Use the correct way:3、(About toolbars visible)
I try to make some toolbars visible, some of operations were successful(example View.Bars[\"Menu\"].Visible), the other were failed(example View.Bars[\"PagesNavigation\"].Visible, View.Panes[\"Thumbnails\"].Visible and Bookmarks), What's the problem here?
Code: Select all
pdfViewer.SetDocumentProperty(docIdOrZeroForSDI, "View.Bars[\"<Name>\"].Visible", val);
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 2
- Joined: Sat Jun 06, 2015 4:44 am
Re: some quesitons about Viewer SDK
Hi Vasyl,
I am sorry that these questions were not clearly explained. I have reattached the three questions. Would you please kindly review the questions and provide me with clearly instructions. Thank you.
The form of the stmap is circle , the center is a star,text floats on the circumference, with the characteristics of China
I'm sure that the attachment was added successfully by a zip format, but it isn't posted on the article,now make up.
This means that i can't drop some items from a menu or toolbar,the only one that seem to support is visable\unvisable toolbars?
How can i drop some items from a menu through the Customize Toolbars dialog?
Can you provide the example by the c++ code please!
jin
I am sorry that these questions were not clearly explained. I have reattached the three questions. Would you please kindly review the questions and provide me with clearly instructions. Thank you.
The stamp what i mean is not a text, instead it was a style as attachment.You may add text-box annot by running the JavaScript. For example:
The form of the stmap is circle , the center is a star,text floats on the circumference, with the characteristics of China
I'm sure that the attachment was added successfully by a zip format, but it isn't posted on the article,now make up.
I know these steps,now the question is coming,i can’t drag the command item from commands list.You may do it in next way:
1. launch the app with embedded pdf-control. Like end-user use the Customize Toolbars feature (right-click on any toolbar, select "Customize..." item) and build your own toolbars content.
2. next - use the "Menu/Edit/Export All Settings" feature and save all existing settings (including new toolbars layout) into a file (look also to FullDemo example from our SDK examples, tab "I/O Settings").
3. next - on each start of your app - call pdfViewer.LoadSettings(settingsFileName);
This means that i can't drop some items from a menu or toolbar,the only one that seem to support is visable\unvisable toolbars?
How can i drop some items from a menu through the Customize Toolbars dialog?
Thank you for the correct method,and then i the have the other problem,how to show the thumbnails at the first time when open a new document?pdfViewer.SetDocumentProperty(docIdOrZeroForSDI, "View.Bars[\"<Name>\"].Visible", val);
Can you provide the example by the c++ code please!
jin
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: some quesitons about Viewer SDK
Exists one way to add stamp with any shape. Firtstly you must prepare your own stamp-collection. Use end-user viewer for that (Stamp Palette, add new stamp using "From PDF..." feature to keep vector-image). Then look to newly create file inThe stamp what i mean is not a text, instead it was a style as attachment.
"C:\Users\<UserName>\AppData\Roaming\Tracker Software\PDF-XChange Viewer\2.0\Stamps\<GuidOfNewCollection>.pdf"
open this file an look for:
<<
/Names [(<GuidOfStamp1>=<Stamp1DispName>) ... (<GuidOfStamp2>=<Stamp2DispName>) ...]
>>
and the you will be able to use js for adding of necessary stamps from your collection:
var aa = this.addAnnot({type: "Stamp", page: 0, rect: [0, 0, 300, 300], AP: "<GuidOfStamp>"});
Strange. It should be too easy.. For example, launch the Viewer end-user app. and show the "Customize Toolbars..." dialog. Then select "Commands" tab. There you should be able to drag any command item from list on to any existing toolbar and drop it. When you moving over toolbar/menu it shows special orange drop-mark to indicate position of insert.. It looks different for you?I know these steps,now the question is coming,i can’t drag the command item from commands list.
Sure:how to show the thumbnails at the first time when open a new document?
Code: Select all
CComBSTR str;
str = L"View.Panes[\"";
str.Append(L"Thumbnails"); // "Bookmarks", "Comments", "Attachments"...
str.Append(L"\"].Visible");
CComVariant val(true);
pdfViewer->SetDocumentProperty(docIdOrZeroForSDI, str, val);
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.