Home  >  Article  >  Web Front-end  >  在HTML中优雅的生成PDF_html/css_WEB-ITnose

在HTML中优雅的生成PDF_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:41:31816browse

代码

 

  1.    
  2.      
  3.       
  4.     <script></script>   
  5.       
  6.      
  7.     <script> </script>
  8.          
  9.             
  10.           
  11.             
  12.             在HTML中优雅的生成PDF_html/css_WEB-ITnose  
  13.             
  14.             
  15.             [汤臣倍健]维生素C咀嚼片  
  16.             
  17.             
  18.             88  
  19.             
  20.             
  21.               
  22.             
  23.           
  24.         
  25.        
  26.      
  27.   
 效果

 

说明 

关键代码

  1. <script></script>   

  1. <script> </script>

script中的内容是xdoc,说明见:http://myxdoc.sohuapps.com/xml.html

_format属性指定输出格式,还可以是flash、docx等,script中的属性可以使用xdoc可用的参数,style属性定义展示结果的样式。

这种方式将XDOC标记与HTML完美结合,输出pdf等文档与输出html完全相同。可以用jsp、php、asp、freemarker等动态输出文档。

版权声明:本文为博主原创文章,未经博主允许不得转载。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn