簡體   English   中英

Word 2007 xml圖像信息

[英]Word 2007 xml image information

我想知道在Word 2007 xml文件中存儲有關圖像信息的元素。 (例如高度,寬度,可見性等)。 在Word 2003 xml中,我可以在v:shape標記中找到它,如下所示。

<v:shape id="Picture 0" o:spid="_x0000_i1025" type="#_x0000_t75" alt="31.jpg" style="width:2in;height:95.85pt;visibility:visible;mso-wrap-style:square">
<v:imagedata src="wordml://02000001.jpg" o:title="31"/>
</v:shape>

我在Word 2007 xml中找不到類似的內容。 有人可以告訴我在哪里可以找到嗎?

圖像大小存儲在使用圖形的位置(因為您可以多次使用同一圖形以不同的大小),存儲在與圖像使用位置一致的a:graphic標簽中。 現在,它不再像以前那樣在這里指向數據,而是指向一個關系ID。

關系列表在文件的頂部,您會發現其中一種具有“圖像”類型。 關系的屬性將是目標的名稱(例如media / image1.jpeg)。 這是圖像二進制文件的鏈接,稍后將在pkg:part / pkg:binaryData元素中找到。

它看起來像這樣:

<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
  <Relationship Id="rId8" Target="media/image1.jpeg" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" />
  .. other relationships
</Relationships>
.. lots more document

<pkg:part pkg:name="/word/media/image1.jpeg" pkg:contentType="image/jpeg"  pkg:compression="store">
    <pkg:binaryData>/9j/7QAsUGhvdG9zaG9wIDMuMAA....blah
</pkg:part>
.. lots more document

<w:drawing>
 <wp:inline distT="0" distB="0" distL="0" distR="0">
   <wp:extent cx="2266950" cy="1543050"/>
    <wp:effectExtent l="19050" t="0" r="0" b="0"/>
    <wp:cNvGraphicFramePr>
    <a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture">
     <pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">
       <a:blip r:embed="rId8" cstate="print"/>
       <a:ext cx="2266950" cy="1543050"/>
       .. lots more document

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM