6

What the title says. I know PDFs exported from Google Docs are version 1.4, but which versions does it support when viewing PDFs?

I'm asking because I'm having problems with PDFs generated with the PHP TCPDF library, which uses the latest version of the PDF standard (1.7). Namely, when viewed in Google Docs, these PDFs are missing some text - sometimes all bold or italic text, sometimes all regular text while bold and italic render fine.

For instance, take a look at the following PDF: https://docs.google.com/open?id=0B-zxKExddZ1-S1M0NHhVQWExZms

The first row should say "freesans regular", but the text is missing (or actually is rendered in white and thus invisible). Other PDF programs like Adobe Reader and Foxit Reader show the text correctly.

Also, compare with this PDF: https://docs.google.com/open?id=0B-zxKExddZ1-SVI1aDU0V2c4Vmc

It's the same content, only saved with Word 2007, which uses PDF version 1.5. All text renders correctly, which leads me to believe that perhaps Google Docs doesn't support the latest PDF standards. Anyone know if that's the case?

3
  • 1
    Do you have any way to produce a PDF 1.7 document using a different tool, as a test? Maybe it is possible there is something about the way that PHP TCPDF is producing the document which is causing the Docs Viewer to choke? Jun 15, 2012 at 15:26
  • 1
    @ShannonWagner Nope, PDF 1.5 is the latest I can do with other methods at my disposal. Also, the author of TCPDF assured me that the library generates fully valid PDF 1.7 documents. At any rate, this is a moot point for me right now since I managed to find a font that renders correctly in Google Docs (which probably points to this being a combination of TCPDF, Google Docs and the font(s) used being not 100% compatible).
    – Indrek
    Jun 15, 2012 at 18:57
  • 1
    IMO assuring 'fully valid PDF 1.7' is not possible for anyone, even Adobe. I converted your test1.pdf to a postscript with "Export..." in Adobe Acrobat Pro 9.5.1, then converted it back to PDF (which by chance was set to PDF 1.5). The upload to Google Docs also fails to display the first line properly, so it's not a 1.7 issue. Another point is that the fonts in the test1.pdf are encoded differently than those in the test2.pdf, which might be the part of the problem. Jun 22, 2012 at 20:53

2 Answers 2

1

There is no mention of the supported version number on either the Google Docs Viewer tool page or the View files in Google Docs page from Docs Help.

I don't know if it is possible to give a complete answer to your question but my best guess is that there is not any officially supported version, but rather that the team tries to keep the tool as up-to-date as possible and to support as many features of the latest version of PDF as possible.

Since the viewer is provided as a web service, Google doesn't necessarily have to think about supported versions in the traditional way. They may be closely monitoring usage and as they receive error reports during rendering of documents from the web service, they may be working to resolve those problems so that the percentage of successful views is as high as possible. After all, in my experience there have always been vendors who "supported" a particular version of PDF but which did not successfully render particular documents due to bugs in the rendering engine - but the existence of bugs didn't change the officially supported version number.

0

I have had this problem for a few weeks, the text in my documents was not showing up. I just now solved it as follows: I created a new folder in my google drive and uploaded all of the TCPDF examples (from http://www.tcpdf.org/examples.php ) to see if there were any on which the text DID show up in the google viewer... indeed the text was visible on many of the examples. Next I compared my document with the simplest example which worked, the first change I tried fixed the issue. It was the font. In my TCPDF code I was setting:

$pdf->SetFont('dejavusans', '', 10, '', true);

I changed this to:

$pdf->SetFont('helvetica', '', 10, '', true);

I hope this might help in some way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.