Which application does Google use to display PDF attachments in gmail

I looked at traffic when google displays PDF attachments in gmail in a new window. Content is provided as PNG images for each PDF page. And its text can be selected. What does Google use on the server side to create a PNG file for a specific page in a pdf file? How does text selection in a png file work? Any ideas?

+5
source share
6 answers

By default, attachments are viewed reliably using https://docs.google.com/gview , but it turns out that you are allowed to request files via simple HTTP. This makes it a little easier to determine what is happening using Wireshark .

As you pointed out, it was already clear that PDF is converted on the server side to PNG ( ImageMagick is really a smart solution for this purpose), the obvious reason for this is to preserve the exact layout while maintaining the ability to view the file without having to view the PDF files.

, , , PDF XML /gview? a = gt & docid = & chan = & thid = ( ). Wireshark XML, Firefox Live HTTP Headers. :

<pdf2xml>
    <meta name="Author" content="Bruce van der Kooij"/>
    <meta name="Creator" content="Writer"/>
    <meta name="Producer" content="OpenOffice.org 3.0"/>
    <meta name="CreationDate" content="20090218171300+01'00'"/>
    <page t="0" l="0" w="595" h="842">
        <text l="188" t="99" w="213" h="27" p="188,213">Programmabureau</text>
        <text l="85" t="127" w="425" h="27" p="85,117,209,61,277,21,305,124,436,75">Nederland Open in Verbinding (NOiV)</text>
    </page>
</pdf2xml>

, ( w h), , , , , . JavaScript Google (, , , ), , . , , XML , , .

, (GPL), pdf2xml, , . :

<?xml version="1.0" encoding="utf-8" ?>
<pdf2xml pages="3">
  <title>My Title</title>
  <page width="780" height="1152">
    <font size="10" face="MHCJMH+FuturaT-Bold" color="#FF0000">
      <text x="324" y="37" width="132" height="10">Friday, September 27, 2002</text>
      <img x="324" y="232" width="277" height="340" src="text_pic0001.png"/>
      <link x="324" y="232" width="277" height="340" dest_page="2" dest_x="141" dest_y="187"/>
    </font>
    <font size="12" face="AGaramond-Regular" italic="true" bold="true">
      <text x="509" y="68" width="121" height="12">This is a test PDF file</text>
      <link x="509" y="68" width="121" height="12" href="www.mobipocket.com"/>
    </font>
  </page>
</pdf2xml>

, , , , , Google , . , Google IRC, Google.

.

+7

Google PDF, , . , , Google. !

+2

, , ,

: pdf to png php

imageMagick imageMagic

edit: .

edit: google, ... google api Google Api, blogpost Google API

, , Google , ?:)

!

+1

, pdf , ( Adobe Reader). PDF "PDF Producer". , google Prince IText ( PDF ). Google .

0

.. pdf2xml, Google. , .., p... , . :) pdf2xml google: P Upload, ... xml tooo... epub?: P

-2

All Articles