急求JSP在word中第二页及其之后加水印,怎么加????
如题,我在网上找的代码可以加上水印,但全加上了,求在第二页之后加水印的方法,最好有源码
这是我的代码:
急求!!!

这是我的代码:
<script>
<%
String isPrintText = request.getParameter("isPrintText"); //是否添加水印
%>
var global_init = true;
var isPrintText = '<%=isPrintText%>';
var nowdate = new Date().getYear() + "-" + (new Date().getMonth()+1) + "-" + new Date().getDate() + " " + new Date().getHours() + ":" + new Date().getMinutes();
function fn_onloadWord(){
if("true"==isPrintText){
var OfficeOCX = document.all.wordcomponent.contentWindow.v_egov_Word_OCX;
OfficeOCX.SetReadOnly(false, "" );
var ActiveDocument = OfficeOCX.ActiveDocument;
OfficeOCX.ActiveDocument.Application.ScreenUpdating = false;
OfficeOCX.ActiveDocument.Sections(1).Range.Select();
ActiveDocument.ActiveWindow.ActivePane.View.SeekView = 9;
ActiveDocument.Application.Selection.HeaderFooter.Shapes.AddTextEffect(0, "公司绝密"+top.SSF_LUSER.orgOrgName+"\r"+top.SSF_LUSER.orgDepName+top.SSF_LUSER.userName+nowdate, "华文新魏", 90, false, false, 0, 0).Select();
ActiveDocument.Application.Selection.ShapeRange.TextEffect.NormalizedHeight = false;
ActiveDocument.Application.Selection.ShapeRange.Line.Visible = false;
ActiveDocument.Application.Selection.ShapeRange.Fill.Visible = true;
ActiveDocument.Application.Selection.ShapeRange.Fill.Solid();
ActiveDocument.Application.Selection.ShapeRange.Fill.ForeColor.RGB =12632256;
ActiveDocument.Application.Selection.ShapeRange.Fill.Transparency = 0.5;
//ActiveDocument.Application.Selection.ShapeRange.Rotation = 0;//控制平行
ActiveDocument.Application.Selection.ShapeRange.LockAspectRatio = true;
ActiveDocument.Application.Selection.ShapeRange.Height = 4.58 * 28.346;
ActiveDocument.Application.Selection.ShapeRange.Width = 28.07 * 28.346;
ActiveDocument.Application.Selection.ShapeRange.Rotation = 305; //控制旋转
ActiveDocument.Application.Selection.ShapeRange.WrapFormat.AllowOverlap = true;
ActiveDocument.Application.Selection.ShapeRange.WrapFormat.Side = 3;
ActiveDocument.Application.Selection.ShapeRange.WrapFormat.Type = 3;
ActiveDocument.Application.Selection.ShapeRange.RelativeHorizontalPosition =0;
ActiveDocument.Application.Selection.ShapeRange.RelativeVerticalPosition = 0;
ActiveDocument.Application.Selection.ShapeRange.Left = -999995;
ActiveDocument.Application.Selection.ShapeRange.Top = -999995;
ActiveDocument.ActiveWindow.ActivePane.View.SeekView = 0;
OfficeOCX.ActiveDocument.Application.ScreenUpdating = true;
OfficeOCX.SetReadOnly(true, "" );
}
}
</script>急求!!!
...全文
相关推荐
视频加水印
在视频加水印的过程中,我们可以利用ffmpeg的滤镜系统,如`drawtext`滤镜,来在视频上动态添加文本或者图像水印。
基于jsp实现图片网页视频加水印
【标题】:“基于jsp实现图片网页视频加水印”这一项目是软件工程课程的一个实践作业,旨在通过Java Web技术实现在网页、图片以及视频上添加水印的功能。
jsp是上传图片加水印
综上所述,实现"jsp是上传图片加水印"的功能,需要理解JSP的文件上传处理,熟悉Servlet API,掌握Java图像处理技术,并能够处理好用户交互和错误控制。
jsp在线编辑器可以批量上传图片/加水印
【标签】:“可以批量上传图片/加水印”这两个标签突出了该JSP在线编辑器的核心功能:批量图片处理和版权保护。批量上传功能提高了用户体验,而加水印功能则为在线内容的安全性提供了一定保障。
java实现图片上加文字水印(SpringMVC + Jsp)
在SpringMVC框架和Jsp技术的支持下,我们可以通过编写一些Java代码,轻松实现图片上添加文字水印的功能。首先,要实现这个功能,需要了解SpringMVC框架的基本使用方法和相关的配置。


Web 开发
