• jsp导出的word默认打开是web视图,希望是页面视图


    方法1

    ( velocity+java )我也遇到了这个问题,已经解决:
    1 .<html xmlns:v='urn:schemas-microsoft-com:vml'xmlns:o='urn:schemas-microsoft-com:office:office'xmlns:w='urn:schemas-microsoft-com:office:word'xmlns:m='http://schemas.microsoft.com/office/2004/12/omml'xmlns='http://www.w3.org/TR/REC-html40'  xmlns='http://www.w3.org/1999/xhtml' >


    2. ## 处理默认视图为 页面视图 
    <!--[if gte mso 9]><xml><w:WordDocument><w:View>Print</w:View><w:TrackMoves>false</w:TrackMoves><w:TrackFormatting/><w:ValidateAgainstSchemas/><w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid><w:IgnoreMixedContent>false</w:IgnoreMixedContent><w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText><w:DoNotPromoteQF/><w:LidThemeOther>EN-US</w:LidThemeOther><w:LidThemeAsian>ZH-CN</w:LidThemeAsian><w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript><w:Compatibility><w:BreakWrappedTables/><w:SnapToGridInCell/><w:WrapTextWithPunct/><w:UseAsianBreakRules/><w:DontGrowAutofit/><w:SplitPgBreakAndParaMark/><w:DontVertAlignCellWithSp/><w:DontBreakConstrainedForcedTables/><w:DontVertAlignInTxbx/><w:Word11KerningPairs/><w:CachedColBalance/><w:UseFELayout/></w:Compatibility><w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><m:mathPr><m:mathFont m:val="Cambria Math"/><m:brkBin m:val="before"/><m:brkBinSub m:val="--"/><m:smallFrac m:val="off"/><m:dispDef/><m:lMargin m:val="0"/> <m:rMargin m:val="0"/><m:defJc m:val="centerGroup"/><m:wrapIndent m:val="1440"/><m:intLim m:val="subSup"/><m:naryLim m:val="undOvr"/></m:mathPr></w:WordDocument></xml><![endif]-->
    ## 处理默认视图为 页面视图 

    来源:http://bbs.csdn.net/topics/390734012

    方法2

    <!--[if gte mso 9]>  

      <xml>  

     <w:WordDocument>  

          <w:View>Print</w:View>  

          <w:DoNotOptimizeForBrowser/>  

          <w:Compatibility>  

            <w:DontGrowAutofit/>  

          </w:Compatibility>  

        </w:WordDocument>  

      </xml>  

    <![endif]--> 

    替换原jsp中的<head>中<!--[if gte mso 9]>  开头的代码

    来源:http://blog.csdn.net/coolwubo/article/details/39530229

  • 相关阅读:
    php AppStore内购付款验证
    NodeJS
    Electron 的中文乱码问题
    Flexbox 弹性盒子布局的使用
    springboot整合quartz
    第4章:逆向分析技术--64位软件逆向技术
    第51章:静态反调试技术——API查询
    第51章:静态反调试技术
    第48章:SEH
    第47章:PEB
  • 原文地址:https://www.cnblogs.com/xlj227/p/6672560.html
Copyright © 2020-2023  润新知