You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed along with the example in the documentation and I can't seem to get the styles to show up in the Print Preview for iOS.
-Since it's iOS, I set cssFile to www/styles.bundle.css
-Content is just the innerHTML of the page I'm trying to make a pdf of.
I'm not sure if cssFile is set to the correct path because the pdf looks completely unformatted
except for a couple colors from inline styles.
Any help would be appreciated!
Assuming that file is in the FileSystem then, in iOS you'll need to use the cordova-plugin-file, example:
if(cordova.platformId==='ios'){// this function is from the cordova-plugin-file...window.resolveLocalFileSystemURL(cordova.file.applicationDirectory,function(url){//url represents the asset folder www/// generate your template lettmpl=payload({css_file: url+'/'+cssFile,content: content})// generate PDFpdf.fromData(payload,opts).then(/.../)},function(err){console.log('error',err,' args ->',arguments)});
I followed along with the example in the documentation and I can't seem to get the styles to show up in the Print Preview for iOS.
-Since it's iOS, I set cssFile to www/styles.bundle.css
-Content is just the innerHTML of the page I'm trying to make a pdf of.
I'm not sure if cssFile is set to the correct path because the pdf looks completely unformatted
except for a couple colors from inline styles.
Any help would be appreciated!
The text was updated successfully, but these errors were encountered: