DWF

Reply
Active Contributor
g.heeley
Posts: 31
Registered: ‎06-08-2011
Message 1 of 2 (632 Views)

DWF Merger Util in C#

632 Views, 1 Replies
03-10-2013 07:59 PM

I've been trying for some time to emulate the Watermarking done by the Vault Professional Web Viewer on our own intranet viewing system. I found a folder ADMS Professional 2013\Server\Web\WebClient\DWFMergerUtil that contains a DwfMergerUtil dll. This has a class of DWFMergerWrppaer and a function DoWaterMark. I have managed to hook into this and get a DWF produced that loads in ADR but with no watermark. There have been modifications made to the file (the FixedPage.Fpage file has a new Canvas node but is missing a Glyphs node with the watermark data). Has anyone managed to use the lib successfully ?

Thanks
Greg

Greg Heeley
CAD Administrator
temperzone Ltd
Inventor Pro, Vault Pro, ACADE
Valued Contributor
FRFR1426
Posts: 98
Registered: ‎04-05-2012
Message 2 of 2 (223 Views)

Re : DWF Merger Util in C#

03-21-2014 08:49 AM in reply to: g.heeley

I'm trying to do the same thing. Have you found a solution?

 

I'm working on 2014. Here is my code:

 

using DWFMerger;

namespace Watermark
{
    class Program
    {
        static void Main(string[] args)
        {
            using (var parameters = new WMParameters
            {
                m_colorAlpha = 255, 
                m_colorBlue = 0, 
                m_colorGreen = 0, 
                m_colorRed = 255,
                m_fontName = "Arial", 
                m_position = DWFWatermark.Location.Diagonal, 
                m_waterMarkText = "My watermark", 
                m_size = DWFWatermark.Size.Large
            })
            {
                using (var input = new DWFInputFile(args[0], parameters))
                {
                    DWFMergerWrapper.DoWatermark(input, Path.GetFileNameWithoutExtension(args[0]) + "-watermark.dwf");
                }
            }
        }
    }
}

 It creates a DWF, but I'm not able to open it in ADR

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.