Last active
January 15, 2019 07:38
-
-
Save groupdocscloud/2c9c4af250204823444eb40f8c412ed0 to your computer and use it in GitHub Desktop.
This Gist contains Ruby examples of GroupDocs.Viewer Cloud
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Viewer-Ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$options = GroupDocsViewerCloud::HtmlOptions.new(); | |
$file = "with-attachment.msg"; | |
$password = nil; | |
$attachmentPassword = nil; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options.attachment_password = $attachmentPassword; | |
$request = GroupDocsViewerCloud::HtmlCreateAttachmentPagesCacheRequest.new($file, $attachmentName, $options); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_create_attachment_pages_cache($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$options = GroupDocsViewerCloud::HtmlOptions.new(); | |
$file = "with-attachment.msg"; | |
$password = nil; | |
$attachmentPassword = nil; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options.attachment_password = $attachmentPassword; | |
$request = GroupDocsViewerCloud::ImageCreateAttachmentPagesCacheRequest.new($file, $attachmentName, $options); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_create_attachment_pages_cache($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$cadOptions = GroupDocsViewerCloud::CadOptions.new(); | |
$htmlOptions.embed_resources = true; | |
$emailOptions = GroupDocsViewerCloud::EmailOptions.new(); | |
$arrayFieldLabel = Array(GroupDocsViewerCloud::FieldLabel.new()); | |
$fieldLabel = GroupDocsViewerCloud::FieldLabel.new(); | |
$fieldLabel.field = "From"; | |
$fieldLabel.label = "Sender"; | |
$arrayFieldLabel.push($fieldLabel); | |
$fieldLabel.field = "To"; | |
$fieldLabellabel = "Receiver"; | |
$arrayFieldLabel.push($fieldLabel); | |
$emailOptions.field_labels = $arrayFieldLabel; | |
$htmlOptions.email_options = $emailOptions; | |
$request = GroupDocsViewerCloud::HtmlCreatePagesCacheRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.html_options = $htmlOptions; | |
$response = api.html_create_pages_cache($request); | |
puts($response); | |
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$fileName = "sample.DXF"; | |
$cadOptions = new \GroupDocs\Viewer\Model\CadOptions(); | |
$cadOptions->layers = array("SLD-0", "DEFAULT_3"); | |
$htmlOptions = new \GroupDocs\Viewer\Model\HtmlOptions(); | |
$htmlOptions->setEmbedResources(true); | |
$htmlOptions->cadOptions = $cadOptions; | |
$request = new Requests\HtmlCreatePagesCacheRequest($fileName); | |
$request->htmlOptions = $htmlOptions; | |
$response = $viewerApi->htmlCreatePagesCache($request); | |
echo "CAD - Pages Count: ", count($response->getPages()); | |
echo "CAD - FileName: ", $response->getFileName(); | |
} | |
catch (Exception $e) | |
{ | |
echo "Something went wrong: ", $e->getMessage(), "\n"; | |
PHP_EOL; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample2.DXF"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options = GroupDocsViewerCloud::ImageOptions.new(); | |
$cadOptions = GroupDocsViewerCloud::CadOptions.new(); | |
$cadOptions.layers = ["SLD_0", "DEFAULT_3"]; | |
$options.format = "jpg"; | |
$options.quality = 100; | |
$options.cad_options = $cadOptions; | |
$request = GroupDocsViewerCloud::ImageCreatePagesCacheRequest.new($file, $options); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_create_pages_cache($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options = GroupDocsViewerCloud::HtmlOptions.new(); | |
$options.embed_resources = true; | |
$request = GroupDocsViewerCloud::HtmlCreatePagesCacheRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.html_options = $options; | |
$response = api.html_create_pages_cache($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$format = "jpg"; | |
$options = GroupDocsViewerCloud::ImageOptions.new(); | |
$options.format = $format; | |
$request = GroupDocsViewerCloud::ImageCreatePagesCacheRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.image_options = $options; | |
$response = api.image_create_pages_cache($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$url = "https://www.dropbox.com/s/umokluz338w4ng7%2fone-page.docx"; | |
$fileName="one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options = GroupDocsViewerCloud::ImageOptions.new(); | |
$wordsOptions = GroupDocsViewerCloud::WordsOptions.new(); | |
$options.words_options = $wordsOptions; | |
$request = GroupDocsViewerCloud::HtmlCreatePagesCacheFromUrlRequest.new($url, $options); | |
$request.folder = $folder; | |
$request.file_name =$fileName; | |
$request.storage = $storage; | |
$response = api.html_create_pages_cache_from_url($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$url = "https://www.dropbox.com/s/umokluz338w4ng7%2fone-page.docx"; | |
$fileName="one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options = GroupDocsViewerCloud::ImageOptions.new(); | |
$wordsOptions = GroupDocsViewerCloud::WordsOptions.new(); | |
$options.format = "jpg"; | |
$options.words_options = $wordsOptions; | |
$request = GroupDocsViewerCloud::ImageCreatePagesCacheFromUrlRequest.new($url, $options); | |
$request.folder = $folder; | |
$request.file_name =$fileName; | |
$request.storage = $storage; | |
$response = api.image_create_pages_cache_from_url($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options = GroupDocsViewerCloud::HtmlOptions.new(); | |
$options.embed_resources = true; | |
$options.enable_minification = true; | |
$request = GroupDocsViewerCloud::HtmlCreatePagesCacheRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.html_options = $options; | |
$response = api.html_create_pages_cache($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$filePath = "D://sample-one-page.docx"; | |
$fileName = "one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options = GroupDocsViewerCloud::HtmlOptions.new(); | |
$options.embed_resources = true; | |
$options.enable_minification = true; | |
$file_content = File.open($filePath, "r"); | |
$options_json = $options.to_hash.to_json; | |
$request = GroupDocsViewerCloud::HtmlCreatePagesCacheFromContentRequest.new($file_content, $options_json); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.file_name = $fileName; | |
$response = api.html_create_pages_cache_from_content($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$filePath = "D://sample-one-page.docx"; | |
$fileName = "one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options = GroupDocsViewerCloud::ImageOptions.new(); | |
$options.format = "jpg"; | |
$file_content = File.open($filePath, "r"); | |
$options_json = $options.to_hash.to_json; | |
$request = GroupDocsViewerCloud::ImageCreatePagesCacheFromContentRequest.new($file_content, $options_json); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.file_name = $fileName; | |
$response = api.image_create_pages_cache_from_content($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$url = "https://www.dropbox.com/s/umokluz338w4ng7%2fone-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$pdfFileOptions = GroupDocsViewerCloud::PdfFileOptions.new(); | |
$pdfFileOptions.words_options = GroupDocsViewerCloud::WordsOptions.new(); | |
$request = GroupDocsViewerCloud::HtmlCreatePdfFileFromUrlRequest.new($url, $pdfFileOptions); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_create_pdf_file_from_url($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$url = "https://www.dropbox.com/s/umokluz338w4ng7%2fone-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$pdfFileOptions = GroupDocsViewerCloud::PdfFileOptions.new(); | |
$pdfFileOptions.words_options = GroupDocsViewerCloud::WordsOptions.new(); | |
$request = GroupDocsViewerCloud::ImageCreatePdfFileFromUrlRequest.new($url, $pdfFileOptions); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_create_pdf_file_from_url($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$filePath = "D://sample-one-page.docx"; | |
$fileName = "one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options = GroupDocsViewerCloud::PdfFileOptions.new(); | |
$file_content = File.open($filePath, "r"); | |
$options_json = $options.to_hash.to_json; | |
$request = GroupDocsViewerCloud::HtmlCreatePdfFileFromContentRequest.new($file_content, $options_json); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.file_name = $fileName; | |
$response = api.html_create_pdf_file_from_content($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$filePath = "D://sample-one-page.docx"; | |
$fileName = "one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options = GroupDocsViewerCloud::PdfFileOptions.new(); | |
$file_content = File.open($filePath, "r"); | |
$options_json = $options.to_hash.to_json; | |
$request = GroupDocsViewerCloud::ImageCreatePdfFileFromContentRequest.new($file_content, $options_json); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.file_name = $fileName; | |
$response = api.image_create_pdf_file_from_content($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$projectOptions = GroupDocsViewerCloud::ProjectOptions.new(); | |
$projectOptions.page_size = "A4"; | |
$projectOptions.time_unit = "Unknown"; | |
$options = GroupDocsViewerCloud::ImageOptions.new(); | |
$file = "sample2.mpp"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options.project_options = $projectOptions; | |
$request = GroupDocsViewerCloud::HtmlCreatePagesCacheRequest.new($file, $options); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_create_pages_cache($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$projectOptions = GroupDocsViewerCloud::ProjectOptions.new(); | |
$projectOptions.page_size = "A4"; | |
$projectOptions.time_unit = "Unknown"; | |
$options = GroupDocsViewerCloud::ImageOptions.new(); | |
$file = "sample2.mpp"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options.format = "jpg"; | |
$options.quality = 100; | |
$options.project_options = $projectOptions; | |
$request = GroupDocsViewerCloud::ImageCreatePagesCacheRequest.new($file, $options); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_create_pages_cache($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlDeleteAttachmentPagesCacheRequest.new($file, $attachmentName); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
api.html_delete_attachment_pages_cache($request); | |
puts("Cache removed"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::ImageDeleteAttachmentPagesCacheRequest.new($file, $attachmentName); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
api.image_delete_attachment_pages_cache($request); | |
puts("Cache removed"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$response = api.delete_fonts_cache(); | |
puts("Fonts cache removed"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$pageNumber = 1; | |
$request = GroupDocsViewerCloud::HtmlGetPageRequest.new($file, $pageNumber); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_get_page($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$pageNumber = 1; | |
$request = GroupDocsViewerCloud::ImageGetPageRequest.new($file, $pageNumber); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_get_page($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$options = GroupDocsViewerCloud::HtmlOptions.new(); | |
$file = "sample.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options.embed_resources = true; | |
$options.exclude_fonts = true; | |
$request = GroupDocsViewerCloud::HtmlGetPagesRequest.new($file, $options); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_get_pages($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
# Retrieve supported file-formats | |
response = api.get_supported_file_formats | |
# Print out supported file-formats | |
puts("Supported file-formats:") | |
response.formats.each do |format| | |
puts("#{format.file_format} (#{format.extension})") | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
# Retrieve supported file-formats | |
response = api.get_supported_file_formats | |
# Print out supported file-formats | |
puts("Supported file-formats:") | |
response.formats.each do |format| | |
puts("#{format.file_format} (#{format.extension})") | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlGetAttachmentRequest.new($file, $attachmentName); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_get_attachment($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::ImageGetAttachmentRequest.new($file, $attachmentName); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_get_attachment($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$password = nil; | |
$attachmentPassword = nil; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlGetAttachmentInfoRequest.new($file, $attachmentName, $password, $attachmentPassword); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_get_attachment_info($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$password = nil; | |
$attachmentPassword = nil; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::ImageGetAttachmentInfoRequest.new($file, $attachmentName, $password, $attachmentPassword); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_get_attachment_info($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$options = GroupDocsViewerCloud::DocumentInfoOptions.new(); | |
$file = "with-attachment.msg"; | |
$password = nil; | |
$attachmentPassword = nil; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options.attachment_password = $attachmentPassword; | |
$request = GroupDocsViewerCloud::HtmlGetAttachmentInfoWithOptionsRequest.new($file, $attachmentName, $options); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_get_attachment_info_with_options($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$options = GroupDocsViewerCloud::DocumentInfoOptions.new(); | |
$file = "with-attachment.msg"; | |
$password = nil; | |
$attachmentPassword = nil; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options.attachment_password = $attachmentPassword; | |
$request = GroupDocsViewerCloud::ImageGetAttachmentInfoWithOptionsRequest.new($file, $attachmentName, $options); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_get_attachment_info_with_options($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$attachmentPassword = nil; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$pageNumber = 1; | |
$request = GroupDocsViewerCloud::HtmlGetAttachmentPageRequest.new($file, $attachmentName, $pageNumber); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.attachment_password = $attachmentPassword; | |
$response = api.html_get_attachment_page($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$attachmentPassword = nil; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$pageNumber = 1; | |
$request = GroupDocsViewerCloud::ImageGetAttachmentPageRequest.new($file, $attachmentName, $pageNumber); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.attachment_password = $attachmentPassword; | |
$response = api.image_get_attachment_page($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$startPageNumber = 1; | |
$request = GroupDocsViewerCloud::HtmlGetAttachmentPageResourceRequest.new($file, $attachmentName, $startPageNumber, $folder); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_get_attachment_page_resource($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$attachmentPassword = nil; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlGetAttachmentPagesRequest.new($file, $attachmentName); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.attachment_password = $attachmentPassword; | |
$response = api.html_get_attachment_pages($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$attachmentPassword = nil; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::ImageGetAttachmentPagesRequest.new($file, $attachmentName); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.attachment_password = $attachmentPassword; | |
$response = api.image_get_attachment_pages($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$password = nil; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlGetZipWithAttachmentPagesRequest.new($file, $attachmentName); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.attachment_password = $attachmentPassword; | |
$request.resource_path = "./r/{resource-name}"; | |
$response = api.html_get_zip_with_attachment_pages($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$password = nil; | |
$attachmentName = "password-protected.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::ImageGetZipWithAttachmentPagesRequest.new($file, $attachmentName); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.attachment_password = $attachmentPassword; | |
$response = api.image_get_zip_with_attachment_pages($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlGetAttachmentsRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_get_attachments($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::ImageGetAttachmentsRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_get_attachments($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample.DXF"; | |
$folder = nil; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlGetDocumentInfoRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_get_document_info($request); | |
puts($response.layers); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample.DXF"; | |
$folder = nil; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::ImageGetDocumentInfoRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_get_document_info($request); | |
puts($response.layers); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlGetDocumentInfoRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_get_document_info($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::ImageGetDocumentInfoRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_get_document_info($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$url = "https://www.dropbox.com/s/j260ve4f90h1p41/one-page.docx?dl=1"; | |
$folder = "one-page-url-docx"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlGetDocumentInfoFromUrlRequest.new($url); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_get_document_info_from_url($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$url = "https://www.dropbox.com/s/j260ve4f90h1p41/one-page.docx?dl=1"; | |
$folder = "one-page-url-docx"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::ImageGetDocumentInfoFromUrlRequest.new($url); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_get_document_info_from_url($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options = GroupDocsViewerCloud::DocumentInfoOptions.new(); | |
$options.password = nil; | |
$request = GroupDocsViewerCloud::HtmlGetDocumentInfoWithOptionsRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.document_info_options = $options; | |
$response = api.html_get_document_info_with_options($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$url = "https://www.dropbox.com/s/r2eioe2atushqcf/with-notes.pptx?dl=1"; | |
$fileName="with-notes-url.pptx"; | |
$folder = "slides/pptx"; | |
$storage = "MyStorage"; | |
$options = GroupDocsViewerCloud::DocumentInfoOptions.new(); | |
$options.password = nil; | |
$request = GroupDocsViewerCloud::ImageGetDocumentInfoFromUrlWithOptionsRequest.new($url); | |
$request.folder = $folder; | |
$request.file_name =$fileName; | |
$request.storage = $storage; | |
$request.document_info_options = $options; | |
$response = api.image_get_document_info_from_url_with_options($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$url = "https://www.dropbox.com/s/r2eioe2atushqcf/with-notes.pptx?dl=1"; | |
$fileName="with-notes-url.pptx"; | |
$folder = "slides/pptx"; | |
$storage = "MyStorage"; | |
$options = GroupDocsViewerCloud::DocumentInfoOptions.new(); | |
$options.password = nil; | |
$request = GroupDocsViewerCloud::HtmlGetDocumentInfoFromUrlWithOptionsRequest.new($url); | |
$request.folder = $folder; | |
$request.file_name =$fileName; | |
$request.storage = $storage; | |
$request.document_info_options = $options; | |
$response = api.html_get_document_info_from_url_with_options($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$url = "https://www.dropbox.com/s/r2eioe2atushqcf/with-notes.pptx?dl=1"; | |
$fileName="with-notes-url.pptx"; | |
$folder = "slides/pptx"; | |
$storage = "MyStorage"; | |
$options = GroupDocsViewerCloud::DocumentInfoOptions.new(); | |
$slidesOptions = GroupDocsViewerCloud::SlidesOptions.new(); | |
$slidesOptions.render_notes = true; | |
$options.slides_options = $slidesOptions; | |
$options.password = nil; | |
$request = GroupDocsViewerCloud::ImageGetDocumentInfoFromUrlWithOptionsRequest.new($url); | |
$request.folder = $folder; | |
$request.file_name =$fileName; | |
$request.storage = $storage; | |
$request.document_info_options = $options; | |
$response = api.image_get_document_info_from_url_with_options($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$filePath = "D://sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options = GroupDocsViewerCloud::DocumentInfoOptions.new(); | |
$options.password = nil; | |
$file_content = File.open($filePath, "r"); | |
$options_json = $options.to_hash.to_json; | |
$request = GroupDocsViewerCloud::HtmlGetDocumentInfoFromContentRequest.new($file_content, $options_json); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_get_document_info_from_content($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$filePath = "D://sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options = GroupDocsViewerCloud::DocumentInfoOptions.new(); | |
$options.password = nil; | |
$file_content = File.open($filePath, "r"); | |
$options_json = $options.to_hash.to_json; | |
$request = GroupDocsViewerCloud::ImageGetDocumentInfoFromContentRequest.new($file_content, $options_json); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_get_document_info_from_content($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$response = api.get_fonts(); | |
puts($response.families); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$pageNumber = 1; | |
$resourceName = "fonts"; | |
$request = GroupDocsViewerCloud::HtmlGetPageResourceRequest.new($file, $resourceName, $pageNumber); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_get_page_resource($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlGetPagesRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_get_pages($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::ImageGetPagesRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_get_pages($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$url = "https://www.dropbox.com/s/umokluz338w4ng7%2fone-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlGetPagesFromUrlRequest.new($url); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_get_pages_from_url($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$url = "https://www.dropbox.com/s/umokluz338w4ng7%2fone-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$format = "jpg"; | |
$request = GroupDocsViewerCloud::ImageGetPagesFromUrlRequest.new($url); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.format = $format; | |
$response = api.image_get_pages_from_url($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$url = "https://www.dropbox.com/s/umokluz338w4ng7%2fone-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlGetPdfFileFromUrlRequest.new($url); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_get_pdf_file_from_url($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$url = "https://www.dropbox.com/s/umokluz338w4ng7%2fone-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::ImageGetPdfFileFromUrlRequest.new($url); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_get_pdf_file_from_url($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlGetPdfFileRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_get_pdf_file($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::ImageGetPdfFileRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_get_pdf_file($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$pageNumber = 1; | |
$request = GroupDocsViewerCloud::HtmlGetPageRequest.new($file, $pageNumber); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.embed_resources = true; | |
$request.enable_responsive_rendering = true; | |
$response = api.html_get_page($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$pdfFileOptions = GroupDocsViewerCloud::PdfFileOptions.new(); | |
$watermark = GroupDocsViewerCloud::Watermark.new(); | |
$watermark.text = "GroupDocs"; | |
$pdfFileOptions.watermark = $watermark; | |
$request = GroupDocsViewerCloud::HtmlCreatePdfFileRequest.new($file, $pdfFileOptions); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_create_pdf_file($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$pdfFileOptions = GroupDocsViewerCloud::PdfFileOptions.new(); | |
$watermark = GroupDocsViewerCloud::Watermark.new(); | |
$watermark.text = "GroupDocs"; | |
$pdfFileOptions.watermark = $watermark; | |
$request = GroupDocsViewerCloud::ImageCreatePdfFileRequest.new($file, $pdfFileOptions); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_create_pdf_file($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$resourcesPath = "./r/{resource-name}"; | |
$request = GroupDocsViewerCloud::HtmlGetZipWithPagesRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.resource_path = $resourcesPath; | |
$response = api.html_get_zip_with_pages($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample-one-page.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::ImageGetZipWithPagesRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_get_zip_with_pages($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlDeletePagesCacheRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
api.html_delete_pages_cache($request); | |
puts("HTML cache deleted"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::ImageDeletePagesCacheRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
api.image_delete_pages_cache($request); | |
puts("Image cache deleted"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "sample2.DXF"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$htmlOptions = GroupDocsViewerCloud::HtmlOptions.new(); | |
$htmlOptions.embed_resources = true; | |
$cadOptions = GroupDocsViewerCloud::CadOptions.new(); | |
$arrayTiles = Array(GroupDocsViewerCloud::Tile.new()); | |
$tile = GroupDocsViewerCloud::Tile.new(); | |
$tile->setHeight(800); | |
$tile->setWidth(1300); | |
$tile->setStartPointX(0); | |
$tile->setStartPointY(0); | |
$arrayTiles.push($tile); | |
$tile->setHeight(800); | |
$tile->setWidth(1300); | |
$tile->setStartPointX(1300); | |
$tile->setStartPointY(0); | |
$arrayTiles.push($tile); | |
$tile->setHeight(800); | |
$tile->setWidth(1300); | |
$tile->setStartPointX(0); | |
$tile->setStartPointY(800); | |
$arrayTiles.push($tile); | |
$tile->setHeight(800); | |
$tile->setWidth(1300); | |
$tile->setStartPointX(1300); | |
$tile->setStartPointY(800); | |
$arrayTiles.push($tile); | |
$cadOptions.tiles = $arrayTiles; | |
$htmlOptions.cad_options = $cadOptions; | |
$request = GroupDocsViewerCloud::HtmlCreatePagesCacheRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.html_options = $htmlOptions; | |
$response = api.html_create_pages_cache($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$htmlOptions = GroupDocsViewerCloud::HtmlOptions.new(); | |
$htmlOptions.embed_resources = true; | |
$emailOptions = GroupDocsViewerCloud::EmailOptions.new(); | |
$arrayFieldLabel = Array(GroupDocsViewerCloud::FieldLabel.new()); | |
$fieldLabel = GroupDocsViewerCloud::FieldLabel.new(); | |
$fieldLabel.field = "From"; | |
$fieldLabel.label = "Sender"; | |
$arrayFieldLabel.push($fieldLabel); | |
$fieldLabel.field = "To"; | |
$fieldLabellabel = "Receiver"; | |
$arrayFieldLabel.push($fieldLabel); | |
$emailOptions.field_labels = $arrayFieldLabel; | |
$htmlOptions.email_options = $emailOptions; | |
$request = GroupDocsViewerCloud::HtmlCreatePagesCacheRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.html_options = $htmlOptions; | |
$response = api.html_create_pages_cache($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$file = "with-attachment.msg"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$imageOptions = GroupDocsViewerCloud::ImageOptions.new(); | |
$emailOptions = GroupDocsViewerCloud::EmailOptions.new(); | |
$emailOptions.page_size = "A0"; | |
$imageOptions.email_options = $emailOptions; | |
$request = GroupDocsViewerCloud::ImageCreatePagesCacheRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.image_options = $imageOptions; | |
$response = api.image_create_pages_cache($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$options = GroupDocsViewerCloud::ImageOptions.new(); | |
$emailOptions = GroupDocsViewerCloud::EmailOptions.new(); | |
$file = "with-attachment.msg"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$emailOptions.page_size = "A0"; | |
$options.email_options = $emailOptions; | |
$request = GroupDocsViewerCloud::ImageCreatePdfFileRequest.new($file, $options); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_create_pdf_file($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
file = "data.pst"; | |
folder = "viewerdocs"; | |
outlook_options = OutlookOptions.new | |
outlook_options.max_items_in_folder = 5 | |
html_options = HtmlOptions.new | |
html_options.embed_resources = true | |
html_options.outlook_options = outlook_options | |
request = HtmlCreatePagesCacheRequest.new(file) | |
request.html_options = html_options | |
request.folder = folder | |
response = api.html_create_pages_cache request | |
puts(response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$pdfOptions = GroupDocsViewerCloud::PdfFileOptions.new(); | |
$pdfOptions.default_font_name = "Arial"; | |
$file = "sample2.pdf"; | |
$folder = nil; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlCreatePdfFileRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.pdf_file_options = $pdfOptions; | |
$response = api.html_create_pdf_file($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$cellsOptions = GroupDocsViewerCloud::CellsOptions.new(); | |
$cellsOptions.render_print_area_only = true; | |
$cellsOptions.render_grid_lines = true; | |
$options = GroupDocsViewerCloud::HtmlOptions.new(); | |
$file = "with-overflowed-text.xlsx"; | |
$folder = nil; | |
$storage = "MyStorage"; | |
$options.cells_options = $cellsOptions; | |
$request = GroupDocsViewerCloud::HtmlCreatePagesCacheRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.html_options = $options; | |
$response = api.html_create_pages_cache($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$projectOptions = GroupDocsViewerCloud::ProjectOptions.new(); | |
$project_options.time_unit = "Days" | |
$project_options.start_date = "2008/07/01" | |
$project_options.end_date = "2008/07/31" | |
$options = GroupDocsViewerCloud::ImageOptions.new(); | |
$file = "sample2.mpp"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$options.project_options = $projectOptions; | |
$request = GroupDocsViewerCloud::HtmlCreatePagesCacheRequest.new($file, $options); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_create_pages_cache($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$options = GroupDocsViewerCloud::ReorderOptions.new(); | |
$options.page_number = 1; | |
$options.new_position = 2; | |
$file = "sample.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlTransformPagesRequest.new($file, $options); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_transform_pages($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$options = GroupDocsViewerCloud::ReorderOptions.new(); | |
$options.page_number = 1; | |
$options.new_position = 2; | |
$file = "sample.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::ImageTransformPagesRequest.new($file, $options); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_transform_pages($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$options = GroupDocsViewerCloud::RotateOptions.new(); | |
$options.page_number = 1; | |
$options.angle = 90; | |
$file = "sample.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::HtmlTransformPagesRequest.new($file, $options); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.html_transform_pages($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$options = GroupDocsViewerCloud::RotateOptions.new(); | |
$options.page_number = 1; | |
$options.angle = 90; | |
$file = "sample.docx"; | |
$folder = "viewerdocs"; | |
$storage = "MyStorage"; | |
$request = GroupDocsViewerCloud::ImageTransformPagesRequest.new($file, $options); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$response = api.image_transform_pages($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$pdfOptions = GroupDocsViewerCloud::PdfOptions.new(); | |
$pdfOptions.image_quality = "High"; | |
$options = GroupDocsViewerCloud::HtmlOptions.new(); | |
$file = "sample2.pdf"; | |
$folder = nil; | |
$storage = "MyStorage"; | |
$options.pdf_options = $pdfOptions; | |
$request = GroupDocsViewerCloud::HtmlCreatePagesCacheRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.html_options = $options; | |
$response = api.html_create_pages_cache($request); | |
puts($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the gem | |
require 'groupdocs_viewer_cloud' | |
require '..\lib\groupdocs_viewer_cloud\api\viewer_api' | |
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required). | |
app_sid = "XXX-XXXXXXX-XXXX" | |
app_key = "XXXXXXXXXXXXX" | |
# Create instance of the API class | |
api = GroupDocsViewerCloud.from_keys(app_sid, app_key) | |
$cellsOptions = GroupDocsViewerCloud::CellsOptions.new(); | |
$cellsOptions.text_overflow_mode = "AutoFitColumn"; | |
$options = GroupDocsViewerCloud::HtmlOptions.new(); | |
$file = "with-overflowed-text.xlsx"; | |
$folder = nil; | |
$storage = "MyStorage"; | |
$options.cells_options = $cellsOptions; | |
$request = GroupDocsViewerCloud::HtmlCreatePagesCacheRequest.new($file); | |
$request.folder = $folder; | |
$request.storage = $storage; | |
$request.html_options = $options; | |
$response = api.html_create_pages_cache($request); | |
puts($response); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment