How do i customize the CSS of the google docs view iframe?
I realize that the iframe is getting the content from a cross domain source which i do not control, i was
I asked this so i could post the solution. Its totally hacky and based off of a an answer from another thread on SO.
I had to make a few modifications to get it working because the answer linked above didn't quite work with google docs.
Basically you proxy the requests server side, modify the html and then relay the iframe contents.
','', $content);
header('Content-type: text/html; charset=utf-8');
echo $content;
}
?>
Make sure to change the line:
file_get_contents('http://docs.google.com/viewer?url=http%3A%2F%2Fwww.someurlhere.com%2Fgoogledocs%2Ftest.docx&embedded=true');
to the applicable url for the iframe you are trying to host.
Also change the line:
$content = str_replace('','', $content);
To link to your stylesheet.