GroupDocs.Viewer Cloud 18.7 Release Notes

Major Features

There 13 features and fixes in this release. The most notable are:

  • Added next file formats support:
    • DGN (V7)?(MicroStation design file)
    • DWF?(AutoCAD Design Web Format)
  • Extended support of DefaultFontName setting on
  • Rendering PDF documents into PDF and HTML
  • Rendering?MS Project documents into PDF
  • Rendering?ODG, SVG and MetaFile Images
  • Added feature to set page size when rendering Email messages as PDF and image
  • Added feature which allows changing labels when rendering Email messages

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
VIEWERCLOUD-175Add ISFF-based DGN (V7) file format supportNew Feature
VIEWERCLOUD-171Extend support for DefaultFontName setting to PDF documents when rendering into PDFNew Feature
VIEWERCLOUD-170Render CAD documents by specifying coordinatesNew Feature
VIEWERCLOUD-169Add DWF file format supportNew Feature
VIEWERCLOUD-167Extend support for DefaultFontName option for MS Project documents when rendering into PDFNew Feature
VIEWERCLOUD-165Add support for rendering password protected ODT and OTT formatsNew Feature
VIEWERCLOUD-164Changing language for header of emailsNew Feature
VIEWERCLOUD-163Setting page size when rendering Email documents as PDF and imageNew Feature
VIEWERCLOUD-177Improve compression for rendering into HTML with EnableMinification settingImprovement
VIEWERCLOUD-176Extend DefaultFontName setting support for ODG, SVG and MetaFile ImagesImprovement
VIEWERCLOUD-173Extend support for DefaultFontName option for CAD documentsImprovement
VIEWERCLOUD-172Eliminate the gap between list of tasks and footer when rendering MS Project documentsImprovement
VIEWERCLOUD-145Extend support for DefaultFontName setting to PDF documents when rendering into HTMLImprovement

Public API and Backward Incompatible Changes

Changing language for header of emails

When rendering email messages by default Viewer uses English languge to render field labels such as (From, To, Subject etc.). To change field labels you can set FieldLabels?on EmailOptions options-objects class.

?### Retrieve access token
curl --request POST \
  --url https://api.groupdocs.cloud/oauth2/token \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data 'grant_type=client_credentials&client_id=clientId&client_secret=clientSecret'

### Set field labels when rendering pages
curl --request POST \
  --url https://api.groupdocs.cloud/v1/viewer/sample.msg/html/pages \
  --header 'authorization: [Access Token]' \
  --header 'content-type: application/json' \
  --data '{"emailOptions": {"fieldLabels": [{"Field":"From", "Label":"Sender"}, {"Field":"To", "Label":"Receiver"}]}}'

### Retrieve created page
curl --request GET \
  --url https://api.groupdocs.cloud/v1/viewer/sample.msg/html/pages/1 \
  --header 'authorization: [Access Token]'

Viewer supports following field labels:

FieldLabel
AnniversaryAnniversary
BccBcc
BirthdayBirthday
BusinessBusiness
Business AddressBusiness Address
Business FaxBusiness Fax
BusinessHomepageBusinessHomepage
CompanyCompany
DepartmentDepartment
EmailEmail
Email Display AsEmail Display As
Email2Email2
Email2 Display AsEmail2 Display As
Email3Email3
Email3 Display AsEmail3 Display As
EndEnd
First NameFirst Name
FromFrom
Full NameFull Name
GenderGender
HobbiesHobbies
Home AddressHome Address
ImportanceImportance
Job TitleJob Title
Last NameLast Name
LocationLocation
Middle NameMiddle Name
MobileMobile
OrganizerOrganizer
Other AddressOther Address
PersonalHomepagePersonalHomepage
ProfessionProfession
RecurrenceRecurrence
Recurrence PatternRecurrence Pattern
Required AttendeesRequired Attendees
SentSent
Show Time AsShow Time As
Spouse/PartnerSpouse/Partner
StartStart
SubjectSubject
ToTo
User Field 1User Field 1
User Field 2User Field 2
User Field 3User Field 3
User Field 4User Field 4

Rendering by coordinates or Tiled rendering

Introduction

Tiled rendering or (rendering by coordinates) is the process of rendering CAD documents (into an image, HTML or PDF)?by dividing into square parts?and rendering each part (or tile), separately. Since the version 18.7 tiled rendering is available for rendering into an image and HTML for DWG file format. Generally DWG documents are divided into pages by Model and Layouts, but when the tiled rendering is enabled, only the Model is rendered, and every tile composes a separate page.

How to render by coordinates

Before you start rendering by coordinates, it is recommended to obtain the overall width and height of the document with help of document info methods as shown in example below. After you know the width and height,?determine the starting point X and Y coordinates and the width with the height of the?tile?(region you want to render). Then add tiles to?CadOptions.Tiles as shown in example below. Coordinates start from bottom left corner of the drawing and have only positive values as shown in sample picture below.

,,Overall width of the document is 650px height and 750px width. The selected tile starts at coordinate X: 250 and Y: 100 and has a width 150px, height: 200px,,

You can add as many tiles as you need, the following example demonstrates how to?render?DWG drawing?into an image?by dividing into four equal parts.

### Retrieve access token
curl --request POST \
  --url https://api.groupdocs.cloud/oauth2/token \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data 'grant_type=client_credentials&client_id=clientId&client_secret=clientSecret'

### Retrive document width and height
curl --request POST \
  --url https://api.groupdocs.cloud/v1/viewer/three-layouts.dwg/html/info \
  --header 'authorization: [Access Token]'

### Render document by coordinates into 4 pages (tiles)
curl --request POST \
  --url https://api.groupdocs.cloud/v1/viewer/three-layouts.dwg/html/pages \
  --header 'authorization: [Access Token]' \
  --header 'content-type: application/json' \
  --data '{"cadOptions": {"tiles": [{"width":1300, "height":800, "startPointX":0, "startPointY":0 },{"width":1300, "height":800, "startPointX":1300, "startPointY":0 },{"width":1300, "height":800, "startPointX":0, "startPointY":800 },{"width":1300, "height":800, "startPointX":1300, "startPointY":800 }]}}'

### Retrieve first page (tile)
curl --request GET \
  --url https://api.groupdocs.cloud/v1/viewer/three-layouts.dwg/html/pages/1 \
  --header 'authorization: [Access Token]'

Setting default font when rendering PDF documents into HTML

Since the version 18.7, it is possible to set default font when rendering PDF document into HTML. This setting may be useful when you would like to specify which font should be used in case PDF document missing some font(s).

### Retrieve access token
curl --request POST \
  --url http://api.groupdocs.cloud/oauth2/token \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data 'grant_type=client_credentials&client_id=[Your ClientId]&client_secret=[Your ClientSecret]'

### Set default font name when rendering PDF document as HTML
curl --request POST \
  --url http://api.groupdocs.cloud/v1/viewer/missing-font.pdf/html/pages \
  --header 'authorization: [Access Token]' \
  --header 'content-type: application/json' \
  --data '{"defaultFontName": "Arial"}'

### Retrieve created page
curl --request GET \
  --url http://api.groupdocs.cloud/v1/viewer/missing-font.pdf/html/pages/1 \
  --header 'authorization: [Access Token]'

Setting page size when rendering Email documents as PDF and image

Since the version 18.7, it is possible to set output page size for rendering Email documents into PDF and images. To enable this feature, please set the?PageSize property of the?EmailOptions class as shown in example below. Please note, that for rendering into HTML the whole email message is rendered into one responsive HTML page and this new option will not influence the rendering.


### Retrieve access token
curl --request POST \
  --url http://api.groupdocs.cloud/oauth2/token \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data 'grant_type=client_credentials&client_id=[Your ClientId]&client_secret=[Your ClientSecret]'

### Set page size when rendering pages
curl --request POST \
  --url http://api.groupdocs.cloud/v1/viewer/message.msg/image/pages \
  --header 'authorization: [Access Token]' \
  --header 'content-type: application/json' \
  --data '{"emailOptions": {"pageSize": "A0"}}'

### Retrieve created page
curl --request GET \
  --url http://api.groupdocs.cloud/v1/viewer/message.msg/image/pages/1 \
  --header 'authorization: [Access Token]'
### Retrieve access token
curl --request POST \
  --url http://api.groupdocs.cloud/oauth2/token \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data 'grant_type=client_credentials&client_id=[Your ClientId]&client_secret=[Your ClientSecret]'

### Set page size when rendering into PDF
curl --request POST \
  --url http://api.groupdocs.cloud/v1/viewer/message.msg/image/pdf \
  --header 'authorization: [Access Token]' \
  --header 'content-type: application/json' \
  --data '{"emailOptions": {"pageSize": "A0"}}'

### Retrieve created PDF document
curl --request GET \
  --url http://api.groupdocs.cloud/v1/viewer/message.msg/image/pdf \
  --header 'authorization: [Access Token]'