{ "id": "165177", "key": "TIMOB-24272", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2017-02-15T10:32:52.000+0000", "created": "2017-01-04T07:00:13.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "issuelinks": [ { "id": "56393", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "171326", "key": "TIMOB-25868", "fields": { "summary": "Windows: Implement WebView.onlink callback", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "54290", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "160045", "key": "TIMOB-23319", "fields": { "summary": "Windows: Ti.Platform.openURL does not open some media files", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-03-19T04:59:33.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "h5. Problem Description:\r\n\r\nWhen creating a WebView whose url property points to a PDF resource (like http://edis.ifas.ufl.edu/pdffiles/fe/fe57700.pdf or http://bdrconsultants.com/goalsetting.pdf ) the WebView is not even shown in the UI of the app, while, for instance, in iOS it'll display a WebView and the PDF within it.\r\n\r\nh5. Steps to Reproduce:\r\n\r\n1. Create a Alloy project and use the attached index.xml, index.tss and index.js files.\r\n2. Run the app on Windows Emulator\r\n2. WebView will not load upon launching\r\n3. Tried with Titanium classic app and it does not work there as well. Please find the sample \r\n\r\n\r\n{code}\r\nvar webview = Titanium.UI.createWebView({url:'http://edis.ifas.ufl.edu/pdffiles/fe/fe57700.pdf'});\r\n var window = Titanium.UI.createWindow();\r\n window.add(webview);\r\n window.open({modal:true});\r\n{code}\r\n\r\nh5. Current Behavior:\r\n1. It works on iOS app and shows the pdf inside the WebView and works as expected.\r\n2. On windows app it does not show anything.\r\n\r\nh5. Expected Result:\r\n\r\nUpon launching, WebView should open the pdf content for windows app similar to iOS.\r\n\r\nNote: I tried with classic app and sample code is attached above and it does not work with that as well.\r\n", "attachment": [ { "id": "61172", "filename": "index.js", "author": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "created": "2017-01-04T06:58:59.000+0000", "size": 399, "mimeType": "text/javascript" }, { "id": "61173", "filename": "index.tss", "author": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "created": "2017-01-04T06:58:51.000+0000", "size": 281, "mimeType": "application/octet-stream" }, { "id": "61174", "filename": "index.xml", "author": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "created": "2017-01-04T06:58:43.000+0000", "size": 85, "mimeType": "text/xml" } ], "flagged": false, "summary": "Universal Windows App (UWP) - Ability to display PDF in webview", "creator": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "subtasks": [], "reporter": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "environment": "Appc CLI: 6.1.0\r\nSDK: 6.0.1.GA\r\nti CLI: 5.0.11\r\nnode: 4.6.0\r\nOS: Windows 10", "closedSprints": [ { "id": 839, "state": "closed", "name": "2017 Sprint 04 SDK", "startDate": "2017-02-12T23:36:00.961Z", "endDate": "2017-02-26T23:36:00.000Z", "completeDate": "2017-02-26T17:38:54.172Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "404099", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~nmishra] I believe displaying a PDF in a webview is not supported by UWP, see the [WebView class reference|https://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.webview.aspx] and [MSDN|https://social.msdn.microsoft.com/Forums/windowsapps/en-US/49aff2a4-2250-4537-8490-a57b88df0914/uwphow-to-display-a-url-in-webview-which-contains-a-pdf-file?forum=wpdevelop]. To display PDFs [Windows.Data.Pdf|https://msdn.microsoft.com/en-us/library/windows/apps/windows.data.pdf.aspx]. So this should probably be a feature request for an equivalent _Windows only_ API in Titanium. ", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2017-01-04T20:43:22.000+0000", "updated": "2017-01-04T20:43:22.000+0000" }, { "id": "404259", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "So basically UWP WebView doesn't support opening PDF. Microsoft indicates to use [Windows.Data.Pdf|https://msdn.microsoft.com/en-us/library/windows/apps/windows.data.pdf.aspx], but yes currently [Titanium Direct PI Access|https://docs.appcelerator.com/platform/latest/?mobile=/guide/Windows_Runtime_Direct_API_Access] is broken now and I don't expect fully functional native programming in Hyperloop for Windows will be available on 6.1.0 release.\r\n\r\nI saw a interesting workaround for this: [Use Google Docs Viewer to open pdf|http://stackoverflow.com/questions/37678638/how-to-display-a-url-in-webview-which-contains-a-pdf-fileuwp-xaml]. That way you don't have to depend on/implement anything but just navigate to the url. This may mean you need to log-on to the Google Docs though.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-01-09T01:17:17.000+0000", "updated": "2017-01-09T01:17:17.000+0000" }, { "id": "405349", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I took a quick look at this but I was not able to find a good way to view local pdf file with Google Docs. I expect we could do this by developing new Titanium module with use of [Windows.Data.Pdf|https://msdn.microsoft.com/en-us/library/windows/apps/windows.data.pdf.aspx] API.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-01-26T02:18:31.000+0000", "updated": "2017-01-26T02:18:31.000+0000" }, { "id": "406385", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am able to view PDF document on my Windows 10 Mobile device when I use Microsoft's [File Explorer|https://www.youtube.com/watch?v=nukqWSDJPRw]. So we could save pdf documents by Ti app to somewhere locally on the device, and we then could ask user to open it via File Explorer app.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-02-06T09:19:48.000+0000", "updated": "2017-02-06T09:19:48.000+0000" }, { "id": "407083", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "So I would resolve this ticket as \"Not Our Bug\" for now, because Windows {{WebView}} does not support it. We have a workaround for it, by using Google Docs Viewer when it is on the public (http web). We are also pushing another workaround in TIMOB-23319, which enables you to open local pdf file by {{Ti.Platform.openURL}}.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-02-15T10:32:52.000+0000", "updated": "2017-02-15T10:32:52.000+0000" }, { "id": "407100", "author": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "body": "Thanks [~kota]. ", "updateAuthor": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "created": "2017-02-15T17:17:48.000+0000", "updated": "2017-02-15T17:17:48.000+0000" }, { "id": "415730", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket with reference to the previous comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T19:01:02.000+0000", "updated": "2017-03-24T19:01:02.000+0000" } ], "maxResults": 18, "total": 18, "startAt": 0 } } }