You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>From version 1.5.0 new JMX comlets are available; the tutorial in <ahref="https://docs.oracle.com/javase/tutorial/jmx/remote/custom.html">https://docs.oracle.com/javase/tutorial/jmx/remote/custom.html</a> can be reproduced in PowerShell:</p>
<li><strong>Invoke-JCommand</strong>: executes the main method of a specific Java Main-Class in argument and exit. The arguments are:
157
-
<ul>
158
-
<li>MainClass</li>
159
-
<li>Arguments</li>
160
-
</ul>
161
-
</li>
162
-
<li><strong>New-JObject</strong>: Creates a new JVM object of the class specified in argument using the parameters within command line for constructor. The arguments are:
132
+
<li><strong>Open-PDF</strong>: open a PDF file. The arguments are:
163
133
<ul>
164
-
<li>Class</li>
165
-
<li>Arguments</li>
134
+
<li>PdfFile</li>
166
135
</ul>
167
136
</li>
168
-
<li><strong>Get-ClassForName</strong>: returns a Class from the class name
137
+
<li><strong>Save-PDF</strong>: Save a previously opened PDF file. The arguments are:
169
138
<ul>
170
-
<li>ClassName</li>
139
+
<li>PdfDocument</li>
140
+
<li>OutputFile</li>
141
+
<li>CompressParameter (optional)</li>
171
142
</ul>
172
143
</li>
173
144
</ul>
174
-
<p>From version 1.5.0 new JMX comlets are available:</p>
175
-
<ul>
176
-
<li><strong>Add-NotificationListener</strong>: adds a notification listener and filter on a JMXConnector</li>
177
-
<li><strong>Get-DefaultDomain</strong>: get default domain from a JMXConnector</li>
178
-
<li><strong>Get-Domains</strong>: get all domains from a JMXConnector</li>
179
-
<li><strong>Get-IsMXBeanInterface</strong>: verify if the class name is an MBean interface</li>
180
-
<li><strong>Get-JMXConnector</strong>: get a JMXConnector</li>
181
-
<li><strong>Get-MBeanCount</strong>: get the number of MBean from a JMXConnector</li>
182
-
<li><strong>Get-MBeanInfo</strong>: get the MBeanInfo from an ObjectName using a JMXConnector</li>
183
-
<li><strong>Get-QueryNames</strong>: get the ObjectNames using a JMXConnector</li>
<p>One of the most important command-line switch is <strong>JVMPath</strong>: it can be used to set-up the location of the JVM library (jvm.dll/libjvm.so) if JCOBridge is not able to identify a suitable JRE installation.</p>
Copy file name to clipboardExpand all lines: docs/index.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4222,7 +4222,7 @@
4222
4222
"articles/usagePS.html": {
4223
4223
"href": "articles/usagePS.html",
4224
4224
"title": "NetPDF PowerShell module of .NET suite for PDFBox™ | MASES Group - NetPDF",
4225
-
"summary": "NetPDF: PowerShell Module Installation To install the tool executes the following command within a PowerShell shell: Install-Module -Name MASES.NetPDFPS If the above command fails, reporting errors related to authenticode, use the following command: Install-Module -Name MASES.NetPDFPS -SkipPublisherCheck Usage To use the PowerShell interface (NetPDFPS) runs the following commands within a PowerShell shell: Initialization The following cmdlet initialize the environment: Start-NetPDFPS [arguments] Execution Now everything is ready and you can create objects like in the following snippet: $var = New-JObject -Class java.lang.String -Arguments \"Hello from\" $var.ToString() $var = $var.concat(\" NetPDFPS\") $var.ToString() the output will be: Hello from Hello from NetPDFPS JMX example From version 1.5.0 new JMX comlets are available; the tutorial in https://docs.oracle.com/javase/tutorial/jmx/remote/custom.html can be reproduced in PowerShell: $url = New-JMXServiceURL \"service:jmx:rmi:///jndi/rmi://:9999/jmxrmi\" $connector = Get-JMXConnector $url $domains = Get-Domains $connector $defaultdomain = Get-DefaultDomain $connector $names = Get-QueryNames $connector $mbeanName = New-ObjectName \"com.example:type=Hello\" $mbeanProxy = New-MBeanProxy -Connector $connector -ObjectName $mbeanName -InterfaceName \"HelloMBean\" -WithNotificationEmitter [Action[JavaX.Management.Notification, System.Object]]$action = {param($notification, $handback) Write-Host \"Notification message is $notification.Message\"} $listener = New-NotificationListener $action Add-NotificationListener $connector $mbeanName $listener mbeanProxy.getCacheSize() // this use dynamic on mbeanProxy Cmdlet available netpdfps accepts the following cmdlets: Start-NetPDFPS: Initialize the engine and shall be the first command to be invoked. The arguments are: LicensePath JDKHome JVMPath JNIVerbosity JNIOutputFile JmxPort EnableDebug JavaDebugPort DebugSuspendFlag JavaDebugOpts HeapSize InitialHeapSize LogClassPath Invoke-JCommand: executes the main method of a specific Java Main-Class in argument and exit. The arguments are: MainClass Arguments New-JObject: Creates a new JVM object of the class specified in argument using the parameters within command line for constructor. The arguments are: Class Arguments Get-ClassForName: returns a Class from the class name ClassName From version 1.5.0 new JMX comlets are available: Add-NotificationListener: adds a notification listener and filter on a JMXConnector Get-DefaultDomain: get default domain from a JMXConnector Get-Domains: get all domains from a JMXConnector Get-IsMXBeanInterface: verify if the class name is an MBean interface Get-JMXConnector: get a JMXConnector Get-MBeanCount: get the number of MBean from a JMXConnector Get-MBeanInfo: get the MBeanInfo from an ObjectName using a JMXConnector Get-QueryNames: get the ObjectNames using a JMXConnector Invoke-QueryAnd: execute Query.And Invoke-QueryAnySubString: execute Query.AnySubString Invoke-QueryAttr: execute Query.Attr Invoke-QueryBetween: execute Query.Between Invoke-QueryClassattr: execute Query.Classattr Invoke-QueryDiv: execute Query.Div Invoke-QueryEq: execute Query.Eq Invoke-QueryFinalSubString: execute Query.FinalSubString Invoke-QueryGeq: execute Query.Geq Invoke-QueryGt: execute Query.Gt Invoke-QueryIn: execute Query.In Invoke-QueryInitialSubString: execute Query.nitialSubString Invoke-QueryIsInstanceOf: execute Query.IsInstanceOf Invoke-QueryLeq: execute Query.Leq Invoke-QueryLt: execute Query.Lt Invoke-QueryMatch: execute Query.Match Invoke-QueryMinus: execute Query.Minus Invoke-QueryNot: execute Query.Not Invoke-QueryOr: execute Query.Or Invoke-QueryPlus: execute Query.Plus Invoke-QueryTimes: execute Query.Times Invoke-QueryValue: execute Query.Value New-AttributeChangeNotificationFilter: create a new AttributeChangeNotificationFilter to be used in Add-NotificationListener New-JMXServiceURL: create a new JMXServiceURL to be used in Get-JMXConnector New-MBeanProxy: get a MBeanProxy from a JMXConnector New-MXBeanProxy: get a MXBeanProxy from a JMXConnector New-NotificationFilterSupport: create a new NotificationFilterSupport to be used in Add-NotificationListener New-NotificationListener: create a new NotificationListener to be used in Add-NotificationListener New-ObjectName: create a new ObjectName to be used in Get-JMXConnector Remove-NotificationListener: removes a notification listener and filter from a JMXConnector JVM identification One of the most important command-line switch is JVMPath: it can be used to set-up the location of the JVM library (jvm.dll/libjvm.so) if JCOBridge is not able to identify a suitable JRE installation."
4225
+
"summary": "NetPDF: PowerShell Module Installation To install the tool executes the following command within a PowerShell shell: Install-Module -Name MASES.NetPDFPS If the above command fails, reporting errors related to authenticode, use the following command: Install-Module -Name MASES.NetPDFPS -SkipPublisherCheck Usage To use the PowerShell interface (NetPDFPS) runs the following commands within a PowerShell shell: Initialization The following cmdlet initialize the environment: Start-NetPDFPS [arguments] Execution Now everything is ready and you can create objects like in the following snippet: $var = Open-PDF -PdfFile <path-to-PDF-file-open> $pages = $var.NumberOfPages $var.RemovePage(0) Save-PDF -PdfDocument $var -OutputFile <path-to-PDF-file-to-save> Cmdlet available netpdfps accepts the following cmdlets: Start-NetPDFPS: Initialize the engine and shall be the first command to be invoked. The arguments are: LicensePath JDKHome JVMPath JNIVerbosity JNIOutputFile JmxPort EnableDebug JavaDebugPort DebugSuspendFlag JavaDebugOpts HeapSize InitialHeapSize LogClassPath Open-PDF: open a PDF file. The arguments are: PdfFile Save-PDF: Save a previously opened PDF file. The arguments are: PdfDocument OutputFile CompressParameter (optional) JVM identification One of the most important command-line switch is JVMPath: it can be used to set-up the location of the JVM library (jvm.dll/libjvm.so) if JCOBridge is not able to identify a suitable JRE installation."
0 commit comments