Launch PDF Windows Phone 7.1 without Component One - windows-phone

I have PDF file in my assets folder in Windows Phone 7.1.
I want to open that pdf file.
Uptil now i have found many examples but all are using component one controls.
I dont want to use component one.
I know I can't open pdf with in my application using native libraries.
Is there any way to open PDF from assets in web browser or I can launch Installed PDF reader application?
Any Idea?

Windows Phone 8:
You can write the following code in order to open PDF files (you need a PDF reader app):
private async void Button1_Click(object sender, RoutedEventArgs rea)
{
// Access your file. In this case, your local folder
StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
// Access the PDF file
StorageFile file = await local.GetFileAsync("YOUR_FILENAME.pdf");
// Launch the query.
Windows.System.Launcher.LaunchFileAsync(file);
}
Windows Phone 7:
There is no way to do without third party library like ComponentOne or Telerik.

Related

How to open a disk file with Capacitor?

I'm saving a file by running the following code with Capacitor:
Filesystem.writeFile({
path: fileName,
data: content,
directory: FilesystemDirectory.Documents,
//encoding: FilesystemEncoding.UTF8
});
Now, I would like to open it (it's a pdf). However, I don't see anything in FileSystem documentation about how to achieve that? I'm missing a FileOpener function.
The goal is that it gets opened with whichever pdf app the user has in the phone.
I'm using Vuejs.
I hope that this is helpful to you, a package for capacitor to read pdf. https://www.npmjs.com/package/capacitor-pdf-viewer-plugin

How to access Downloads folder in taiko automation

I want to verify whether file is downloaded or not after clicking download link.
I am using taiko for automating this task.
I tried to open recent downloads in browser by using these taiko commands goto("chrome://downloads/")
and press(['Control','J']) but both did't work.
Is there any other method to do the same task.And i want know why above commands are not working
Check out this example
You need to first set the download path:
// client function is imported from taiko
await client().send('Page.setDownloadBehavior', {
behavior: 'allow',
downloadPath: downloadPath,
});
You then need to download your file (trigger the action that results in the file getting downloaded - the example uses a click action. And then, after a suitable time has elapsed, you will check the download path that you registered earlier for existence of the file:
expect(path.join(downloadPath, 'foo.txt')).to.exist;

How to change this from "../ReportApi" automatically when I deployed?

I've made rdlc reports and view using Syncfusion report viewer and It runs successfully. But, when I deploy it in server then the report could't found. I have to change the path manually from here (the code I've attached)
</script>
<ej-script-manager></ej-script-manager>
In our ASP.NET Core application we are getting the report path from wwwroot folder. So we are using the WebRootPath for getting the wwwroot folder path as shown in below code example. In production side we need to include the report path.
public void OnInitReportOptions(ReportViewerOptions reportOption)
{
string basePath = _hostingEnvironment.WebRootPath;
FileStream inputStream = new FileStream(basePath + #"\ReportData\InvoiceTemplate.rdl", FileMode.Open, FileAccess.Read);
reportOption.ReportModel.Stream = inputStream;
}
Please consult the help documentation for how include the files when publishing the ASP.NET Core application.

Load Image From File and set into UnityEngine.UI.Image Unity

I try to load image from file and set into UnityEngine.UI.Image. the image is BirdDiedScreenShot.PNG. also define namespace
using System.IO;
But the problem is when i define path of image, Like
byte[] bytes = File.ReadAllBytes (Application.persistentDataPath + "/BirdDiedScreenShot.png");
in Above Code ReadAllBytes() method of File Class is not Work. It Give me Error like
System.IO.File' does not contain a definition forReadAllBytes'
What's the problem i don't Solve. how can i Fix This.? Please Give Me Suggestion to Solve this.. thanks...
This has to do with having "Web Player" selected as target platform.
When you click "File -> BuildSettings" in the Unity editor you see a little Unity icon next to the target platform. Switch to "PC, Mac & Linux Standalone" for example.
If you don't have the "PC, Mac & Linux Standalone" module loaded, check this thread: http://forum.unity3d.com/threads/5-3-released.372567/page-2#post-2414948
By the way, the actual name of the Windows module is called "Windows Build Support".
In the new Download Assistant you can choose which modules to install. (Can be found on Unitys download page http://unity3d.com/get-unity/download?ref=personal)
greetings

how do I find my AIR Application publisherID?

I need to find the publisherID of my native AIR application so I can use the browser invocation feature.
I have a working AIR Native Application Installer project (.exe) built with FlashBuilder 4.5 as a "signed native installer" using a self-signed certificate.
But I look in the install folder and cannot find the file 'META-INF/AIR/publisherid'. Also, I tried logging 'NativeApplication.nativeApplication.publisherID', but it shows as an empty string.
How do I get a publisherID?
You can invoke an AIR application using the described API even if the publisherID is missing. Just leave it blank, like that:
airSWF.launchApplication(appID, "", arguments);
publisherID is legacy. it's no longer used but continues to be supported for AIR applications compiled with AIR 1.5.2 and earlier.
AIR application descriptor elements: publisherID
you should refer to values in your descriptor file instead. for example, this is how you can obtain the version of your application based on that tag's value in the XML descriptor file:
var descriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
var ns:Namespace = descriptorFile.namespace();
trace("Version " + descriptor.ns::versionNumber);