In the process of developing a UWP app using javascript, I have created a list of links that are connected to PDF files stored locally in the app. The ultimate goal is to offer a collection of hands-free documentation for the Hololens (Windows AR) device. To open the PDFs within the app, I use the following code:
Windows.System.Launcher.launchFileAsync(file)
Everything functions seamlessly as intended. However, a challenge arises with the hyperlinks contained within the PDF files which reference each other. While I can adjust these hyperlinks during the initial PDF generation, ensuring they still link to one another when opened in the user's default PDF application presents a dilemma. It should be noted that the default PDF application may vary between users, similar to how Adobe Acrobat works on Windows.
Below is the current working code snippet:
window.onload = function () {
document.getElementById("#id").onclick = function (evt) {
pdfopen("pdf.pdf")
}
function pdfopen(pdf) {
var imageFile = "assets\\" + pdf;
// Retrieve the PDF file from the app's directory
Windows.ApplicationModel.Package.current.installedLocation.getFileAsync(imageFile).then(
function (file) {
// Launch the retrieved file using the default app
var options = new Windows.System.LauncherOptions();
Windows.System.Launcher.launchFileAsync(file)
}
);
Any assistance in solving this hyperlink referencing issue would be greatly appreciated! <3