Skip to content

Commit

Permalink
Updated sources
Browse files Browse the repository at this point in the history
  • Loading branch information
product-team committed Feb 20, 2024
1 parent 18769aa commit 60bf207
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 18 deletions.
5 changes: 1 addition & 4 deletions groupdocs_conversion_cloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
from groupdocs_conversion_cloud.models.supported_format import SupportedFormat
from groupdocs_conversion_cloud.models.watermark_options import WatermarkOptions
from groupdocs_conversion_cloud.models.cad_load_options import CadLoadOptions
from groupdocs_conversion_cloud.models.csv_load_options import CsvLoadOptions
from groupdocs_conversion_cloud.models.diagram_load_options import DiagramLoadOptions
from groupdocs_conversion_cloud.models.e_book_convert_options import EBookConvertOptions
from groupdocs_conversion_cloud.models.email_load_options import EmailLoadOptions
Expand All @@ -73,6 +72,7 @@
from groupdocs_conversion_cloud.models.xml_load_options import XmlLoadOptions
from groupdocs_conversion_cloud.models.bmp_convert_options import BmpConvertOptions
from groupdocs_conversion_cloud.models.bmp_load_options import BmpLoadOptions
from groupdocs_conversion_cloud.models.csv_load_options import CsvLoadOptions
from groupdocs_conversion_cloud.models.dcm_convert_options import DcmConvertOptions
from groupdocs_conversion_cloud.models.dcm_load_options import DcmLoadOptions
from groupdocs_conversion_cloud.models.dgn_load_options import DgnLoadOptions
Expand Down Expand Up @@ -199,6 +199,3 @@
from groupdocs_conversion_cloud.models.jpm_convert_options import JpmConvertOptions
from groupdocs_conversion_cloud.models.jpx_convert_options import JpxConvertOptions
from groupdocs_conversion_cloud.models.tif_convert_options import TifConvertOptions



4 changes: 2 additions & 2 deletions groupdocs_conversion_cloud/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ def __init__(self, configuration, header_name=None, header_value=None,
self.configuration = configuration
self.pool = None
self.rest_client = rest.RESTClientObject(configuration)
self.default_headers = {'x-groupdocs-client': 'python sdk', 'x-groupdocs-version': '24.1'}
self.default_headers = {'x-groupdocs-client': 'python sdk', 'x-groupdocs-version': '24.2'}
if header_name is not None:
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'python sdk 24.1'
self.user_agent = 'python sdk 24.2'

def __del__(self):
if self.pool is not None:
Expand Down
4 changes: 2 additions & 2 deletions groupdocs_conversion_cloud/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,6 @@ def to_debug_report(self):
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 24.1\n"\
"SDK Package Version: 24.1".\
"Version of the API: 24.2\n"\
"SDK Package Version: 24.2".\
format(env=sys.platform, pyversion=sys.version)
90 changes: 84 additions & 6 deletions groupdocs_conversion_cloud/models/pdf_convert_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class PdfConvertOptions(ConvertOptions):
swagger_types = {
'width': 'int',
'height': 'int',
'dpi': 'float',
'dpi': 'int',
'password': 'str',
'margin_top': 'int',
'margin_bottom': 'int',
Expand All @@ -74,7 +74,9 @@ class PdfConvertOptions(ConvertOptions):
'non_full_screen_page_mode': 'str',
'page_layout': 'str',
'page_mode': 'str',
'rotate': 'str'
'rotate': 'str',
'page_size': 'str',
'page_orientation': 'str'
}

attribute_map = {
Expand Down Expand Up @@ -107,10 +109,12 @@ class PdfConvertOptions(ConvertOptions):
'non_full_screen_page_mode': 'NonFullScreenPageMode',
'page_layout': 'PageLayout',
'page_mode': 'PageMode',
'rotate': 'Rotate'
'rotate': 'Rotate',
'page_size': 'PageSize',
'page_orientation': 'PageOrientation'
}

def __init__(self, width=None, height=None, dpi=None, password=None, margin_top=None, margin_bottom=None, margin_left=None, margin_right=None, pdf_format=None, remove_pdfa_compliance=None, zoom=None, linearize=None, link_duplicate_streams=None, remove_unused_objects=None, remove_unused_streams=None, compress_images=None, image_quality=None, unembed_fonts=None, grayscale=None, center_window=None, direction=None, display_doc_title=None, fit_window=None, hide_menu_bar=None, hide_tool_bar=None, hide_window_ui=None, non_full_screen_page_mode=None, page_layout=None, page_mode=None, rotate=None, **kwargs): # noqa: E501
def __init__(self, width=None, height=None, dpi=None, password=None, margin_top=None, margin_bottom=None, margin_left=None, margin_right=None, pdf_format=None, remove_pdfa_compliance=None, zoom=None, linearize=None, link_duplicate_streams=None, remove_unused_objects=None, remove_unused_streams=None, compress_images=None, image_quality=None, unembed_fonts=None, grayscale=None, center_window=None, direction=None, display_doc_title=None, fit_window=None, hide_menu_bar=None, hide_tool_bar=None, hide_window_ui=None, non_full_screen_page_mode=None, page_layout=None, page_mode=None, rotate=None, page_size=None, page_orientation=None, **kwargs): # noqa: E501
"""Initializes new instance of PdfConvertOptions""" # noqa: E501

self._width = None
Expand Down Expand Up @@ -143,6 +147,8 @@ def __init__(self, width=None, height=None, dpi=None, password=None, margin_top=
self._page_layout = None
self._page_mode = None
self._rotate = None
self._page_size = None
self._page_orientation = None

if width is not None:
self.width = width
Expand Down Expand Up @@ -204,6 +210,10 @@ def __init__(self, width=None, height=None, dpi=None, password=None, margin_top=
self.page_mode = page_mode
if rotate is not None:
self.rotate = rotate
if page_size is not None:
self.page_size = page_size
if page_orientation is not None:
self.page_orientation = page_orientation

base = super(PdfConvertOptions, self)
base.__init__(**kwargs)
Expand Down Expand Up @@ -271,7 +281,7 @@ def dpi(self):
Desired page DPI after conversion. The default resolution is: 96dpi # noqa: E501
:return: The dpi. # noqa: E501
:rtype: float
:rtype: int
"""
return self._dpi

Expand All @@ -283,7 +293,7 @@ def dpi(self, dpi):
Desired page DPI after conversion. The default resolution is: 96dpi # noqa: E501
:param dpi: The dpi. # noqa: E501
:type: float
:type: int
"""
if dpi is None:
raise ValueError("Invalid value for `dpi`, must not be `None`") # noqa: E501
Expand Down Expand Up @@ -1036,6 +1046,74 @@ def rotate(self, rotate):
self._rotate = rotate
else:
self._rotate = allowed_values[int(rotate) if six.PY3 else long(rotate)]

@property
def page_size(self):
"""
Gets the page_size. # noqa: E501
Specifies page size # noqa: E501
:return: The page_size. # noqa: E501
:rtype: str
"""
return self._page_size

@page_size.setter
def page_size(self, page_size):
"""
Sets the page_size.
Specifies page size # noqa: E501
:param page_size: The page_size. # noqa: E501
:type: str
"""
if page_size is None:
raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501
allowed_values = ["Default", "A3", "Statement", "Quarto", "Paper11x17", "Paper10x14", "Letter", "Legal", "Ledger", "Folio", "Executive", "EnvelopeDL", "Custom", "B5", "B4", "A5", "A4", "Tabloid"] # noqa: E501
if not page_size.isdigit():
if page_size not in allowed_values:
raise ValueError(
"Invalid value for `page_size` ({0}), must be one of {1}" # noqa: E501
.format(page_size, allowed_values))
self._page_size = page_size
else:
self._page_size = allowed_values[int(page_size) if six.PY3 else long(page_size)]

@property
def page_orientation(self):
"""
Gets the page_orientation. # noqa: E501
Specifies page orientation # noqa: E501
:return: The page_orientation. # noqa: E501
:rtype: str
"""
return self._page_orientation

@page_orientation.setter
def page_orientation(self, page_orientation):
"""
Sets the page_orientation.
Specifies page orientation # noqa: E501
:param page_orientation: The page_orientation. # noqa: E501
:type: str
"""
if page_orientation is None:
raise ValueError("Invalid value for `page_orientation`, must not be `None`") # noqa: E501
allowed_values = ["Default", "Landscape", "Portrait"] # noqa: E501
if not page_orientation.isdigit():
if page_orientation not in allowed_values:
raise ValueError(
"Invalid value for `page_orientation` ({0}), must be one of {1}" # noqa: E501
.format(page_orientation, allowed_values))
self._page_orientation = page_orientation
else:
self._page_orientation = allowed_values[int(page_orientation) if six.PY3 else long(page_orientation)]

def to_dict(self):
"""Returns the model properties as a dict"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class WordProcessingConvertOptions(ConvertOptions):
swagger_types = {
'width': 'int',
'height': 'int',
'dpi': 'float',
'dpi': 'int',
'password': 'str',
'zoom': 'int',
'pdf_recognition_mode': 'str',
Expand Down Expand Up @@ -161,7 +161,7 @@ def dpi(self):
Desired page DPI after conversion. The default resolution is: 96dpi # noqa: E501
:return: The dpi. # noqa: E501
:rtype: float
:rtype: int
"""
return self._dpi

Expand All @@ -173,7 +173,7 @@ def dpi(self, dpi):
Desired page DPI after conversion. The default resolution is: 96dpi # noqa: E501
:param dpi: The dpi. # noqa: E501
:type: float
:type: int
"""
if dpi is None:
raise ValueError("Invalid value for `dpi`, must not be `None`") # noqa: E501
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from setuptools import setup, find_packages # noqa: H301

NAME = "groupdocs-conversion-cloud"
VERSION = "24.1"
VERSION = "24.2"

# Append current time to the version when publishing to test environment
if "--test" in sys.argv:
Expand Down

0 comments on commit 60bf207

Please sign in to comment.