Skip to content

Commit a41c58a

Browse files
update to 23.8.0
1 parent 6773e51 commit a41c58a

File tree

6 files changed

+28
-6
lines changed

6 files changed

+28
-6
lines changed

annotations_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func TestPutAnnotationsFlatten(t *testing.T) {
145145

146146
name := "PdfWithAnnotations.pdf"
147147
var endPage int32 = 2
148-
annotationTypes := []AnnotationType{AnnotationTypeStamp}
148+
annotationTypes := []AnnotationType{AnnotationTypeStamp, AnnotationTypeCircle}
149149

150150
if err := GetBaseTest().UploadFile(name); err != nil {
151151
t.Error(err)

api_client.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,6 @@ func (a *APIClient) addAuth(request *http.Request) (err error) {
423423
func (a *APIClient) RequestOauthToken() error {
424424
fmt.Println("BasePath: " + a.cfg.BasePath)
425425
tokenUrl := strings.Replace(a.cfg.BasePath, "/v3.0", "/connect/token", -1)
426-
// tokenUrl := a.cfg.BasePath + "/pdf/connect/token"
427426
fmt.Println("tokenUrl: " + tokenUrl)
428427
resp, err := http.PostForm(
429428
tokenUrl,

docs/PdfApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11621,7 +11621,7 @@ Replace document multiple image.
1162111621
Name | Type | Description | Notes
1162211622
------------- | ------------- | ------------- | -------------
1162311623
**name** | **string**| The document name. |
11624-
**imageIds** | **[]string**| The image IDs. |
11624+
**imageIds** | [**[]string**](string.md)| The image IDs. |
1162511625
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
1162611626

1162711627
### Optional Parameters
@@ -11630,7 +11630,7 @@ Optional parameters are passed through a map[string]interface{}.
1163011630
Name | Type | Description | Notes
1163111631
------------- | ------------- | ------------- | -------------
1163211632
**name** | **string**| The document name. |
11633-
**imageIds** | **[]string**| The image IDs. |
11633+
**imageIds** | [**[]string**](string.md)| The image IDs. |
1163411634
**imageFilePath** | **string**| Path to image file if specified. Request content is used otherwise. |
1163511635
**storage** | **string**| The document storage. |
1163611636
**folder** | **string**| The document folder. |

images_test.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,30 @@ func TestPutReplaceImage(t *testing.T) {
141141
}
142142
}
143143

144+
func TestPutReplaceMultipleImage(t *testing.T) {
145+
name := "PdfWithImages.pdf"
146+
if err := GetBaseTest().UploadFile(name); err != nil {
147+
t.Error(err)
148+
}
149+
imageFileName := "butterfly.jpg"
150+
if err := GetBaseTest().UploadFile(imageFileName); err != nil {
151+
t.Error(err)
152+
}
153+
args := map[string]interface{}{
154+
"folder": GetBaseTest().remoteFolder,
155+
"imageFilePath": GetBaseTest().remoteFolder + "/" + imageFileName,
156+
}
157+
response, httpResponse, err := GetBaseTest().PdfAPI.PutReplaceMultipleImage(name,
158+
[]string{"GE5TENJVGQZTWMJYGQWDINRUFQ2DCMRMGY4TC", "GE5TIMJSGY3TWMJXG4WDIMBZFQ2DCOJMGQ3DK"}, args)
159+
if err != nil {
160+
t.Error(err)
161+
} else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 {
162+
t.Fail()
163+
} else {
164+
fmt.Printf("%d\tTestPutReplaceMultipleImage - %d\n", GetBaseTest().GetTestNumber(), response.Code)
165+
}
166+
}
167+
144168
func TestPostInsertImage(t *testing.T) {
145169

146170
name := "PdfWithImages2.pdf"

pdf_api.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28700,6 +28700,7 @@ func (a *PdfApiService) PutReplaceMultipleImage(name string, imageIds []string,
2870028700
return successPayload, nil, err
2870128701
}
2870228702

28703+
localVarQueryParams.Add("imageIds", parameterToString(imageIds, "csv"))
2870328704
if localVarTempParam, localVarOk := localVarOptionals["imageFilePath"].(string); localVarOk {
2870428705
localVarQueryParams.Add("imageFilePath", parameterToString(localVarTempParam, ""))
2870528706
}
@@ -28738,8 +28739,6 @@ func (a *PdfApiService) PutReplaceMultipleImage(name string, imageIds []string,
2873828739
localVarFileName = localVarFile.Name()
2873928740
localVarFile.Close()
2874028741
}
28741-
// body params
28742-
localVarPostBody = &imageIds
2874328742
r, err := a.client.prepareRequest(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
2874428743
if err != nil {
2874528744
return successPayload, nil, err

test_data/PdfWithImages.pdf

1.55 MB
Binary file not shown.

0 commit comments

Comments
 (0)