Skip to content

Commit 9bd029b

Browse files
Merge pull request #19 from kaferi/master
Update to v20.5
2 parents f1001ff + 02b5da3 commit 9bd029b

File tree

6 files changed

+597
-39
lines changed

6 files changed

+597
-39
lines changed

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Aspose.PDF Cloud
22
- API version: 3.0
3-
- Package version: 20.4.0
3+
- Package version: 20.5.0
44

55
[Aspose.PDF Cloud](https://products.aspose.cloud/pdf) is a true REST API that enables you to perform a wide range of document processing operations including creation, manipulation, conversion and rendering of PDF documents in the cloud.
66

@@ -146,7 +146,7 @@ Class | Method | HTTP request | Description
146146
*PdfApi* | [**GetImportFieldsFromXfdfInStorage**](docs/PdfApi.md#getimportfieldsfromxfdfinstorage) | **Get** /pdf/{name}/import/xfdf | Update fields from XFDF file in storage.
147147
*PdfApi* | [**GetImportFieldsFromXmlInStorage**](docs/PdfApi.md#getimportfieldsfromxmlinstorage) | **Get** /pdf/{name}/import/xml | Import from XML file (located on storage) to PDF format and return resulting file in response.
148148
*PdfApi* | [**GetInkAnnotation**](docs/PdfApi.md#getinkannotation) | **Get** /pdf/{name}/annotations/ink/{annotationId} | Read document page ink annotation by ID.
149-
*PdfApi* | [**GetLaTeXInStorageToPdf**](docs/PdfApi.md#getlatexinstoragetopdf) | **Get** /pdf/create/latex | Convert LaTeX file (located on storage) to PDF format and return resulting file in response.
149+
*PdfApi* | [**GetLaTeXInStorageToPdf**](docs/PdfApi.md#getlatexinstoragetopdf) | **Get** /pdf/create/latex | Convert TeX file (located on storage) to PDF format and return resulting file in response.
150150
*PdfApi* | [**GetLineAnnotation**](docs/PdfApi.md#getlineannotation) | **Get** /pdf/{name}/annotations/line/{annotationId} | Read document page line annotation by ID.
151151
*PdfApi* | [**GetLinkAnnotation**](docs/PdfApi.md#getlinkannotation) | **Get** /pdf/{name}/links/{linkId} | Read document link annotation by ID.
152152
*PdfApi* | [**GetListBoxField**](docs/PdfApi.md#getlistboxfield) | **Get** /pdf/{name}/fields/listbox/{fieldName} | Read document listbox field by name.
@@ -198,11 +198,12 @@ Class | Method | HTTP request | Description
198198
*PdfApi* | [**GetPdfInStorageToDoc**](docs/PdfApi.md#getpdfinstoragetodoc) | **Get** /pdf/{name}/convert/doc | Converts PDF document (located on storage) to DOC format and returns resulting file in response content
199199
*PdfApi* | [**GetPdfInStorageToEpub**](docs/PdfApi.md#getpdfinstoragetoepub) | **Get** /pdf/{name}/convert/epub | Converts PDF document (located on storage) to EPUB format and returns resulting file in response content
200200
*PdfApi* | [**GetPdfInStorageToHtml**](docs/PdfApi.md#getpdfinstoragetohtml) | **Get** /pdf/{name}/convert/html | Converts PDF document (located on storage) to Html format and returns resulting file in response content
201-
*PdfApi* | [**GetPdfInStorageToLaTeX**](docs/PdfApi.md#getpdfinstoragetolatex) | **Get** /pdf/{name}/convert/latex | Converts PDF document (located on storage) to LaTeX format and returns resulting file in response content
201+
*PdfApi* | [**GetPdfInStorageToLaTeX**](docs/PdfApi.md#getpdfinstoragetolatex) | **Get** /pdf/{name}/convert/latex | Converts PDF document (located on storage) to TeX format and returns resulting file in response content
202202
*PdfApi* | [**GetPdfInStorageToMobiXml**](docs/PdfApi.md#getpdfinstoragetomobixml) | **Get** /pdf/{name}/convert/mobixml | Converts PDF document (located on storage) to MOBIXML format and returns resulting file in response content
203203
*PdfApi* | [**GetPdfInStorageToPdfA**](docs/PdfApi.md#getpdfinstoragetopdfa) | **Get** /pdf/{name}/convert/pdfa | Converts PDF document (located on storage) to PdfA format and returns resulting file in response content
204204
*PdfApi* | [**GetPdfInStorageToPptx**](docs/PdfApi.md#getpdfinstoragetopptx) | **Get** /pdf/{name}/convert/pptx | Converts PDF document (located on storage) to PPTX format and returns resulting file in response content
205205
*PdfApi* | [**GetPdfInStorageToSvg**](docs/PdfApi.md#getpdfinstoragetosvg) | **Get** /pdf/{name}/convert/svg | Converts PDF document (located on storage) to SVG format and returns resulting file in response content
206+
*PdfApi* | [**GetPdfInStorageToTeX**](docs/PdfApi.md#getpdfinstoragetotex) | **Get** /pdf/{name}/convert/tex | Converts PDF document (located on storage) to TeX format and returns resulting file in response content
206207
*PdfApi* | [**GetPdfInStorageToTiff**](docs/PdfApi.md#getpdfinstoragetotiff) | **Get** /pdf/{name}/convert/tiff | Converts PDF document (located on storage) to TIFF format and returns resulting file in response content
207208
*PdfApi* | [**GetPdfInStorageToXls**](docs/PdfApi.md#getpdfinstoragetoxls) | **Get** /pdf/{name}/convert/xls | Converts PDF document (located on storage) to XLS format and returns resulting file in response content
208209
*PdfApi* | [**GetPdfInStorageToXlsx**](docs/PdfApi.md#getpdfinstoragetoxlsx) | **Get** /pdf/{name}/convert/xlsx | Converts PDF document (located on storage) to XLSX format and returns resulting file in response content
@@ -226,6 +227,7 @@ Class | Method | HTTP request | Description
226227
*PdfApi* | [**GetStrikeOutAnnotation**](docs/PdfApi.md#getstrikeoutannotation) | **Get** /pdf/{name}/annotations/strikeout/{annotationId} | Read document page StrikeOut annotation by ID.
227228
*PdfApi* | [**GetSvgInStorageToPdf**](docs/PdfApi.md#getsvginstoragetopdf) | **Get** /pdf/create/svg | Convert SVG file (located on storage) to PDF format and return resulting file in response.
228229
*PdfApi* | [**GetTable**](docs/PdfApi.md#gettable) | **Get** /pdf/{name}/tables/{tableId} | Read document page table by ID.
230+
*PdfApi* | [**GetTeXInStorageToPdf**](docs/PdfApi.md#gettexinstoragetopdf) | **Get** /pdf/create/tex | Convert TeX file (located on storage) to PDF format and return resulting file in response.
229231
*PdfApi* | [**GetText**](docs/PdfApi.md#gettext) | **Get** /pdf/{name}/text | Read document text.
230232
*PdfApi* | [**GetTextAnnotation**](docs/PdfApi.md#gettextannotation) | **Get** /pdf/{name}/annotations/text/{annotationId} | Read document page text annotation by ID.
231233
*PdfApi* | [**GetTextBoxField**](docs/PdfApi.md#gettextboxfield) | **Get** /pdf/{name}/fields/textbox/{fieldName} | Read document text box field by name.
@@ -332,7 +334,7 @@ Class | Method | HTTP request | Description
332334
*PdfApi* | [**PutImportFieldsFromXfdfInStorage**](docs/PdfApi.md#putimportfieldsfromxfdfinstorage) | **Put** /pdf/{name}/import/xfdf | Update fields from XFDF file in storage.
333335
*PdfApi* | [**PutImportFieldsFromXmlInStorage**](docs/PdfApi.md#putimportfieldsfromxmlinstorage) | **Put** /pdf/{name}/import/xml | Update fields from XML file in storage.
334336
*PdfApi* | [**PutInkAnnotation**](docs/PdfApi.md#putinkannotation) | **Put** /pdf/{name}/annotations/ink/{annotationId} | Replace document ink annotation
335-
*PdfApi* | [**PutLaTeXInStorageToPdf**](docs/PdfApi.md#putlatexinstoragetopdf) | **Put** /pdf/{name}/create/latex | Convert LaTeX file (located on storage) to PDF format and upload resulting file to storage.
337+
*PdfApi* | [**PutLaTeXInStorageToPdf**](docs/PdfApi.md#putlatexinstoragetopdf) | **Put** /pdf/{name}/create/latex | Convert TeX file (located on storage) to PDF format and upload resulting file to storage.
336338
*PdfApi* | [**PutLineAnnotation**](docs/PdfApi.md#putlineannotation) | **Put** /pdf/{name}/annotations/line/{annotationId} | Replace document line annotation
337339
*PdfApi* | [**PutLinkAnnotation**](docs/PdfApi.md#putlinkannotation) | **Put** /pdf/{name}/links/{linkId} | Replace document page link annotations
338340
*PdfApi* | [**PutListBoxField**](docs/PdfApi.md#putlistboxfield) | **Put** /pdf/{name}/fields/listbox/{fieldName} | Replace document listbox field
@@ -352,11 +354,12 @@ Class | Method | HTTP request | Description
352354
*PdfApi* | [**PutPdfInRequestToDoc**](docs/PdfApi.md#putpdfinrequesttodoc) | **Put** /pdf/convert/doc | Converts PDF document (in request content) to DOC format and uploads resulting file to storage.
353355
*PdfApi* | [**PutPdfInRequestToEpub**](docs/PdfApi.md#putpdfinrequesttoepub) | **Put** /pdf/convert/epub | Converts PDF document (in request content) to EPUB format and uploads resulting file to storage.
354356
*PdfApi* | [**PutPdfInRequestToHtml**](docs/PdfApi.md#putpdfinrequesttohtml) | **Put** /pdf/convert/html | Converts PDF document (in request content) to Html format and uploads resulting file to storage.
355-
*PdfApi* | [**PutPdfInRequestToLaTeX**](docs/PdfApi.md#putpdfinrequesttolatex) | **Put** /pdf/convert/latex | Converts PDF document (in request content) to LaTeX format and uploads resulting file to storage.
357+
*PdfApi* | [**PutPdfInRequestToLaTeX**](docs/PdfApi.md#putpdfinrequesttolatex) | **Put** /pdf/convert/latex | Converts PDF document (in request content) to TeX format and uploads resulting file to storage.
356358
*PdfApi* | [**PutPdfInRequestToMobiXml**](docs/PdfApi.md#putpdfinrequesttomobixml) | **Put** /pdf/convert/mobixml | Converts PDF document (in request content) to MOBIXML format and uploads resulting file to storage.
357359
*PdfApi* | [**PutPdfInRequestToPdfA**](docs/PdfApi.md#putpdfinrequesttopdfa) | **Put** /pdf/convert/pdfa | Converts PDF document (in request content) to PdfA format and uploads resulting file to storage.
358360
*PdfApi* | [**PutPdfInRequestToPptx**](docs/PdfApi.md#putpdfinrequesttopptx) | **Put** /pdf/convert/pptx | Converts PDF document (in request content) to PPTX format and uploads resulting file to storage.
359361
*PdfApi* | [**PutPdfInRequestToSvg**](docs/PdfApi.md#putpdfinrequesttosvg) | **Put** /pdf/convert/svg | Converts PDF document (in request content) to SVG format and uploads resulting file to storage.
362+
*PdfApi* | [**PutPdfInRequestToTeX**](docs/PdfApi.md#putpdfinrequesttotex) | **Put** /pdf/convert/tex | Converts PDF document (in request content) to TeX format and uploads resulting file to storage.
360363
*PdfApi* | [**PutPdfInRequestToTiff**](docs/PdfApi.md#putpdfinrequesttotiff) | **Put** /pdf/convert/tiff | Converts PDF document (in request content) to TIFF format and uploads resulting file to storage.
361364
*PdfApi* | [**PutPdfInRequestToXls**](docs/PdfApi.md#putpdfinrequesttoxls) | **Put** /pdf/convert/xls | Converts PDF document (in request content) to XLS format and uploads resulting file to storage.
362365
*PdfApi* | [**PutPdfInRequestToXlsx**](docs/PdfApi.md#putpdfinrequesttoxlsx) | **Put** /pdf/convert/xlsx | Converts PDF document (in request content) to XLSX format and uploads resulting file to storage.
@@ -365,11 +368,12 @@ Class | Method | HTTP request | Description
365368
*PdfApi* | [**PutPdfInStorageToDoc**](docs/PdfApi.md#putpdfinstoragetodoc) | **Put** /pdf/{name}/convert/doc | Converts PDF document (located on storage) to DOC format and uploads resulting file to storage
366369
*PdfApi* | [**PutPdfInStorageToEpub**](docs/PdfApi.md#putpdfinstoragetoepub) | **Put** /pdf/{name}/convert/epub | Converts PDF document (located on storage) to EPUB format and uploads resulting file to storage
367370
*PdfApi* | [**PutPdfInStorageToHtml**](docs/PdfApi.md#putpdfinstoragetohtml) | **Put** /pdf/{name}/convert/html | Converts PDF document (located on storage) to Html format and uploads resulting file to storage
368-
*PdfApi* | [**PutPdfInStorageToLaTeX**](docs/PdfApi.md#putpdfinstoragetolatex) | **Put** /pdf/{name}/convert/latex | Converts PDF document (located on storage) to LaTeX format and uploads resulting file to storage
371+
*PdfApi* | [**PutPdfInStorageToLaTeX**](docs/PdfApi.md#putpdfinstoragetolatex) | **Put** /pdf/{name}/convert/latex | Converts PDF document (located on storage) to TeX format and uploads resulting file to storage
369372
*PdfApi* | [**PutPdfInStorageToMobiXml**](docs/PdfApi.md#putpdfinstoragetomobixml) | **Put** /pdf/{name}/convert/mobixml | Converts PDF document (located on storage) to MOBIXML format and uploads resulting file to storage
370373
*PdfApi* | [**PutPdfInStorageToPdfA**](docs/PdfApi.md#putpdfinstoragetopdfa) | **Put** /pdf/{name}/convert/pdfa | Converts PDF document (located on storage) to PdfA format and uploads resulting file to storage
371374
*PdfApi* | [**PutPdfInStorageToPptx**](docs/PdfApi.md#putpdfinstoragetopptx) | **Put** /pdf/{name}/convert/pptx | Converts PDF document (located on storage) to PPTX format and uploads resulting file to storage
372375
*PdfApi* | [**PutPdfInStorageToSvg**](docs/PdfApi.md#putpdfinstoragetosvg) | **Put** /pdf/{name}/convert/svg | Converts PDF document (located on storage) to SVG format and uploads resulting file to storage
376+
*PdfApi* | [**PutPdfInStorageToTeX**](docs/PdfApi.md#putpdfinstoragetotex) | **Put** /pdf/{name}/convert/tex | Converts PDF document (located on storage) to TeX format and uploads resulting file to storage
373377
*PdfApi* | [**PutPdfInStorageToTiff**](docs/PdfApi.md#putpdfinstoragetotiff) | **Put** /pdf/{name}/convert/tiff | Converts PDF document (located on storage) to TIFF format and uploads resulting file to storage
374378
*PdfApi* | [**PutPdfInStorageToXls**](docs/PdfApi.md#putpdfinstoragetoxls) | **Put** /pdf/{name}/convert/xls | Converts PDF document (located on storage) to XLS format and uploads resulting file to storage
375379
*PdfApi* | [**PutPdfInStorageToXlsx**](docs/PdfApi.md#putpdfinstoragetoxlsx) | **Put** /pdf/{name}/convert/xlsx | Converts PDF document (located on storage) to XLSX format and uploads resulting file to storage
@@ -397,6 +401,7 @@ Class | Method | HTTP request | Description
397401
*PdfApi* | [**PutStrikeOutAnnotation**](docs/PdfApi.md#putstrikeoutannotation) | **Put** /pdf/{name}/annotations/strikeout/{annotationId} | Replace document StrikeOut annotation
398402
*PdfApi* | [**PutSvgInStorageToPdf**](docs/PdfApi.md#putsvginstoragetopdf) | **Put** /pdf/{name}/create/svg | Convert SVG file (located on storage) to PDF format and upload resulting file to storage.
399403
*PdfApi* | [**PutTable**](docs/PdfApi.md#puttable) | **Put** /pdf/{name}/tables/{tableId} | Replace document page table.
404+
*PdfApi* | [**PutTeXInStorageToPdf**](docs/PdfApi.md#puttexinstoragetopdf) | **Put** /pdf/{name}/create/tex | Convert TeX file (located on storage) to PDF format and upload resulting file to storage.
400405
*PdfApi* | [**PutTextAnnotation**](docs/PdfApi.md#puttextannotation) | **Put** /pdf/{name}/annotations/text/{annotationId} | Replace document text annotation
401406
*PdfApi* | [**PutTextBoxField**](docs/PdfApi.md#puttextboxfield) | **Put** /pdf/{name}/fields/textbox/{fieldName} | Replace document text box field
402407
*PdfApi* | [**PutUnderlineAnnotation**](docs/PdfApi.md#putunderlineannotation) | **Put** /pdf/{name}/annotations/underline/{annotationId} | Replace document underline annotation

api_client.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ func (c *APIClient) prepareRequest (
172172
fileBytes []byte) (localVarRequest *http.Request, err error) {
173173

174174
var body *bytes.Buffer
175+
176+
// set custom header
177+
headerParams["x-aspose-client"] = "go sdk"
178+
headerParams["x-aspose-client-version"] = "20.5.0"
175179

176180
// Detect postBody type and post.
177181
if postBody != nil {

convert_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -765,8 +765,8 @@ func TestPutPdfInRequestToPptx(t *testing.T) {
765765
}
766766
}
767767

768-
// To LaTeX
769-
func TestGetPdfInStorageToLaTeX(t *testing.T) {
768+
// To TeX
769+
func TestGetPdfInStorageToTeX(t *testing.T) {
770770

771771
name := "4pages.pdf"
772772

@@ -779,17 +779,17 @@ func TestGetPdfInStorageToLaTeX(t *testing.T) {
779779

780780
}
781781

782-
response, httpResponse, err := GetBaseTest().PdfAPI.GetPdfInStorageToLaTeX(name, args)
782+
response, httpResponse, err := GetBaseTest().PdfAPI.GetPdfInStorageToTeX(name, args)
783783
if err != nil {
784784
t.Error(err)
785785
} else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 {
786786
t.Fail()
787787
} else {
788-
fmt.Printf("%d\tTestGetPdfInStorageToLaTeX - %db\n", GetBaseTest().GetTestNumber(), len(response))
788+
fmt.Printf("%d\tTestGetPdfInStorageToTeX - %db\n", GetBaseTest().GetTestNumber(), len(response))
789789
}
790790
}
791791

792-
func TestPutPdfInStorageToLaTeX(t *testing.T) {
792+
func TestPutPdfInStorageToTeX(t *testing.T) {
793793

794794
name := "4pages.pdf"
795795

@@ -804,17 +804,17 @@ func TestPutPdfInStorageToLaTeX(t *testing.T) {
804804
"folder": GetBaseTest().remoteFolder,
805805
}
806806

807-
response, httpResponse, err := GetBaseTest().PdfAPI.PutPdfInStorageToLaTeX(name, outPath, args)
807+
response, httpResponse, err := GetBaseTest().PdfAPI.PutPdfInStorageToTeX(name, outPath, args)
808808
if err != nil {
809809
t.Error(err)
810810
} else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 {
811811
t.Fail()
812812
} else {
813-
fmt.Printf("%d\tTestPutPdfInStorageToLaTeX - %d\n", GetBaseTest().GetTestNumber(), response.Code)
813+
fmt.Printf("%d\tTestPutPdfInStorageToTeX - %d\n", GetBaseTest().GetTestNumber(), response.Code)
814814
}
815815
}
816816

817-
func TestPutPdfInRequestToLaTeX(t *testing.T) {
817+
func TestPutPdfInRequestToTeX(t *testing.T) {
818818
name := "4pages.pdf"
819819
resFileName := "result.tex";
820820
outPath := GetBaseTest().remoteFolder + "/" + resFileName;
@@ -829,13 +829,13 @@ func TestPutPdfInRequestToLaTeX(t *testing.T) {
829829
"file": file,
830830
}
831831

832-
response, httpResponse, err := GetBaseTest().PdfAPI.PutPdfInRequestToLaTeX(outPath, args)
832+
response, httpResponse, err := GetBaseTest().PdfAPI.PutPdfInRequestToTeX(outPath, args)
833833
if err != nil {
834834
t.Error(err)
835835
} else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 {
836836
t.Fail()
837837
} else {
838-
fmt.Printf("%d\tTestPutPdfInRequestToLaTeX - %d\n", GetBaseTest().GetTestNumber(), response.Code)
838+
fmt.Printf("%d\tTestPutPdfInRequestToTeX - %d\n", GetBaseTest().GetTestNumber(), response.Code)
839839
}
840840
}
841841

convert_to_pdf_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ func TestPutWebInStorageToPdf(t *testing.T) {
106106
}
107107
}
108108

109-
// from LaTeX
110-
func TestGetLaTeXInStorageToPdf(t *testing.T) {
109+
// from TeX
110+
func TestGetTeXInStorageToPdf(t *testing.T) {
111111

112112
name := "sample.tex"
113113
srcPath := GetBaseTest().remoteFolder + "/" + name
@@ -118,20 +118,20 @@ func TestGetLaTeXInStorageToPdf(t *testing.T) {
118118

119119
args := make(map[string]interface{})
120120

121-
response, httpResponse, err := GetBaseTest().PdfAPI.GetLaTeXInStorageToPdf(srcPath, args)
121+
response, httpResponse, err := GetBaseTest().PdfAPI.GetTeXInStorageToPdf(srcPath, args)
122122
if err != nil {
123123
t.Error(err)
124124
} else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 {
125125
t.Fail()
126126
} else {
127-
fmt.Printf("%d\tTestGetLaTeXInStorageToPdf - %db\n", GetBaseTest().GetTestNumber(), len(response))
127+
fmt.Printf("%d\tTestGetTeXInStorageToPdf - %db\n", GetBaseTest().GetTestNumber(), len(response))
128128
}
129129
}
130130

131-
func TestPutLaTeXInStorageToPdf(t *testing.T) {
131+
func TestPutTeXInStorageToPdf(t *testing.T) {
132132

133133
name := "sample.tex"
134-
resFileName := "fromLaTeX.pdf"
134+
resFileName := "fromTeX.pdf"
135135
srcPath := GetBaseTest().remoteFolder + "/" + name
136136

137137
if err := GetBaseTest().UploadFile(name); err != nil {
@@ -142,13 +142,13 @@ func TestPutLaTeXInStorageToPdf(t *testing.T) {
142142
"folder": GetBaseTest().remoteFolder,
143143
}
144144

145-
response, httpResponse, err := GetBaseTest().PdfAPI.PutLaTeXInStorageToPdf(resFileName, srcPath, args)
145+
response, httpResponse, err := GetBaseTest().PdfAPI.PutTeXInStorageToPdf(resFileName, srcPath, args)
146146
if err != nil {
147147
t.Error(err)
148148
} else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 {
149149
t.Fail()
150150
} else {
151-
fmt.Printf("%d\tTestPutLaTeXInStorageToPdf - %d\n", GetBaseTest().GetTestNumber(), response.Code)
151+
fmt.Printf("%d\tTestPutTeXInStorageToPdf - %d\n", GetBaseTest().GetTestNumber(), response.Code)
152152
}
153153
}
154154

0 commit comments

Comments
 (0)