diff --git a/Document-Processing/Word/Word-Processor/angular/web-services/java.md b/Document-Processing/Word/Word-Processor/angular/web-services/java.md index ce4c5630fa..8c0c9d29e0 100644 --- a/Document-Processing/Word/Word-Processor/angular/web-services/java.md +++ b/Document-Processing/Word/Word-Processor/angular/web-services/java.md @@ -130,7 +130,7 @@ The following example code illustrates how to write a Web API for importing Word The web browsers do not support to display metafile images like EMF and WMF and also TIFF format images. As a fallback approach, you can convert the metafile/TIFF format image to raster image using any image converter in the `MetafileImageParsed` event and this fallback raster image will be displayed in the client-side Document editor component. ->Note: In `MetafileImageParsedEventArgs` event argument, you can get the metafile stream using `getMetafileStream()` property and you can get the `getIsMetafile()` boolean value to determine whether the image is meta file images(WMF,EMF) or Tiff format images. In below example, we have converted the TIFF to raster image in `ConvertTiffToRasterImage()` method using TwelveMonkeys ImageIO TIFF library. +>Note: In `MetafileImageParsedEventArgs` event argument, you can get the metafile stream using `getMetafileStream()` property and you can get the `getIsMetafile()` boolean value to determine whether the image is meta file images(WMF,EMF) or TIFF format images. In below example, we have converted the TIFF to raster image in `ConvertTiffToRasterImage()` method using TwelveMonkeys ImageIO TIFF library. The following example code illustrates how to use `MetafileImageParsed` event for creating fallback raster image for metafile present in a Word document. @@ -331,15 +331,16 @@ The following example code illustrates how to write a Web API for restrict editi @CrossOrigin(origins = "*", allowedHeaders = "*") @PostMapping("/api/wordeditor/RestrictEditing") public String[] restrictEditing(@RequestBody CustomRestrictParameter param) throws Exception { - if (param.passwordBase64 == "" && param.passwordBase64 == null) + if (param.passwordBase64 == "" || param.passwordBase64 == null) return null; - return WordProcessorHelper.computeHash(param.passwordBase64, param.saltBase64, param.spinCount); + return WordProcessorHelper.computeHash(param.passwordBase64, param.saltBase64, param.spinCount, param.algorithmSid); } public class CustomRestrictParameter { public String passwordBase64; public String saltBase64; public int spinCount; + public String algorithmSid; public String getPasswordBase64() { return passwordBase64; } @@ -349,6 +350,9 @@ The following example code illustrates how to write a Web API for restrict editi public int getSpinCount() { return spinCount; } + public String getAlgorithmSid() { + return algorithmSid; + } public void setPasswordBase64(String value) { passwordBase64= value; } @@ -358,6 +362,9 @@ The following example code illustrates how to write a Web API for restrict editi public void setSpinCount(int value) { spinCount= value; } + public void setAlgorithmSid(String value) { + algorithmSid= value; + } } ``` diff --git a/Document-Processing/Word/Word-Processor/javascript-es5/web-services/java.md b/Document-Processing/Word/Word-Processor/javascript-es5/web-services/java.md index 834b0ba8ba..cd4ebd4dbc 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es5/web-services/java.md +++ b/Document-Processing/Word/Word-Processor/javascript-es5/web-services/java.md @@ -132,7 +132,7 @@ The following example code illustrates how to write a Web API for importing Word The web browsers do not support to display metafile images like EMF and WMF and also TIFF format images. As a fallback approach, you can convert the metafile/TIFF format image to raster image using any image converter in the `MetafileImageParsed` event and this fallback raster image will be displayed in the client-side Document editor component. ->Note: In `MetafileImageParsedEventArgs` event argument, you can get the metafile stream using `getMetafileStream()` property and you can get the `getIsMetafile()` boolean value to determine whether the image is meta file images(WMF,EMF) or Tiff format images. In below example, we have converted the TIFF to raster image in `ConvertTiffToRasterImage()` method using TwelveMonkeys ImageIO TIFF library. +>Note: In `MetafileImageParsedEventArgs` event argument, you can get the metafile stream using `getMetafileStream()` property and you can get the `getIsMetafile()` boolean value to determine whether the image is meta file images(WMF,EMF) or TIFF format images. In below example, we have converted the TIFF to raster image in `ConvertTiffToRasterImage()` method using TwelveMonkeys ImageIO TIFF library. The following example code illustrates how to use `MetafileImageParsed` event for creating fallback raster image for metafile present in a Word document. @@ -336,15 +336,16 @@ The following example code illustrates how to write a Web API for restrict editi @CrossOrigin(origins = "*", allowedHeaders = "*") @PostMapping("/api/wordeditor/RestrictEditing") public String[] restrictEditing(@RequestBody CustomRestrictParameter param) throws Exception { - if (param.passwordBase64 == "" && param.passwordBase64 == null) + if (param.passwordBase64 == "" || param.passwordBase64 == null) return null; - return WordProcessorHelper.computeHash(param.passwordBase64, param.saltBase64, param.spinCount); + return WordProcessorHelper.computeHash(param.passwordBase64, param.saltBase64, param.spinCount, param.algorithmSid); } public class CustomRestrictParameter { public String passwordBase64; public String saltBase64; public int spinCount; + public String algorithmSid; public String getPasswordBase64() { return passwordBase64; } @@ -354,6 +355,9 @@ The following example code illustrates how to write a Web API for restrict editi public int getSpinCount() { return spinCount; } + public String getAlgorithmSid() { + return algorithmSid; + } public void setPasswordBase64(String value) { passwordBase64= value; } @@ -363,6 +367,9 @@ The following example code illustrates how to write a Web API for restrict editi public void setSpinCount(int value) { spinCount= value; } + public void setAlgorithmSid(String value) { + algorithmSid= value; + } } ``` diff --git a/Document-Processing/Word/Word-Processor/javascript-es6/web-services/java.md b/Document-Processing/Word/Word-Processor/javascript-es6/web-services/java.md index 2b4189e963..4e131df610 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es6/web-services/java.md +++ b/Document-Processing/Word/Word-Processor/javascript-es6/web-services/java.md @@ -132,7 +132,7 @@ The following example code illustrates how to write a Web API for importing Word The web browsers do not support to display metafile images like EMF and WMF and also TIFF format images. As a fallback approach, you can convert the metafile/TIFF format image to raster image using any image converter in the `MetafileImageParsed` event and this fallback raster image will be displayed in the client-side Document editor component. ->Note: In `MetafileImageParsedEventArgs` event argument, you can get the metafile stream using `getMetafileStream()` property and you can get the `getIsMetafile()` boolean value to determine whether the image is meta file images(WMF,EMF) or Tiff format images. In below example, we have converted the TIFF to raster image in `ConvertTiffToRasterImage()` method using TwelveMonkeys ImageIO TIFF library. +>Note: In `MetafileImageParsedEventArgs` event argument, you can get the metafile stream using `getMetafileStream()` property and you can get the `getIsMetafile()` boolean value to determine whether the image is meta file images(WMF,EMF) or TIFF format images. In below example, we have converted the TIFF to raster image in `ConvertTiffToRasterImage()` method using TwelveMonkeys ImageIO TIFF library. The following example code illustrates how to use `MetafileImageParsed` event for creating fallback raster image for metafile present in a Word document. @@ -336,15 +336,16 @@ The following example code illustrates how to write a Web API for restrict editi @CrossOrigin(origins = "*", allowedHeaders = "*") @PostMapping("/api/wordeditor/RestrictEditing") public String[] restrictEditing(@RequestBody CustomRestrictParameter param) throws Exception { - if (param.passwordBase64 == "" && param.passwordBase64 == null) + if (param.passwordBase64 == "" || param.passwordBase64 == null) return null; - return WordProcessorHelper.computeHash(param.passwordBase64, param.saltBase64, param.spinCount); + return WordProcessorHelper.computeHash(param.passwordBase64, param.saltBase64, param.spinCount, param.algorithmSid); } public class CustomRestrictParameter { public String passwordBase64; public String saltBase64; public int spinCount; + public String algorithmSid; public String getPasswordBase64() { return passwordBase64; } @@ -354,6 +355,9 @@ The following example code illustrates how to write a Web API for restrict editi public int getSpinCount() { return spinCount; } + public String getAlgorithmSid() { + return algorithmSid; + } public void setPasswordBase64(String value) { passwordBase64= value; } @@ -363,6 +367,9 @@ The following example code illustrates how to write a Web API for restrict editi public void setSpinCount(int value) { spinCount= value; } + public void setAlgorithmSid(String value) { + algorithmSid= value; + } } ``` diff --git a/Document-Processing/Word/Word-Processor/react/web-services/java.md b/Document-Processing/Word/Word-Processor/react/web-services/java.md index d82dc37d39..3e0a5e601c 100644 --- a/Document-Processing/Word/Word-Processor/react/web-services/java.md +++ b/Document-Processing/Word/Word-Processor/react/web-services/java.md @@ -130,7 +130,7 @@ The following example code illustrates how to write a Web API for importing Word The web browsers do not support to display metafile images like EMF and WMF and also TIFF format images. As a fallback approach, you can convert the metafile/TIFF format image to raster image using any image converter in the `MetafileImageParsed` event and this fallback raster image will be displayed in the client-side Document editor component. ->Note: In `MetafileImageParsedEventArgs` event argument, you can get the metafile stream using `getMetafileStream()` property and you can get the `getIsMetafile()` boolean value to determine whether the image is meta file images(WMF,EMF) or Tiff format images. In below example, we have converted the TIFF to raster image in `ConvertTiffToRasterImage()` method using TwelveMonkeys ImageIO TIFF library. +>Note: In `MetafileImageParsedEventArgs` event argument, you can get the metafile stream using `getMetafileStream()` property and you can get the `getIsMetafile()` boolean value to determine whether the image is meta file images(WMF,EMF) or TIFF format images. In below example, we have converted the TIFF to raster image in `ConvertTiffToRasterImage()` method using TwelveMonkeys ImageIO TIFF library. The following example code illustrates how to use `MetafileImageParsed` event for creating fallback raster image for metafile present in a Word document. @@ -333,15 +333,16 @@ The following example code illustrates how to write a Web API for restrict editi @CrossOrigin(origins = "*", allowedHeaders = "*") @PostMapping("/api/wordeditor/RestrictEditing") public String[] restrictEditing(@RequestBody CustomRestrictParameter param) throws Exception { - if (param.passwordBase64 == "" && param.passwordBase64 == null) + if (param.passwordBase64 == "" || param.passwordBase64 == null) return null; - return WordProcessorHelper.computeHash(param.passwordBase64, param.saltBase64, param.spinCount); + return WordProcessorHelper.computeHash(param.passwordBase64, param.saltBase64, param.spinCount, param.algorithmSid); } public class CustomRestrictParameter { public String passwordBase64; public String saltBase64; public int spinCount; + public String algorithmSid; public String getPasswordBase64() { return passwordBase64; } @@ -351,6 +352,9 @@ The following example code illustrates how to write a Web API for restrict editi public int getSpinCount() { return spinCount; } + public String getAlgorithmSid() { + return algorithmSid; + } public void setPasswordBase64(String value) { passwordBase64= value; } @@ -360,6 +364,9 @@ The following example code illustrates how to write a Web API for restrict editi public void setSpinCount(int value) { spinCount= value; } + public void setAlgorithmSid(String value) { + algorithmSid= value; + } } ``` diff --git a/Document-Processing/Word/Word-Processor/vue/web-services/java.md b/Document-Processing/Word/Word-Processor/vue/web-services/java.md index 5fb49438ca..84642f0aa4 100644 --- a/Document-Processing/Word/Word-Processor/vue/web-services/java.md +++ b/Document-Processing/Word/Word-Processor/vue/web-services/java.md @@ -130,7 +130,7 @@ The following example code illustrates how to write a Web API for importing Word The web browsers do not support to display metafile images like EMF and WMF and also TIFF format images. As a fallback approach, you can convert the metafile/TIFF format image to raster image using any image converter in the `MetafileImageParsed` event and this fallback raster image will be displayed in the client-side Document editor component. ->Note: In `MetafileImageParsedEventArgs` event argument, you can get the metafile stream using `getMetafileStream()` property and you can get the `getIsMetafile()` boolean value to determine whether the image is meta file images(WMF,EMF) or Tiff format images. In below example, we have converted the TIFF to raster image in `ConvertTiffToRasterImage()` method using TwelveMonkeys ImageIO TIFF library. +>Note: In `MetafileImageParsedEventArgs` event argument, you can get the metafile stream using `getMetafileStream()` property and you can get the `getIsMetafile()` boolean value to determine whether the image is meta file images(WMF,EMF) or TIFF format images. In below example, we have converted the TIFF to raster image in `ConvertTiffToRasterImage()` method using TwelveMonkeys ImageIO TIFF library. The following example code illustrates how to use `MetafileImageParsed` event for creating fallback raster image for metafile present in a Word document. @@ -291,15 +291,16 @@ The following example code illustrates how to write a Web API for restrict editi @CrossOrigin(origins = "*", allowedHeaders = "*") @PostMapping("/api/wordeditor/RestrictEditing") public String[] restrictEditing(@RequestBody CustomRestrictParameter param) throws Exception { - if (param.passwordBase64 == "" && param.passwordBase64 == null) + if (param.passwordBase64 == "" || param.passwordBase64 == null) return null; - return WordProcessorHelper.computeHash(param.passwordBase64, param.saltBase64, param.spinCount); + return WordProcessorHelper.computeHash(param.passwordBase64, param.saltBase64, param.spinCount, param.algorithmSid); } public class CustomRestrictParameter { public String passwordBase64; public String saltBase64; public int spinCount; + public String algorithmSid; public String getPasswordBase64() { return passwordBase64; } @@ -309,6 +310,9 @@ The following example code illustrates how to write a Web API for restrict editi public int getSpinCount() { return spinCount; } + public String getAlgorithmSid() { + return algorithmSid; + } public void setPasswordBase64(String value) { passwordBase64= value; } @@ -318,6 +322,9 @@ The following example code illustrates how to write a Web API for restrict editi public void setSpinCount(int value) { spinCount= value; } + public void setAlgorithmSid(String value) { + algorithmSid= value; + } } ```