Skip to content

Commit 2a87262

Browse files
authored
Merge pull request #76 from aspose-pdf-cloud/develop
update to 24.10
2 parents c6a28b9 + 2f79447 commit 2a87262

File tree

13 files changed

+867
-16
lines changed

13 files changed

+867
-16
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,15 @@ XLS, XLSX, PPTX, DOC, DOCX, MobiXML, JPEG, EMF, PNG, BMP, GIF, TIFF, Text
3030
## Read PDF Formats
3131
MHT, PCL, PS, XSLFO, MD
3232

33-
## Enhancements in Version 24.9
34-
- Develop DeleteDocumentLayer Method.
35-
- Develop GetDocumentLayers Method.
36-
- How to extract PDF layer elements and create a new PDF
33+
## Enhancements in Version 24.10
34+
- Develop a method to add XMP metadata.
35+
- Develop a method to obtain XMP metadata in the XML form.
36+
- Develop a method to obtain XMP metadata in the JSON form.
3737
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
3838

39+
## Bugs fixed in Version 24.10
40+
- PDF XFA form to Acro from conversion API results corrupt PDF.
41+
3942
## Requirements.
4043
Python 2.7 and 3.4+
4144

asposepdfcloud/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@
147147
from .models.vertical_alignment import VerticalAlignment
148148
from .models.word_count import WordCount
149149
from .models.wrap_mode import WrapMode
150+
from .models.xmp_metadata import XmpMetadata
151+
from .models.xmp_metadata_property import XmpMetadataProperty
150152
from .models.annotation import Annotation
151153
from .models.annotations_info import AnnotationsInfo
152154
from .models.annotations_info_response import AnnotationsInfoResponse

asposepdfcloud/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def __init__(self, app_key, app_sid, host=None, self_host=False):
8383
self.rest_client = RESTClientObject()
8484
self.default_headers = {}
8585
self.default_headers['x-aspose-client'] = 'python sdk'
86-
self.default_headers['x-aspose-client-version'] = '24.9.0'
86+
self.default_headers['x-aspose-client-version'] = '24.10.0'
8787

8888
self.self_host = self_host
8989
self.app_key = app_key

asposepdfcloud/apis/pdf_api.py

Lines changed: 364 additions & 9 deletions
Large diffs are not rendered by default.

asposepdfcloud/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,5 +199,5 @@ def to_debug_report(self):
199199
"OS: {env}\n"\
200200
"Python Version: {pyversion}\n"\
201201
"Version of the API: 3.0\n"\
202-
"SDK Package Version: 24.9.0".\
202+
"SDK Package Version: 24.10.0".\
203203
format(env=sys.platform, pyversion=sys.version)

asposepdfcloud/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@
147147
from .vertical_alignment import VerticalAlignment
148148
from .word_count import WordCount
149149
from .wrap_mode import WrapMode
150+
from .xmp_metadata import XmpMetadata
151+
from .xmp_metadata_property import XmpMetadataProperty
150152
from .annotation import Annotation
151153
from .annotations_info import AnnotationsInfo
152154
from .annotations_info_response import AnnotationsInfoResponse

asposepdfcloud/models/xmp_metadata.py

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# coding: utf-8
2+
3+
"""
4+
Aspose.PDF Cloud API Reference
5+
6+
7+
Copyright (c) 2024 Aspose.PDF Cloud
8+
Permission is hereby granted, free of charge, to any person obtaining a copy
9+
of this software and associated documentation files (the "Software"), to deal
10+
in the Software without restriction, including without limitation the rights
11+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
copies of the Software, and to permit persons to whom the Software is
13+
furnished to do so, subject to the following conditions:
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.
23+
24+
25+
26+
OpenAPI spec version: 3.0
27+
28+
"""
29+
30+
31+
from pprint import pformat
32+
from six import iteritems
33+
import re
34+
35+
36+
class XmpMetadata(object):
37+
"""
38+
NOTE: This class is auto generated by the swagger code generator program.
39+
Do not edit the class manually.
40+
"""
41+
42+
43+
"""
44+
Attributes:
45+
swagger_types (dict): The key is attribute name
46+
and the value is attribute type.
47+
attribute_map (dict): The key is attribute name
48+
and the value is json key in definition.
49+
"""
50+
swagger_types = {
51+
'properties': 'list[XmpMetadataProperty]'
52+
}
53+
54+
attribute_map = {
55+
'properties': 'Properties'
56+
}
57+
58+
def __init__(self, properties=None):
59+
"""
60+
XmpMetadata - a model defined in Swagger
61+
"""
62+
63+
self._properties = None
64+
65+
if properties is not None:
66+
self.properties = properties
67+
68+
@property
69+
def properties(self):
70+
"""
71+
Gets the properties of this XmpMetadata.
72+
List of document Xmp Metadata default properties.
73+
74+
:return: The properties of this XmpMetadata.
75+
:rtype: list[XmpMetadataProperty]
76+
"""
77+
return self._properties
78+
79+
@properties.setter
80+
def properties(self, properties):
81+
"""
82+
Sets the properties of this XmpMetadata.
83+
List of document Xmp Metadata default properties.
84+
85+
:param properties: The properties of this XmpMetadata.
86+
:type: list[XmpMetadataProperty]
87+
"""
88+
89+
self._properties = properties
90+
91+
def to_dict(self):
92+
"""
93+
Returns the model properties as a dict
94+
"""
95+
result = {}
96+
97+
for attr, _ in iteritems(self.swagger_types):
98+
value = getattr(self, attr)
99+
if isinstance(value, list):
100+
result[attr] = list(map(
101+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
102+
value
103+
))
104+
elif hasattr(value, "to_dict"):
105+
result[attr] = value.to_dict()
106+
elif isinstance(value, dict):
107+
result[attr] = dict(map(
108+
lambda item: (item[0], item[1].to_dict())
109+
if hasattr(item[1], "to_dict") else item,
110+
value.items()
111+
))
112+
else:
113+
result[attr] = value
114+
115+
return result
116+
117+
def to_str(self):
118+
"""
119+
Returns the string representation of the model
120+
"""
121+
return pformat(self.to_dict())
122+
123+
def __repr__(self):
124+
"""
125+
For `print` and `pprint`
126+
"""
127+
return self.to_str()
128+
129+
def __eq__(self, other):
130+
"""
131+
Returns true if both objects are equal
132+
"""
133+
if not isinstance(other, XmpMetadata):
134+
return False
135+
136+
return self.__dict__ == other.__dict__
137+
138+
def __ne__(self, other):
139+
"""
140+
Returns true if both objects are not equal
141+
"""
142+
return not self == other
Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
# coding: utf-8
2+
3+
"""
4+
Aspose.PDF Cloud API Reference
5+
6+
7+
Copyright (c) 2024 Aspose.PDF Cloud
8+
Permission is hereby granted, free of charge, to any person obtaining a copy
9+
of this software and associated documentation files (the "Software"), to deal
10+
in the Software without restriction, including without limitation the rights
11+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
copies of the Software, and to permit persons to whom the Software is
13+
furnished to do so, subject to the following conditions:
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.
23+
24+
25+
26+
OpenAPI spec version: 3.0
27+
28+
"""
29+
30+
31+
from pprint import pformat
32+
from six import iteritems
33+
import re
34+
35+
36+
class XmpMetadataProperty(object):
37+
"""
38+
NOTE: This class is auto generated by the swagger code generator program.
39+
Do not edit the class manually.
40+
"""
41+
42+
43+
"""
44+
Attributes:
45+
swagger_types (dict): The key is attribute name
46+
and the value is attribute type.
47+
attribute_map (dict): The key is attribute name
48+
and the value is json key in definition.
49+
"""
50+
swagger_types = {
51+
'key': 'str',
52+
'value': 'str',
53+
'namespace_uri': 'str'
54+
}
55+
56+
attribute_map = {
57+
'key': 'Key',
58+
'value': 'Value',
59+
'namespace_uri': 'NamespaceUri'
60+
}
61+
62+
def __init__(self, key=None, value=None, namespace_uri=None):
63+
"""
64+
XmpMetadataProperty - a model defined in Swagger
65+
"""
66+
67+
self._key = None
68+
self._value = None
69+
self._namespace_uri = None
70+
71+
self.key = key
72+
if value is not None:
73+
self.value = value
74+
if namespace_uri is not None:
75+
self.namespace_uri = namespace_uri
76+
77+
@property
78+
def key(self):
79+
"""
80+
Gets the key of this XmpMetadataProperty.
81+
Xmp Metadata Property Key. Can take the form for default keys: xmp:DefaultKeyName or DefaultKeyName. Form for user defined properties: customNamespace:UserPropertyName.
82+
83+
:return: The key of this XmpMetadataProperty.
84+
:rtype: str
85+
"""
86+
return self._key
87+
88+
@key.setter
89+
def key(self, key):
90+
"""
91+
Sets the key of this XmpMetadataProperty.
92+
Xmp Metadata Property Key. Can take the form for default keys: xmp:DefaultKeyName or DefaultKeyName. Form for user defined properties: customNamespace:UserPropertyName.
93+
94+
:param key: The key of this XmpMetadataProperty.
95+
:type: str
96+
"""
97+
if key is None:
98+
raise ValueError("Invalid value for `key`, must not be `None`")
99+
if key is not None and len(key) < 1:
100+
raise ValueError("Invalid value for `key`, length must be greater than or equal to `1`")
101+
102+
self._key = key
103+
104+
@property
105+
def value(self):
106+
"""
107+
Gets the value of this XmpMetadataProperty.
108+
Xmp Metadata Property Value. Null for delete property.
109+
110+
:return: The value of this XmpMetadataProperty.
111+
:rtype: str
112+
"""
113+
return self._value
114+
115+
@value.setter
116+
def value(self, value):
117+
"""
118+
Sets the value of this XmpMetadataProperty.
119+
Xmp Metadata Property Value. Null for delete property.
120+
121+
:param value: The value of this XmpMetadataProperty.
122+
:type: str
123+
"""
124+
125+
self._value = value
126+
127+
@property
128+
def namespace_uri(self):
129+
"""
130+
Gets the namespace_uri of this XmpMetadataProperty.
131+
Namespace Uri. For user defined properties only.
132+
133+
:return: The namespace_uri of this XmpMetadataProperty.
134+
:rtype: str
135+
"""
136+
return self._namespace_uri
137+
138+
@namespace_uri.setter
139+
def namespace_uri(self, namespace_uri):
140+
"""
141+
Sets the namespace_uri of this XmpMetadataProperty.
142+
Namespace Uri. For user defined properties only.
143+
144+
:param namespace_uri: The namespace_uri of this XmpMetadataProperty.
145+
:type: str
146+
"""
147+
148+
self._namespace_uri = namespace_uri
149+
150+
def to_dict(self):
151+
"""
152+
Returns the model properties as a dict
153+
"""
154+
result = {}
155+
156+
for attr, _ in iteritems(self.swagger_types):
157+
value = getattr(self, attr)
158+
if isinstance(value, list):
159+
result[attr] = list(map(
160+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
161+
value
162+
))
163+
elif hasattr(value, "to_dict"):
164+
result[attr] = value.to_dict()
165+
elif isinstance(value, dict):
166+
result[attr] = dict(map(
167+
lambda item: (item[0], item[1].to_dict())
168+
if hasattr(item[1], "to_dict") else item,
169+
value.items()
170+
))
171+
else:
172+
result[attr] = value
173+
174+
return result
175+
176+
def to_str(self):
177+
"""
178+
Returns the string representation of the model
179+
"""
180+
return pformat(self.to_dict())
181+
182+
def __repr__(self):
183+
"""
184+
For `print` and `pprint`
185+
"""
186+
return self.to_str()
187+
188+
def __eq__(self, other):
189+
"""
190+
Returns true if both objects are equal
191+
"""
192+
if not isinstance(other, XmpMetadataProperty):
193+
return False
194+
195+
return self.__dict__ == other.__dict__
196+
197+
def __ne__(self, other):
198+
"""
199+
Returns true if both objects are not equal
200+
"""
201+
return not self == other

0 commit comments

Comments
 (0)