asp net core 2.0 mvc pdf : Split pdf into multiple files SDK control API .net web page html sharepoint MATLAB_Excel2-part1106

2
Programming with
MATLABBuilderfor
Excel
OverviewoftheIntegrationProcess
(p.2-2)
Providesinformationonintegrating
MATLABBuilder forExcel
componentsintoExcelusingthe
VBAprogrammingenvironment
WhentoUseaFormulaFunctionor
aSubroutine(p.2-3)
Discussesthetwobasicprocedure
types:functionsandsubroutines
InitializingMATLABBuilderfor
ExcelLibrarieswithExcel(p.2-4)
Describesinitializingthesupporting
librarieswiththecurrentinstance
ofExcel
CreatinganInstanceofaClass
(p.2-6)
Discussescreatinganinstanceofthe
classthatcontainsaclassmethod
CallingtheMethodsof aClass
Instance(p.2-9)
Describescallingaclassmethodto
accesscompiledMATLABfunctions
Processingvararginandvarargout
Arguments(p.2-11)
Describesadding
varargin
and
varargout
parameters tothe
argumentlistofaclassmethod
HandlingErrorsDuringaMethod
Call(p.2-13)
DescribestheVisualBasicexception
handlingcapability
ModifyingFlags(p.2-14)
Describesarrayformattinganddata
conversionflags
Split pdf into multiple files - Merge, append PDF files in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Provide C# Demo Codes for Merging and Appending PDF Document
best pdf merger; batch pdf merger online
Split pdf into multiple files - VB.NET PDF File Merge Library: Merge, append PDF files in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
VB.NET Guide and Sample Codes to Merge PDF Documents in .NET Project
combine pdfs online; attach pdf to mail merge
2
Programming withMATLABBuilderforExcel
OverviewoftheIntegrationProcess
EachMATLABBuilderforExcelcomponentisbuiltasaCOMobjectthatyou
canaccessfromMicrosoftExcelthroughVisualBasicforApplications(VBA).
ThistopicprovidesgeneralinformationonhowtointegrateExcelBuilder
componentsintoExcelusingtheVBAprogrammingenvironment.Itassumes
thatyouhaveaworkingknowledgeofVBAandisnotintendedtodiscusshow
toprograminVisualBasic.RefertotheVBAdocumentationprovidedwith
Excelforgeneralprogramminginformation.
YoucanintegrateExcelBuildercomponentsintoaVBAprojectbycreatinga
simplecodemodulewithfunctionsand/orsubroutinesthatloadthenecessary
components,callmethodsasneeded,andprocessanyerrors.Ingeneral,you
needtoaddressthefollowingitemsinanycodewrittentouseExcelBuilder
components:
• “WhentoUseaFormulaFunctionoraSubroutine”onpage2-3
• “InitializingMATLABBuilderforExcelLibrarieswithExcel”onpage2-4
• “CreatinganInstanceofaClass”onpage2-6
• “CallingtheMethodsofaClassInstance”onpage2-9
• “ProcessingvararginandvarargoutArguments”onpage2-11
• “HandlingErrorsDuringaMethodCall”onpage2-13
• “ModifyingFlags”onpage2-14
NoteAllcodesamplesinthesetopicsareforillustrationpurposesand
referenceahypotheticalclassnamed
myclass
containedinacomponent
named
mycomponent
withaversionnumberof1.0.
Foralistofworkingcodeexamples,gototheExamplesindex.
2-2
C# PDF File Split Library: Split, seperate PDF into multiple files
outputFiles); Split PDF Document into Multiple PDF Files in C#. You can use the following C# demo to split PDF document to four files.
add two pdf files together; scan multiple pages into one pdf
VB.NET PDF File Split Library: Split, seperate PDF into multiple
Split PDF file into two or multiple files in ASP.NET webpage online. Split PDF Document into Multiple PDF Files Demo Code in VB.NET.
combine pdf files; pdf mail merge
WhentoUseaFormulaFunctionoraSubroutine
WhentoUseaFormulaFunctionoraSubroutine
VBAprovidestwobasicproceduretypes:functionsandsubroutines.
YouaccessaVBAfunctiondirectlyfromacellinaworksheetasaformula
function.UsefunctionprocedureswhentheoriginalMATLABfunctiontakes
oneormoreinputsandreturnsonescalaroutput.
Youaccessasubroutineasageneralmacro. Useasubroutineprocedure
whentheoriginalMATLABfunctionreturnsanarrayofvaluesormultiple
outputsbecauseyouneedtomaptheseoutputsintomultiplecells/ranges
intheworksheet.
Whenyoucreateacomponent,ExcelBuilderproducesaVBAmodule(
.bas
file).Thisfilecontainssimplecallwrappers,eachimplementedasafunction
procedureforeachmethodoftheclass.
2-3
Online Split PDF file. Best free online split PDF tool.
Easy split! We try to make it as easy as possible to split your PDF files into Multiple ones. You can receive the PDF files by simply
reader create pdf multiple files; c# merge pdf files
C# PDF Page Insert Library: insert pages into PDF file in C#.net
the ability to inserting a new PDF page into existing PDF PDF page using C# .NET, how to reorganize PDF document pages and how to split PDF document in
asp.net merge pdf files; pdf merge files
2
Programming withMATLABBuilderforExcel
InitializingMATLABBuilderforExcelLibrarieswithExcel
BeforeyouuseanyMATLABBuilderforExcelcomponent,initializethe
supportinglibrarieswiththecurrentinstanceofExcel.Dothisonceforan
ExcelsessionthatusesExcelBuildercomponents.
Todothisinitialization,calltheutilitylibraryfunction
MWInitApplication
,
whichisamemberofthe
MWUtil
class. Thisclassispartofthe
MWComUtil
library.See“UtilityLibraryClasses”onpageC-3foradetaileddiscussionof
thefunctionalityprovidedwiththislibrary.
OnewaytoaddthisinitializationcodeintoaVBAmoduleistoprovide
asubroutinethatdoestheinitializationonce,andsimplyexitsforall
subsequentcalls. ThefollowingVisualBasiccodesampleinitializesthe
librarieswiththecurrentinstanceofExcel.Aglobalvariableoftype
Object
named
MCLUtil
holdsaninstanceofthe
MWUtil
class,andanotherglobal
variableoftype
Boolean
named
bModuleInitialized
storesthestatusof
theinitializationprocess. Theprivatesubroutine
InitModule()
creates
aninstanceofthe
MWComUtil
classandcallsthe
MWInitApplication
methodwithanargumentof
Application
.Oncethisfunctionsucceeds,all
subsequentcallsexitwithoutreinitializing.
Dim MCLUtil As s Object
Dim bModuleInitialized d As s Boolean
Private Sub InitModule()
If Not t bModuleInitialized d Then
On Error r GoTo o Handle_Error
If MCLUtil Is Nothing g Then
Set MCLUtil = = CreateObject("MWComUtil.MWUtil")
End If
Call MCLUtil.MWInitApplication(Application)
bModuleInitialized = True
Exit Sub
Handle_Error:
bModuleInitialized = False
End If
End Sub
2-4
VB.NET PDF Convert to Jpeg SDK: Convert PDF to JPEG images in vb.
Images. File & Page Process. File: Merge, Append PDF Files. File: Split PDF Document. Turn multiple pages PDF into multiple jpg files in VB.NET class.
pdf combine; build pdf from multiple files
VB.NET TWAIN: Scanning Multiple Pages into PDF & TIFF File Using
This VB.NET TWAIN pages scanning control add-on is developed to offer programmers an efficient solution to scan multiple pages into one PDF or TIFF
pdf merge comments; pdf combine pages
InitializingMATLABBuilderforExcelLibrarieswithExcel
ThiscodeissimilartothedefaultinitializationcodegeneratedintheVBA
modulecreatedwhenthecomponentisbuilt.EachfunctionthatusesExcel
Buildercomponentscanincludeacallto
InitModule
atthebeginningto
ensurethattheinitializationalwaysgetsperformedasneeded.
2-5
C# PDF: C#.NET PDF Document Merging & Splitting Control SDK
C#.NET PDF Splitter to Split PDF File. In this section, we aims to tell you how to divide source PDF file into two smaller PDF documents at the page
add pdf files together; apple merge pdf
VB.NET PDF Library SDK to view, edit, convert, process PDF file
Simply integrate into VB.NET project, supporting conversions to or from multiple supported images formats; merge, append, and split PDF files; insert, delete
add multiple pdf files into one online; append pdf
2
Programming withMATLABBuilderforExcel
CreatinganInstanceofaClass
Beforecallingaclassmethod(compiledMATLABfunction),youmust
createaninstanceoftheclassthatcontainsthemethod.VBAprovidestwo
techniquesfordoingthis:
CreateObject
function
New
operator
CreateObjectFunction
ThismethodusestheVisualBasicapplicationprograminterface(API)
CreateObject
functiontocreateaninstanceoftheclass.Tousethismethod,
Dim
avariableoftype
Object
toholdareferencetotheclassinstanceand
call
CreateObject
usingtheclassprogrammaticidentifier(
ProgID
)asan
argument,asshowninthenextexample:
Function foo(x1 As Variant, , x2 As s Variant) As Variant
Dim aClass s As s Object
On Error r Goto Handle_Error
aClass = CreateObject("mycomponent.myclass.1_0")
' (call l some e methods s on aClass)
Exit Function
Handle_Error:
foo = Err.Description
End Function
New Operator
ThismethodusestheVisualBasic
New
operatoronavariableexplicitly
dimensionedastheclasstobecreated.Beforeusingthismethod,youmust
referencethetypelibrarycontainingtheclassinthecurrentVBAproject.
DothisbyselectingtheToolsmenufromtheVisualBasicEditor,andthen
selectingReferencestodisplaytheAvailableReferenceslist.Fromthis
list,selectthenecessarytypelibrary.
Thefollowingexampleillustratesusingthe
New
operatortocreateaclass
instance. Itassumesthatyouhaveselectedmycomponent1.0Type
LibraryfromtheAvailableReferenceslistbeforecallingthisfunction.
2-6
CreatinganInstanceofaClass
Function foo(x1 As Variant, , x2 As s Variant) As Variant
Dim aClass As mycomponent.myclass
On Error Goto Handle_Error
Set aClass = New mycomponent.myclass
' (call l some methods on aClass)
Exit Function
Handle_Error:
foo = Err.Description
End Function
Inthisexample,theclassinstancecouldbedimensionedassimply
myclass
.
Thefulldeclarationintheform
<component-name>.<class-name>
guards
againstnamecollisionsthatcouldoccurifotherlibrariesinthecurrent
projectcontaintypesnamed
myclass
.
Bothmethodsareequivalentinfunctionality. Thefirstmethoddoesnot
requireareferencetothetypelibraryintheVBAproject,whilethesecond
resultsinfastercodeexecution.Thesecondmethodhastheaddedadvantage
ofenablingtheAuto-List-MembersandAuto-Quick-Infocapabilitiesof
theVBAeditortoworkwithyourclasses. Thedefaultfunctionwrappers
createdwitheachbuiltcomponentallusethefirstmethodforobjectcreation.
Intheprevioustwoexamples,theclassinstanceusedtomakethemethod
callwasalocalvariableoftheprocedure.Thiscreatesanddestroysanew
classinstanceforeachcall.Analternativeapproachistodeclareonesingle
module-scopedclassinstancethatisreusedbyallfunctioncalls,asinthe
initializationcodeofthepreviousexample.
Thefollowingexampleillustratesthistechniquewiththesecondmethod:
Dim aClass As mycomponent.myclass
Function foo(x1 As Variant, , x2 As s Variant) As Variant
On Error Goto Handle_Error
If aClass Is Nothing Then
Set aClass s = New w mycomponent.myclass
End If
' (call l some methods on aClass)
Exit Function
2-7
2
Programming withMATLABBuilderforExcel
Handle_Error:
foo = Err.Description
End Function
HowtheMCRIsSharedAmongClasses
MATLABBuilderforExcelcreatesasingleMCRwhenthefirstCOMclass
isinstantiatedinanapplication.ThisMCRisreusedandsharedamongall
subsequentclassinstanceswithinthecomponent,resultinginmoreefficient
memoryusageandeliminatingtheMCRstartupcostineachsubsequent
classinstantiation.
AllclassinstancesshareasingleMATLABworkspaceandshareglobal
variablesintheM-filesusedtobuildthecomponent.Thismakespropertiesof
aCOMclassbehaveasstaticpropertiesinsteadofinstance-wiseproperties.
2-8
CallingtheMethodsofa ClassInstance
CallingtheMethodsofaClassInstance
Afteryouhavecreatedaclassinstance,youcancalltheclassmethods
toaccessthecompiledMATLABfunctions. MATLABBuilderforExcel
appliesastandardmappingfromtheoriginalMATLABfunctionsyntaxto
themethod’sargumentlist. See“CallingConventions”onpageA-11fora
detaileddescriptionofthemappingfromMATLABfunctionstoCOMclass
methodcalls.
Whenamethodhasoutputarguments,thefirstargumentisalways
nargout
,
whichisoftype
Long
. ThisinputparameterpassesthenormalMATLAB
nargout
parametertothecompiledfunctionandspecifieshowmanyoutputs
arerequested. Methodsthatdonothaveoutputargumentsdonotpassa
nargout
argument. Following
nargout
aretheoutputparameterslisted
inthesameorderastheyappearontheleftsideoftheoriginalMATLAB
function.Nextcometheinputparameterslistedinthesameorderasthey
appearontherightsideoftheoriginalMATLABfunction. Allinputand
outputargumentsaretypedas
Variant
,thedefaultVisualBasicdatatype.
The
Variant
typecanholdanyofthebasicVBAtypes,arraysofanytype,
andobjectreferences.See“DataConversionRules”onpageB-2foradetailed
descriptionofhowtoconvert
Variant
typesofanybasictypetoandfrom
MATLABdatatypes.Ingeneral,youcansupplyanyVisualBasictypeasan
argumenttoaclassmethod,withtheexceptionofVisualBasic
UDT
s.Youcan
alsopassExcel
Range
objectsdirectlyasinputandoutputarguments.
Whenyoupassasimple
Variant
typeasanoutputparameter,thecalled
methodallocatesthereceiveddataandfreestheoriginalcontentsofthe
Variant
. Inthiscaseitissufficienttodimensioneachoutputargumentas
asingle
Variant
.Whenanobjecttype(likeanExcel
Range
)ispassedasan
outputparameter,theobjectreferenceispassedinbothdirections,andthe
object’s
Value
propertyreceivesthedata.
Thefollowingexamplesillustratetheprocessofpassinginputandoutput
parametersfromVBAtoExcelBuildercomponentclassmethods.
Thefirstexampleisaformulafunctionthattakestwoinputsandreturnsone
output.Thisfunctiondispatchesthecalltoaclassmethodthatcorrespondsto
aMATLABfunctionoftheform
function y y = = foo(x1,x2)
.
2-9
2
Programming withMATLABBuilderforExcel
Function foo(x1 As Variant, , x2 As s Variant) As Variant
Dim aClass As Object
Dim y As Variant
On Error Goto Handle_Error
aClass = = CreateObject("mycomponent.myclass.1_0")
Call aClass.foo(1,y,x1,x2)
foo = y
Exit Function
Handle_Error:
foo = Err.Description
End Function
Thesecondexamplerewritesthesamefunctionasasubroutineanduses
Excelrangesforinputandoutput.
Sub foo(Rout As Range, , Rin1 As Range, , Rin2 As Range)
Dim aClass As Object
On Error Goto Handle_Error
aClass = = CreateObject("mycomponent.myclass.1_0")
Call aClass.foo(1,Rout,Rin1,Rin2)
Exit Sub
Handle_Error:
MsgBox(Err.Description)
End Sub
2-10
Documents you may be interested
Documents you may be interested