Skip to content

IOS only showing images and HRs and not text #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
JustWoody opened this issue Apr 24, 2020 · 7 comments
Open

IOS only showing images and HRs and not text #118

JustWoody opened this issue Apr 24, 2020 · 7 comments

Comments

@JustWoody
Copy link

JustWoody commented Apr 24, 2020

This is probably me, but this plugin was working brilliantly, showing the html and css that I was passing to it in the PDF

Then due to the impending cliff edge with Apple of removing UIWebView I made a load of changes to my project to remove any links to UIWebView and since then this plugin is no longer outputting any text that is in my local html

Not sure if this plugin is reliant on any framework or library that I have accidentally removed

Any help would be appreciated + sorry if this is not the location for this

I am getting this in the log if that helps:
[Unknown process name] Failed to load /System/Library/PrivateFrameworks/CorePDF.framework/Versions/A/CorePDF

@cesarvr
Copy link
Owner

cesarvr commented Apr 24, 2020

At the moment the plugin is using WKWebView, so it should work fine without legacy WebKit.

The library don't use any dependencies aside from WebKit, have you updated to the last version ? I removed some UIWebView dependencies.

@JustWoody
Copy link
Author

Yes, as soon as I noticed the problem I removed and re-added the plugin

@cesarvr
Copy link
Owner

cesarvr commented Apr 24, 2020

Also now that I see (again) the title of the issue, your problem could be also that the HTML you are providing doesn't include the text.

To test this try to print the payload your are passing to the plugin to the actual document.

You can try something like:

/*
 Assuming you are generating the payload with a bunch of HTML
*/

document.write(payload)
//The point here is to print the content into the browser to see your check if the text is appearing. 
//The plugin should display the same thing.

@JustWoody
Copy link
Author

JustWoody commented Apr 24, 2020

Already did that too and in the log everything is in the HTML string including the text (thank you for trying so far)

Just to say again that this was all working including the text until I needed to get rid of UIWebView from my project and that is why I am thinking this the plugin or underlying framework is relying on something that I accidentally removed, annoyingly for me I didn't spot this not outputting the text until some time later and I can't remember all steps I took - that is why I am wondering if there are any other frameworks or libraries that are outside the plugin itself that are required

@JustWoody
Copy link
Author

Does it rely on coreGraphics as I removed that?

@cesarvr
Copy link
Owner

cesarvr commented Apr 24, 2020

Nop, the only dependency is WebKit which the plugin use to render the PDF.

Already did that too and in the log everything is in the HTML string including the text (thank you for trying so far)

If I was you, I would try to render the PDF content in the browser (not print in a console), another way to test this is to copy paste the logs on a HTML file and open it in the browser.

I know it was working before, but is something you might consider because at the end this plugin is just a WYSIWYG with respect to the browser.

Cheers.

@JustWoody
Copy link
Author

JustWoody commented Apr 24, 2020

I already also output the HTML to the browser as this is to allow the user to save what appears on the screen

P.S. thanks for the suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants