Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17752] iOS8: PDF inside WebView has black border

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionCannot Reproduce
Resolution Date2015-10-05T04:42:49.000+0000
Affected Version/sRelease 3.4.0, Release 3.5.0
Fix Version/sn/a
ComponentsiOS
LabelsTCSupport, iphone
ReporterMichael Gangolf
AssigneeEric Merriman
Created2014-09-17T12:22:10.000+0000
Updated2017-03-27T20:44:57.000+0000

Description

Problem Description

PDF inside webview has a black border.

Steps to reproduce

1. Create a new mobile project (classic titanium) 2. Copy the PDF file attached here to Resources. 3. Paste this code into app.ks:
var win = Titanium.UI.createWindow({
    backgroundColor:"#fff"
});
 
var webview = Ti.UI.createWebView({
    url : '/pdf_003.pdf',
    scalesPageToFit : true,
    top : 10,
    left : 0,
    backgroundColor : 'transparent',
    disableBounce : true,
    willHandleTouches : true
}); 
 
win.add(webview);
win.open();
4. Run it in a device.

Expected Results

The PDF showing just fine.

Actual Results

I get a black border around the webview. Not visible under iOS7 with the same code

Extra info

http://stackoverflow.com/questions/25813551/rendering-pdf-in-uiwebview-ios-8-causes-a-black-border-around-pdf

Attachments

FileDateSize
pdf_003.pdf2014-09-18T15:38:49.000+0000139131
webview.jpg2014-09-17T12:22:10.000+000046007

Comments

  1. Mauro Parra-Miranda 2014-09-17

    Hello, does this happen with any PDF you tried? Do you have a sample PDF that shows the issue? Thanks!
  2. Michael Gangolf 2014-09-18

    pdf file
  3. Michael Gangolf 2014-09-18

    Added a pdf file (there are around 100 with the same border). The same PDF worked fine on iOS7. Also found this: http://stackoverflow.com/questions/25813551/rendering-pdf-in-uiwebview-ios-8-causes-a-black-border-around-pdf perhaps this is the same
  4. Michael Gangolf 2014-09-26

    iOS 8.0.2 still has the same behavior
  5. Michael Gangolf 2015-01-15

    Still happens in Ti 3.5.0
  6. Michael Gangolf 2015-01-30

    Solution might be here: http://technopote.com/how-to-remove-black-border-from-pdfuiwebview-in-ios-8/ I've tried to add this to the TiUIWebview.m file but I wasn't able to compile it (since I don't know any Xcode :) ) {noformat} PluginLoading: Required plug-in compatibility UUID .... for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Unity4XC.xcplugin' not present in DVTPlugInCompatibilityUUIDs {noformat}
  7. Michael Gangolf 2015-10-02

    can be closed! iOS9 and Ti SDK 5.0.2.GA are not showing a block border
  8. Chee Kiat Ng 2015-10-05

    Thanks for informing us.
  9. Lee Morris 2017-03-27

    Closing ticket with reference to the above comments.

JSON Source