_SetObjType Method

[Top]  [Chapter]  [Previous]  [Next]

Applies to

IWPTextObj

Declaration

procedure _SetObjType(Value: Integer);

Description

This method sets the type of the object. Use with care.

 

The following types are possible:

0=text object, 1=merge field, 2=hyperlink, 3=bookmark, 7=text object, 8=page reference, 11=footnote, 12=image or text box and 13 for horizontal lines.

 


Tip:

This method can be used to convert an embedded image into a special image type which can also store attached data when exported to PDF.

If you insert a new image better use TextCursor.InputEmbeddedData.

Use _SetObjType(100) to make this conversion. This will only work if the ObjType is currently 12. After this change you can use LoadFromFile to load the contents of this object. When the PDF export is performed the image will be clickable. Acrobat Reader can extract the embedded data.

 

Example (C#):

 

td.Memo.TextCursor.InputString("Click to see the source: ",0);

tdf.Memo.TextCursor.InputImage("c:\\path\\cs_logo.png",0);

td.Memo.CurrObj._SetObjType(100);

td.Memo.CurrObj.ScaleSize(567,0,0); // Scale to width = 1 cm

td.Memo.CurrObj.LoadFromFile("c:\\path\\WebForm1.aspx.cs");

 

asp_4

 

 


[idh_iwptextobj__setobjtype.htm]    Copyright © 2007 by WPCubed GmbH