我可以使用C#.net创建水印吗 [英] Can I create a water mark using C#.net to word

查看:89
本文介绍了我可以使用C#.net创建水印吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用C#.net为每个页面创建水印吗?现在我只在一页上得到它,但是我需要在每一页上得到这个水印.
有身体可以帮忙吗?
我将展示仅适用于一页的代码:

Can I create a water mark using C#.net for every page. Right now I am getting it only for one page, but I need to get this watermark on every page.
Can any body help?
I''ll show my code which works for only one page:

    Word.Shape logoWatermark = null;
    oRng = oDoc.Bookmarks.get_Item(ref oEndOfDoc).Range;
     Word.Application headerApp = oDoc.Sections[1].Headers[Word.WdHeaderFooterIndex.wdHeaderFooterEvenPages].Application;
logoWatermark = headerApp.ActiveDocument.Shapes.AddTextEffect(Microsoft.Office.Core.MsoPresetTextEffect.msoTextEffect1, textBox4.Text, "Arial", (float)60, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoFalse, 0, l, ref oMissing);
                                    logoWatermark.Select(ref oMissing);
                                    logoWatermark.Fill.Visible = Microsoft.Office.Core.MsoTriState.msoTrue;
                                    logoWatermark.Line.Visible = Microsoft.Office.Core.MsoTriState.msoFalse;
                                    logoWatermark.Fill.Solid();
                                    logoWatermark.Fill.ForeColor.RGB = (Int32)Word.WdColor.wdColorGray05;
                                    logoWatermark.RelativeHorizontalPosition = Word.WdRelativeHorizontalPosition.wdRelativeHorizontalPositionMargin;
                                    logoWatermark.RelativeVerticalPosition = Word.WdRelativeVerticalPosition.wdRelativeVerticalPositionMargin;
                                    logoWatermark.Left = (float)Word.WdShapePosition.wdShapeCenter;
                                    logoWatermark.Top = (float)Word.WdShapePosition.wdShapeCenter;
                                    logoWatermark.Height = oWord.InchesToPoints(1f);
                                    logoWatermark.Width = oWord.InchesToPoints(6f);
                                    oWord.ActiveWindow.ActivePane.View.SeekView = Word.WdSeekView.wdSeekMainDocument;


在这里,我想要有关文本文档中水印的信息,我已经在图像中的水印中看到了,但是它包含很多差异,我们将在文本文档中使用
plesae给我有关textdoc


here i want the information about the watermark in the text docment, i had seen that in the watermark in the images but it contains lot of difference , which we are going to use in the text doc
plesae give me the information about the textdoc

推荐答案

的信息,这些CodeProject文章将对您有帮助吗?
在C#中构建简单的水印实用程序 [水印创建者 [ http://stackoverflow.com/questions/1224653/place- watermark-image-on-other-images-c-asp-net [ http://codeglobe.blogspot.com/2009/01/watermarking-image-in- cnet.html [ ^ ],
http://stackoverflow.com/questions/397537/adding-an-invisible- image-watermark-in-c [ ^ ].

—SA
Will these CodeProject articles help you:
Build a Simple Watermarking Utility in C#[^],
Watermark Creator[^]?

See also:
http://stackoverflow.com/questions/1224653/place-watermark-image-on-other-images-c-asp-net[^],
http://codeglobe.blogspot.com/2009/01/watermarking-image-in-cnet.html[^],
http://stackoverflow.com/questions/397537/adding-an-invisible-image-watermark-in-c[^].

—SA


这篇关于我可以使用C#.net创建水印吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆