Mac office.js Word add-in open pdf using window.open - office-addins

Env: Mac, Office 2016 build 15.26
On a button click, I fetch pdf base64 bytes from the server and call window.open to launch another browser instance to open pdf.
window.open("data:application/pdf;base64,"+ pdfbytes)
On Windows add-in, it works fine.
On Mac, the dialog box appears asking "choose application to launch'data:application/pdf"
All the applications are grayed out, so I could not select Safari or Chrome to launch pdf.
When I open add-in URL from Chrome browser on Mac, and click the same button, it launched new Chrome tab instance and opens the pdf fine.
Any better way to show pdf through word add-in?

this is a bug in the product, its now fixed and will ship as part of the December Office update for Mac. thanks for reporting this and making our platform better!

Related

How to open third party site in iframe using React JS

I want to open office 365 file in iframe of react web app, but it showing error in iframe but it's working propely in browser tab
Error:
Firefox Developer Edition Can’t Open This Page
To protect your security, login.microsoftonline.com will not allow Firefox Developer Edition to display the page if another site has embedded it. To see this page, you need to open it in a new window.

Open instagram ad link in default mobile browser

We are creating Instagram ad for the product (from ads manager panel) . It contains the link to the webpage , where one of the steps is that you need to upload the picture.
Problem here is that ad is opened in some kind of "instagram" browser, not in like chrome or safari. And when user tries to upload the image, the process crashes.
Is it possible to force open this ad in default browser?
About thirty seconds after I initiated the bounty, I found the solution. So simple it was difficult...
Instead of, e.g.: https://www.instagram.com/p/LetTerS -- simply replace with https://m.instagram.com/p/LeTtErS/
When opened on desktop, Chrome (tested) quickly resolves back to "www." - the phone opens the link in a browser properly (tested on Nexus 5X, Samsung Something).

Web browser connection in codename one

when url like youtube.com or others are set, it opens in webBrowser but when pdf link is kept nothing happens, why is that??
WebBrowser pdfview = new WebBrowser();
pdfview.setURL("http://www.codenameone.com/files/developer-guide.pdf");
//this link downloads the pdf file in browser but does nothing in codename one browser...
f.addComponent(pdfview);
i jst want to view this pdf from the browser
Opening a PDF in the browser component will only work on devices and won't work in the simulator.

Cannot debug Silverlight application running through VS 2010

I have an start up page called Default.aspx . Have written an javscript function inside the Head tag which opens an other aspx page and closes this page . The other aspx page of mine has silverlight object/ content render on that page . Due to this my debugger doesnt gets attached to the running silverlight application , also when i go to manually attach to the running Silverlight Application it doesnt works , i saw that type of process shown is script / silverlight / x86.
I am doing this all as my login page is only created in silverlight .
Any one have idea how can i get debugger atached.
Edit :
Below link explains the same what i am facing :
Visual Studio Attach to Process - change default automatic code type (Silverlight instead of Script)
To enable Silverlight debugging:
Right click on the Web project hosting the Silverlight application in Solution Explorer
Select "Properties"
Click the "Web" tab
Check the "Silverlight" box in the "Debuggers" section
I had problems debugging Silverlight in Chrome, while in IE it worked like a charm
A very nice utility is the WoVS Default Browser Switcher which can be installed using the Extension Manager (Tools | Extension Manager...)
This tool allows you to set the default browser to be used when debugging your project. In my experience Visual Studio only connects well to IE.
Using the tool I can keep another browser as my default browser but use IE for debugging.
Just use IE as default browser.
It doesn't work properly until you check silver-light debug checkbox and use IE as the others told.
By the way set web application as start-up project.

Set default browser when debugging WPF?

I'm using VWD Express 2008 to develop a WPF Browser Application. When I start debugging, it launches the XBAP in my default browser, which is Opera. Obviously, XBAPs don't work in Opera, so I have to repeatedly right-click on the document to open in IE.
Is there any way to change the settings for PresentationHost.exe so that it always opens with IE? A registry setting, perhaps?
Setup the external program as Internet explorer path and the command line arguments as your path to xbap file within quotes, like shown below:
A simple and easy way to do this is to associate *.htm or *.html (don't remember exactly, try both) files with IE, and it will work for XBAP.
UPDATE:
Solution described above works for "Start external program option".
For "Start browser with URL" option you actually can set default browser in Visual Studio. I don't find how to set it through Tools -> Options, but you can achieve it by following steps:
In your solution explorer find a file which meant to be viewed in browser (e.g. *.htm, *.svc)
Right click on this item and choose "Browse With..."
In the opened window you'll see a list box with installed browser and one of them will be marked as default.
In the list box Choose "Internet Explorer" and click "Set as Default" (if there is no IE browser in the list just add it).
Set Default browser to IE for WPF:
Project preporties -> Debug tab properties...
Remove "-debug" only, if there in Command line arguments:(under Start Options)
Choose Start external program ( under Start Action) and give the path of "iexplore.exe"
(EX: C:\Program Files\Internet Explorer\iexplore.exe )
XBAP does work in Opera (and I can make a screenshot to prove the point). Consider updating your Opera version and/or .NET (do you have SP1?).
Check out this post on the msdn forums.
The workaround I found works OK, but requires that Firefox be your default browser:
In Firefox, open the menu Tools / Options / Downloads.
Then click on "View & edit actions" and change the action for XBAP applications to the Windows Presentation Host.
Now when I debug, Firefox receives the XBAP, but then it automatically pass it to the presentation host, which runs into IE. A bit cumbersome, because everytime a new tab gets opened in Firefox, but it's OK. It also works with F5, so you can debug.
Alternatively, you can start IE, navigate to the XBAP URL and then manually attach the debugger to the PresentationHost process (not to IE though).

Resources