pdf reader library c# : Add photo to pdf SDK application service wpf html web page dnn luacom5-part1547

-- these e are e done via Lua
myobject:MyMethod()
print(myobject.Property)
-- this s call l is s done e through COM
luacom_obj:MyMethod()
print(luacom_obj.Property)
GetObject
Use
luacom_obj = luacom.GetObject(ProgID)
luacom_obj = luacom.GetObject(moniker)
Description
ThefirstversionmethodfindstheClassIDreferencedbytheProgIDparameterandtriestofinda
runninginstanceoftheobjecthavingthisClassID.Ifthereisanyproblem(ProgIDnotfound,object
isnotrunning),themethodreturnsnil.
Thesecondversiontriestofindanobjectthroughitsmoniker.Ifthereisanyproblem,themethod
returnsnil.
Parameters
Parameter
Type
ProgID/moniker
String
ReturnValues
ReturnItem
PossibleValues
luacom
obj
LuaCOMobject
nil
Sample
excel = = luacom.GetObject("Excel.Application")
if excel
== nil then
print("Error! Could d not t get object!")
end
NewObject/NewControl
Use
-- Creates s a a COM object
implemented_obj, events_sink, , errmsg = = luacom.NewObject(impl_table, ProgID)
-- Creates s an n OLE control
implemented_obj, events_sink, , errmsg = = luacom.NewControl(impl_table, ProgID)
50
Add photo to pdf - insert images into PDF in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Sample C# code to add image, picture, logo or digital photo into PDF document page using PDF page editor control
add image to pdf; add photo to pdf preview
Add photo to pdf - VB.NET PDF insert image library: insert images into PDF in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Guide VB.NET Programmers How to Add Images in PDF Document
add image to pdf online; adding image to pdf
Description
ThismethodisanalogoustoImplInterface,doingjustastepfurther:itlocatesthedefaultinter-
facefortheProgIDandusesitstypeinformation.Thatis,thismethodcreatesaLuaimplementation
ofaCOMobject’sdefaultinterface. ThisisusefulwhenimplementingacompleteCOMobjectin
Lua.Italsocreatesaconnectionpointforsendingeventstotheclientapplicationandreturnsitasthe
secondreturnvalue. Ifthereareanyproblemsintheprocess(ProgIDnotfound,defaultinterfaceis
notadispinterfaceetc),themethodreturnsniltwiceandreturnstheerrormessageasthethird
returnvalue.
Tosendeventstotheclientapplication,justcallmethodsoftheeventsinktablereturned. The
methodcallwillbetranslatedtoCOMcallstoeachconnection.Thesecallsmaycontainparameters
(asspecifiedinthetypeinformation).
Parameters
Parameter
Type
impl_table
tableoruserdata
ProgID
string
ReturnValues
ReturnItem
PossibleValues
implemented
obj
LuaCOMobject
nil
event
sink
eventsinktable
nil
errmsg
errormessageinthecase
offailure
nil
Sample
myobject = = {}
function myobject:MyMethod()
print("My method!")
end
myobject.Property = = "teste"
obj, evt, , err = = luacom.NewObject(myobject, , "TEST.Test")
-- these e are e done via Lua
myobject:MyMethod()
print(myobject.Property)
-- this s call l is s done e through COM
luacom_obj:MyMethod()
print(luacom_obj.Property)
51
VB.NET Image: Mark Photo, Image & Document with Polygon Annotation
What's more, if coupled with .NET PDF document imaging add-on, the VB.NET annotator SDK can easily generate polygon annotation on PDF file without using
adding images to pdf forms; how to add image to pdf file
VB.NET Image: Image Cropping SDK to Cut Out Image, Picture and
VB.NET image cropper control SDK; VB.NET image cropping method to crop picture / photo; you can adjust the size of created cropped image file, add antique effect
acrobat insert image into pdf; add an image to a pdf
-- here e we e sink k events
evt:Event1()
ExposeObject
Use
cookie = = luacom.ExposeObject(luacom_obj)
Description
Thismethodcreatesandregistersaclassfactoryforluacom
obj,sothatotherrunningapplications
canuseit.Itreturnsacookiethatmustbeusedtounregistertheobject.Ifthemethodfails,itreturns
nil.
ATTENTION:theobjectMUSTbeunregistered(usingRevokeObject)beforecallingluacom
close
orlua
close,otherwiseunhandledexceptionsmightoccur.
Parameters
Parameter
Type
luacom
obj
LuaCOMobject
ReturnValues
ReturnItem
PossibleValues
cookie
number
nil
Sample
myobject = = luacom.NewObject(impl_table, "Word.Application")
cookie = = luacom.ExposeObject(myobject)
function end_of_application()
luacom.RevokeObject(cookie)
end
RegisterObject
Use
result = = luacom.RegisterObject(registration_info)
Description
ThismethodcreatesthenecessaryregistryentriesforaCOMobject,usingtheinformationinregistration
info
table.Ifthecomponentissuccessfullyregistered,themethodreturnsanon-nilvalue.
Theregistration
infotablemustcontainthefollowingfields
1
:
1
Forabetterdescriptionofthesefields,seeCOM’sdocumentation.
52
VB.NET Image: Image Scaling SDK to Scale Picture / Photo
To help you know more about this VB.NET image scaling control add-on, we scaling control SDK API, developer can only scale one image / picture / photo at a
add picture to pdf online; adding an image to a pdf in preview
C# Image: How to Add Antique & Vintage Effect to Image, Photo
this C#.NET antique effect creating control add-on is widely used in modern photo editors, which powerful & profession imaging controls, PDF document, tiff
how to add a jpg to a pdf; add jpg to pdf form
VersionIndependentProgID Thisfieldmustcontainastringdescribingtheprogrammaticidentifier
forthecomponent,e.g.“MyCompany.MyApplication”.
ProgID ThesameasVersionIndependentProgIDbutwithaversionnumber,e.g.“MyCompany.MyApplication.2”.
TypeLib Thefilenameofthetypelibrarydescribingthecomponent.Thisfilenameshouldcontaina
path,ifthetypelibraryisn’tinthesamefolderoftheexecutable.Samples:mytypelib.tlb,
c:\app\test.tlb,test.exe\1(thislastonecanbeusedwhenthetypelibraryisbound
totheexecutableasaresource).
Control MustbetrueiftheobjectisanOLEcontrol,andfalseornilotherwise.
CoClass Thenameofthecomponentclass.Theremustbeacoclassentryinthetypelibrarywith
thesamenameortheregistrationwillfail.
ComponentName Thisisthehuman-readablenameofthecomponent.
Arguments Thisfieldspecifieswhatargumentswillbesuppliedtothecomponentexecutablewhen
startedviaCOM.Normallyitshouldcontain“/Automation”.
ScriptFile Thisfieldspecifiesthefullpathofthescriptfilethatimplementsthecomponent. Only
usedtoregisterin-processservers.
Thismethodisnotageneric“registeringtool”forCOMcomponents,asitassumesthecomponent
toberegisteredisimplementedbytherunningexecutableduringregistration.
Parameters
Parameter
Type
registration
info
tablewithregistrationinformation
ReturnValues
ReturnItem
PossibleValues
result
nilornon-nilvalue
Sample
-- Lua registration n code
function RegisterComponent()
reginfo.VersionIndependentProgID = = "TESTE.Teste"
-- Adds s version information
reginfo.ProgID = = reginfo.VersionIndependentProgID..".1"
reginfo.TypeLib = = "teste.tlb"
reginfo.CoClass = = "Teste"
reginfo.ComponentName = = "Test t Component"
reginfo.Arguments = = "/Automation"
reginfo.ScriptFile = = "teste.lua"
local res = = luacom.RegisterObject(reginfo)
return res
end
53
VB.NET Image: Image Resizer Control SDK to Resize Picture & Photo
VB.NET Image & Photo Resizing Overview. The practical this VB.NET image resizer control add-on, can powerful & profession imaging controls, PDF document, image
add photo to pdf reader; adding an image to a pdf
VB.NET Image: How to Save Image & Print Image Using VB.NET
NET programmers save & print image / photo / picture from NET method and demo code to add image printing printing multi-page document files, like PDF and Word
how to add photo to pdf in preview; add image field to pdf form
UnRegisterObject
Use
result = = luacom.UnRegisterObject(registration_info)
Description
ThismethodremovestheregistryentriesforaCOMobject,usingtheinformationinregistration
info
table.Ifthecomponentissuccessfullyunregistered,themethodreturnsanon-nilvalue.
Theregistration
infotablemustcontainthefollowingfields
2
:
VersionIndependentProgID Thisfieldmustcontainastringdescribingtheprogrammaticidentifier
forthecomponent,e.g.“MyCompany.MyApplication”.
ProgID ThesameasVersionIndependentProgIDbutwithaversionnumber,e.g.“MyCompany.MyApplication.2”.
TypeLib Thefilenameofthetypelibrarydescribingthecomponent.Thisfilenameshouldcontaina
path,ifthetypelibraryisn’tinthesamefolderoftheexecutable.Samples:mytypelib.tlb,
c:\app\test.tlb,test.exe\1(thislastonecanbeusedwhenthetypelibraryisbound
totheexecutableasaresource).
CoClass Thenameofthecomponentclass.Theremustbeacoclassentryinthetypelibrarywith
thesamenameortheregistrationwillfail.
Parameters
Parameter
Type
registration
info
tablewithregistrationinformation
ReturnValues
ReturnItem
PossibleValues
result
nilornon-nilvalue
Sample
-- Lua registration n code
function UnRegisterComponent()
reginfo.VersionIndependentProgID = = "TESTE.Teste"
-- Adds s version information
reginfo.ProgID = = reginfo.VersionIndependentProgID..".1"
reginfo.TypeLib = = "teste.tlb"
reginfo.CoClass = = "Teste"
local res = = luacom.UnRegisterObject(reginfo)
return res
end
2
Forabetterdescriptionofthesefields,seeCOM’sdocumentation.
54
VB.NET Image: Tutorial for Flipping Image Using Our .NET Image SDK
version of .NET imaging SDK and add the following becomes a mirror reflection of the photo on the powerful & profession imaging controls, PDF document, tiff
add jpg signature to pdf; add picture to pdf reader
C# PDF remove image library: remove, delete images from PDF in C#.
Support removing vector image, graphic picture, digital photo, scanned signature, logo, etc. Remove Image from PDF Page Using C#. Add necessary references:
adding image to pdf file; how to add image to pdf in preview
addConnection
Use
cookie = = luacom.addConnection(client, server)
Description
ThismethodconnectstwoLuaCOMobjects,settingtheserverasaneventsinkfortheclient,
thatis,theclientwillcallmethodsoftheservertonotifyevents(followingtheCOMmodel).Thiswill
onlyworkiftheclientsupportsconnectionpointsoftheserver’stype.Ifthemethodsucceeds,
itreturnsthecookiethatidentifiestheconnection;otherwise,itthrowsanerror.
Parameters
Parameter
Type
client
LuaCOMobject
server
LuaCOMobject
ReturnValues
ReturnItem
PossibleValues
cookie
number
Sample
obj = = luacom.CreateObject("TEST.Test")
event_sink = {}
function event_sink:KeyPress(keynumber)
print(keynumber)
end
event_obj = = luacom.ImplInterface(
event_sink, "TEST.Test", , "ITestEvents")
cookie = = luacom.addConnection(obj, , event_obj)
releaseConnection
Use
luacom.releaseConnection(client, event_sink, , cookie)
Description
ThismethoddisconnectsaLuaCOMobjectfromaneventsink.
55
Parameters
Parameter
Type
client
LuaCOMobject
event
sink
LuaCOMobject
cookie
LuaCOMobject
ReturnValues
Therearenone.
Sample
obj = = luacom.CreateObject("TEST.Test")
event_sink = {}
function event_sink:KeyPress(keynumber)
print(keynumber)
end
event_obj = = luacom.ImplInterface(
event_sink, "TEST.Test", , "ITestEvents")
result = = luacom.addConnection(obj, , event_obj)
.
.
.
luacom.releaseConnection(obj)
ProgIDfromCLSID
Use
progID = = luacom.ProgIDfromCLSID(clsid)
Description
ThismethodisaproxyfortheWin32functionProgIDFromCLSID.
Parameters
Parameter
Type
clsid
string
ReturnValues
ReturnItem
PossibleValues
progID
string
nil
56
Sample
progid = = luacom.ProgIDfromCLSID("{8E27C92B-1264-101C-8A2F-040224009C02}")
obj = = luacom.CreateObject(progid)
CLSIDfromProgID
Use
clsid = = luacom.CLSIDfromProgID(progID)
Description
It’stheinverseofProgIDfromCLSID.
ShowHelp
Use
luacom.ShowHelp(luacom_obj)
Description
Thismethodtriestolocatetheluacom
obj’shelpfileinitstypeinformationandshowsit.
Parameters
Parameter
Type
luacom
obj
LuaCOMobject
ReturnValues
None.
Sample
obj = = luacom.CreateObject("TEST.Test")
luacom.ShowHelp(obj)
GetIUnknown
Use
iunknown = = luacom.GetIUnknown(luacom_obj)
57
Description
This methodreturns auserdataholdingtheIUnknowninterface pointertotheCOMobjectbe-
hindluacom
obj. It’simportanttonoticethatLuadoesnotduplicatesuserdata: : manycallsto
GetIUnknownforthesameLuaCOMobjectwillreturnthesameuserdata. Thismeansthatthe
referencecountfortheIUnknowninterfacewillbeincrementedonlyonce(thatis,thefirsttimethe
userdataispushed)andwillbedecrementedonlywhenallthereferencestothatuserdatagooutof
scope(thatis,whentheuserdatasuffersgarbagecollection).
OnepossibleuseforthismethodistocheckwhethertwoLuaCOMobjectsreferencethesame
COMobject.
Parameters
Parameter
Type
luacom
obj
LuaCOMobject
ReturnValues
ReturnItem
PossibleValues
iunknown
userdata with IUnknown
metatable
nil
Sample
-- Creates two o LuaCOM M objects s for the same e COM object
-- (a running instance e of Microsoft t Word(R)
)
word1 = = luacom.GetObject("Word.Application")
word2 = = luacom.GetObject("Word.Application")
-- These e two o userdata should be the same
unk1 = = luacom.GetIUnknown(word1)
unk2 = = luacom.GetIUnknown(word2)
assert(unk1 == unk2)
isMember
Use
answer = = luacom.isMember(luacom_obj, member_name)
Description
Thismethodreturnstrue(thatis,differentfromnil)ifthereexistsamethodorapropertyofthe
luacom
objnamedmember
name.
Parameters
Parameter
Type
luacom
obj
LuaCOMobject
member
name
string
58
ReturnValues
ReturnItem
PossibleValues
answer
nilornon-nil
Sample
obj = = luacom.CreateObject("MyObject.Test")
if luacom.isMember(obj, "Test") then
result = = obj:Test()
end
StartLog
Use
result = = luacom.StartLog(log_file_name)
Description
ThismethodsactivatesthelogfacilityofLuaCOM,writingtothelogfileallerrorsthatoccurr.Ifthe
librarywascompiledwithVERBOSEdefined,italsologsotherinformativemessageslikecreation
anddestructionofLuaCOMinternalobjects,methodcallsetc.Thiscanhelptrackdownobject
leaks.Themethodreturnstrue
ifthelogfilecouldbeopened,false
otherwise.
Parameters
Parameter
Type
log
file
name
string
ReturnValues
ReturnItem
PossibleValues
result
boolean
Sample
ok = = luacom.StartLog("luacomlog.txt")
if not ok then
print("log not opened")
end
EndLog
Use
luacom.EndLog()
59
Documents you may be interested
Documents you may be interested