Skip to content

Commit 1540a62

Browse files
Update documentation after commit 5f31839 (#67)
* Update documentation after commit 5f31839 * Centralize menu --------- Co-authored-by: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com>
1 parent 5f31839 commit 1540a62

File tree

4 files changed

+21
-108
lines changed

4 files changed

+21
-108
lines changed

.github/workflows/documentation.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,21 @@ jobs:
3131
with:
3232
fetch-depth: '1'
3333
submodules: 'true'
34-
34+
35+
- name: Common site
36+
uses: actions/checkout@v4
37+
with:
38+
repository: masesgroup/CommonTools
39+
path: CommonTools
40+
3541
- name: Clear documentation folder
3642
run: Remove-Item .\docs\* -Recurse -Force -Exclude _config.yml,CNAME,d8b8bd4e12b04559b53419cc8b571873.txt
3743

3844
- run: dotnet tool update -g docfx
3945

4046
- name: Build documentation
4147
run: |
48+
Copy-Item ${{ github.workspace }}\CommonTools\website\* -Destination ${{ github.workspace }}\src\documentation\ -Force -Recurse -Verbose
4249
cd src\documentation
4350
docfx
4451

docs/articles/usagePS.html

Lines changed: 10 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -104,34 +104,10 @@ <h3 id="initialization">Initialization</h3>
104104
</code></pre>
105105
<h3 id="execution">Execution</h3>
106106
<p>Now everything is ready and you can create objects like in the following snippet:</p>
107-
<pre><code class="lang-powershell">$var = New-JObject -Class java.lang.String -Arguments &quot;Hello from&quot;
108-
$var.ToString()
109-
$var = $var.concat(&quot; NetPDFPS&quot;)
110-
$var.ToString()
111-
</code></pre>
112-
<p>the output will be:</p>
113-
<pre><code class="lang-shell">Hello from
114-
Hello from NetPDFPS
115-
</code></pre>
116-
<h3 id="jmx-example">JMX example</h3>
117-
<p>From version 1.5.0 new JMX comlets are available; the tutorial in <a href="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>
118-
<pre><code class="lang-powershell">$url = New-JMXServiceURL &quot;service:jmx:rmi:///jndi/rmi://:9999/jmxrmi&quot;
119-
$connector = Get-JMXConnector $url
120-
121-
$domains = Get-Domains $connector
122-
$defaultdomain = Get-DefaultDomain $connector
123-
$names = Get-QueryNames $connector
124-
125-
$mbeanName = New-ObjectName &quot;com.example:type=Hello&quot;
126-
$mbeanProxy = New-MBeanProxy -Connector $connector -ObjectName $mbeanName -InterfaceName &quot;HelloMBean&quot; -WithNotificationEmitter
127-
128-
[Action[JavaX.Management.Notification, System.Object]]$action = {param($notification, $handback) Write-Host &quot;Notification message is $notification.Message&quot;}
129-
$listener = New-NotificationListener $action
130-
131-
Add-NotificationListener $connector $mbeanName $listener
132-
133-
mbeanProxy.getCacheSize() // this use dynamic on mbeanProxy
134-
107+
<pre><code class="lang-powershell">$var = Open-PDF -PdfFile &lt;path-to-PDF-file-open&gt;
108+
$pages = $var.NumberOfPages
109+
$var.RemovePage(0)
110+
Save-PDF -PdfDocument $var -OutputFile &lt;path-to-PDF-file-to-save&gt;
135111
</code></pre>
136112
<h2 id="cmdlet-available">Cmdlet available</h2>
137113
<p><em>netpdfps</em> accepts the following cmdlets:</p>
@@ -153,65 +129,19 @@ <h2 id="cmdlet-available">Cmdlet available</h2>
153129
<li>LogClassPath</li>
154130
</ul>
155131
</li>
156-
<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:
163133
<ul>
164-
<li>Class</li>
165-
<li>Arguments</li>
134+
<li>PdfFile</li>
166135
</ul>
167136
</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:
169138
<ul>
170-
<li>ClassName</li>
139+
<li>PdfDocument</li>
140+
<li>OutputFile</li>
141+
<li>CompressParameter (optional)</li>
171142
</ul>
172143
</li>
173144
</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>
184-
<li><strong>Invoke-QueryAnd</strong>: execute Query.And</li>
185-
<li><strong>Invoke-QueryAnySubString</strong>: execute Query.AnySubString</li>
186-
<li><strong>Invoke-QueryAttr</strong>: execute Query.Attr</li>
187-
<li><strong>Invoke-QueryBetween</strong>: execute Query.Between</li>
188-
<li><strong>Invoke-QueryClassattr</strong>: execute Query.Classattr</li>
189-
<li><strong>Invoke-QueryDiv</strong>: execute Query.Div</li>
190-
<li><strong>Invoke-QueryEq</strong>: execute Query.Eq</li>
191-
<li><strong>Invoke-QueryFinalSubString</strong>: execute Query.FinalSubString</li>
192-
<li><strong>Invoke-QueryGeq</strong>: execute Query.Geq</li>
193-
<li><strong>Invoke-QueryGt</strong>: execute Query.Gt</li>
194-
<li><strong>Invoke-QueryIn</strong>: execute Query.In</li>
195-
<li><strong>Invoke-QueryInitialSubString</strong>: execute Query.nitialSubString</li>
196-
<li><strong>Invoke-QueryIsInstanceOf</strong>: execute Query.IsInstanceOf</li>
197-
<li><strong>Invoke-QueryLeq</strong>: execute Query.Leq</li>
198-
<li><strong>Invoke-QueryLt</strong>: execute Query.Lt</li>
199-
<li><strong>Invoke-QueryMatch</strong>: execute Query.Match</li>
200-
<li><strong>Invoke-QueryMinus</strong>: execute Query.Minus</li>
201-
<li><strong>Invoke-QueryNot</strong>: execute Query.Not</li>
202-
<li><strong>Invoke-QueryOr</strong>: execute Query.Or</li>
203-
<li><strong>Invoke-QueryPlus</strong>: execute Query.Plus</li>
204-
<li><strong>Invoke-QueryTimes</strong>: execute Query.Times</li>
205-
<li><strong>Invoke-QueryValue</strong>: execute Query.Value</li>
206-
<li><strong>New-AttributeChangeNotificationFilter</strong>: create a new AttributeChangeNotificationFilter to be used in Add-NotificationListener</li>
207-
<li><strong>New-JMXServiceURL</strong>: create a new JMXServiceURL to be used in Get-JMXConnector</li>
208-
<li><strong>New-MBeanProxy</strong>: get a MBeanProxy from a JMXConnector</li>
209-
<li><strong>New-MXBeanProxy</strong>: get a MXBeanProxy from a JMXConnector</li>
210-
<li><strong>New-NotificationFilterSupport</strong>: create a new NotificationFilterSupport to be used in Add-NotificationListener</li>
211-
<li><strong>New-NotificationListener</strong>: create a new NotificationListener to be used in Add-NotificationListener</li>
212-
<li><strong>New-ObjectName</strong>: create a new ObjectName to be used in Get-JMXConnector</li>
213-
<li><strong>Remove-NotificationListener</strong>: removes a notification listener and filter from a JMXConnector</li>
214-
</ul>
215145
<h3 id="jvm-identification">JVM identification</h3>
216146
<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>
217147

docs/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4222,7 +4222,7 @@
42224222
"articles/usagePS.html": {
42234223
"href": "articles/usagePS.html",
42244224
"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."
42264226
},
42274227
"index.html": {
42284228
"href": "index.html",

src/documentation/toc.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,9 @@
1010
- name: Issues
1111
href: https://github.com/masesgroup/NetPDF/issues/
1212
- name: Open source projects
13-
dropdown: true
14-
items:
15-
- name: JNet
16-
href: https://masesgroup.github.io/JNet/
17-
- name: KNet
18-
href: https://masesgroup.github.io/KNet/
19-
- name: KEFCore
20-
href: https://masesgroup.github.io/KEFCore/
21-
- name: JCOReflector
22-
href: https://masesgroup.github.io/JCOReflector/
23-
- name: NuReflector
24-
href: https://masesgroup.github.io/NuReflector/
25-
- name: DataDistributionManager
26-
href: https://masesgroup.github.io/DataDistributionManager/
27-
- name: CLIParser
28-
href: https://masesgroup.github.io/CLIParser/
29-
- name: JCO SWT Bridge
30-
href: https://masesgroup.github.io/JCOSWTBridge/
13+
href: open_source/toc.yml
3114
- name: Other products
32-
dropdown: true
33-
items:
34-
- name: Sinapse Platform
35-
href: https://masesgroup.github.io/sinapse/
36-
- name: JCOBridge
37-
href: https://masesgroup.github.io/JCOBridge/
38-
- name: KNetOPC
39-
href: https://masesgroup.github.io/KNetOPC/
15+
href: products/toc.yml
4016
- name: External links
4117
dropdown: true
4218
items:

0 commit comments

Comments
 (0)