2.4. PDF

sudo apt-get install docbook-xml docbook-xsl xsltproc fop
		

安装字体

sudo mkdir /usr/share/fonts/microsoft
		

将 C:\Windows\Fonts 目录中的字体复制到 /usr/share/fonts/microsoft

$ java -cp /usr/share/java/fop.jar  org.apache.fop.fonts.apps.TTFReader /usr/share/fonts/microsoft/simhei.ttf simhei.xml
$ java -cp /usr/share/java/fop.jar  org.apache.fop.fonts.apps.TTFReader -ttcname "SimSun" /usr/share/fonts/microsoft/simsun.ttc simsun.xml
		
		
sudo vim /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/param.xsl
<xsl:param name="callout.unicode.font">simsun</xsl:param>
<xsl:param name="symbol.font.family">simsun</xsl:param>
<xsl:param name="callout.unicode.font">simsun</xsl:param>
		
		
		 
$ vim fop.conf

<?xml version="1.0"?>
<fop version="1.0">
<base>.</base>

<renderers>
	<renderer mime="application/pdf">
     <filterList>
         <value>flate</value>
     </filterList>
      <fonts>
        <font metrics-url="simhei.xml" kerning="yes" embed-url="/usr/share/fonts/microsoft/simhei.ttf">
          <font-triplet name="simhei" style="normal" weight="normal"/>
          <font-triplet name="simhei" style="normal" weight="bold"/>
          <font-triplet name="simhei" style="italic" weight="normal"/>
          <font-triplet name="simhei" style="italic" weight="bold"/>
          </font>
          <font metrics-url="simsun.xml" kerning="yes" embed-url="/usr/share/fonts/microsoft/simsun.ttc">
          <font-triplet name="simsun" style="normal" weight="normal"/>
          <font-triplet name="simsun" style="normal" weight="bold"/>
          <font-triplet name="simsun" style="italic" weight="normal"/>
          <font-triplet name="simsun" style="italic" weight="bold"/>
          </font>
        </fonts>
    </renderer>
</renderers>
</fop>
		 
		 
xsltproc -o helloworld.fo /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl helloworld.xml
fop -c fop.conf helloworld.fo -pdf helloworld.pdf
		





原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

Apache 2.4 安全加固。 Table of Contents Overview ...................................................................................................................................................................... 6 Intended Audience .............................................................................................................................................. 6 Consensus Guidance ........................................................................................................................................... 6 Typographical Conventions ............................................................................................................................ 7 Scoring Information ............................................................................................................................................ 7 Profile Definitions ................................................................................................................................................ 8 Acknowledgements ............................................................................................................................................. 9 Recommendations ................................................................................................................................................. 10 1 Planning and Installation ........................................................................................................................... 10 1.1 Pre-Installation Planning Checklist (Not Scored) .............................................................. 10 1.2 Do Not Install a Multi-use System (Not Scored) ................................................................. 11 1.3 Installing Apache (Not Scored) .................................................................................................. 13 2 Minimize Apache Modules ........................................................................................................................ 15 2.1 Enable Only Necessary Authentication and Authorization Modules (Not Scored) ......................................................................................................................................................................... 15 2.2 Enable the Log Config Module (Scored) ................................................................................ 17 2.3 Disable WebDAV Modules (Scored) ........................................................................................ 19 2.4 Disable Status Module (Scored) ................................................................................................ 21 2.5 Disable Autoindex Module (Scored) ........................................................................................ 23 2.6 Disable Proxy Modules (Scored) ............................................................................................... 25 2.7 Disable User Directories Modules (Scored) ......................................................................... 27 2.8 Disable Info Module (Scored) ..................................................................................................... 29 3 Principles, Permissions, and Ownership ............................................................................................ 31 3.1 Run the Apache Web Server as a non-root user (Scored).............................................. 31 3.2 Give the Apache User Account an Invalid Shell (Scored) ............................................... 34 3.3 Lock the Apache User Account (Scored) ............................................................................... 35 3.4 Set Ownership on Apache Directories and Files (Scored)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值