Attempting to dynamically change an object after tpl dump

Knowledge exchange related to dycodoc, the visual form and document designer

Moderator: IDEAL Software Support

Attempting to dynamically change an object after tpl dump

Postby starzen » Fri Nov 16, 2018 6:33 pm

Here is what we are trying to do

We have a template that we want to show to the user and then apply a signature when the user accepts the template

thought process was

Fill Template Fields
Dump Template
Show Preview

User clicks sign
We find an object on the document and apply the signature image

hSigPic = VpeFindTplVpeObject(hTemplate "InmateESignature")

which returns a handle

VpeGetObjKind(hSigPic) returns 21 so that is correct

int icount = VpeGetInsertedVpeObjectCount(htplField) returns 1

hObj = VpeGetInsertedVpeObject(htplfield, 0) returns a handle

VpeGetObjPictureFileName(hObj,...) returns the filename i set before dumping the template which was essentially an empty JPG file

then i set the picturefilename using VpeSetObjPictureFileName and that does not seem to work

if i set the background

VpeSetBkgColor(hObj, color)
VpeSetBkgMode(hObj, VBKG_SOLID)

it works

Any idea why the picture doesnt work?

thanks

Mike
starzen
 
Posts: 30
Joined: Tue Feb 01, 2005 12:23 am
Location: Miami, FL

Re: Attempting to dynamically change an object after tpl dum

Postby IDEAL Software Support » Sun Nov 18, 2018 10:16 pm

This method is intended to set the file name of picture objects in templates. It does not trigger to load a new picture when assigned to a picture object in the document.

Why don't you just add a new picture object directly to the document with the VpePicture() method after the user clicked "sign"?
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm


Return to DCD Open Forum

Who is online

Users browsing this forum: No registered users and 3 guests

cron