DWF Viewer (Read Only)
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Modify dwf with API...

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
383 Views, 3 Replies

Modify dwf with API...

Using the DWF API, is it possible to add text or lines to a .dwf file? The
idea would be to programmatically add signatures to approved drawings.

Thanks,

Marty
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

No. Autodesk DWF Composer has the same API as the Autodesk DWF Viewer. APIs
for adding markups do not exist yet. Perhaps in the spring...

"Marty" wrote in message
news:4984828@discussion.autodesk.com...
Using the DWF API, is it possible to add text or lines to a .dwf file? The
idea would be to programmatically add signatures to approved drawings.

Thanks,

Marty
Message 3 of 4
Anonymous
in reply to: Anonymous

You can add markups of a sort to the printed DWF's by using the PrintEx API call on the DWF Viewer and just drawing to the device context before you pass it off to PrintEx.

We have a home grown document management system and I created a class that uses the DWF Viewer API (as well as the PrintUtil DLL found elsewhere on these newsgroups) to print out DWFs with dynamic watermarks on them (currently checked out to so-and-so, obsolete, change pending, etc). I'm not changing the actual DWF; I'm just reading in various properties from our database and then writing out my custom text to a device context and then passing that to PrintEx. All of my stuff is in VB.NET, which is why I used the PrintUtil DLL (it creates the device context for me).

After you call PrintEx with the device context, anything else you do on it will be on another page. I'm guessing PrintEx creates a pagebreak or something internally. I'm not sure if you can get back to the original page. I just do my drawing calls first, but that means that all of my stuff is drawn under the DWF. I suppose that might not be terribly useful if you're trying to put markups at random spots on the drawing. I'm just putting watermarks and small header / footer notes outside of the drawing border, so it's not an issue for me.

Anyhow, I'm not sure if I've been any help to you actually, but maybe someone will find it useful.

Tige Williams
Hytrol Conveyor Co., Inc.
Message 4 of 4
Anonymous
in reply to: Anonymous

Can you provide some sample code for adding custom text to a device context and then passing that to PrintEx.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report