Giter Site home page Giter Site logo

groupdocs-viewer-app / groupdocs.viewer-for-.net-cli Goto Github PK

View Code? Open in Web Editor NEW
4.0 7.0 1.0 1.57 MB

CLI - Command-Line Interface for GroupDocs.Viewer for .NET document viewer and automation API.

Home Page: https://products.groupdocs.com/viewer/net

License: MIT License

C# 98.87% Dockerfile 1.13%
csharp dotnet viewer document-viewer groupdocs cli

groupdocs.viewer-for-.net-cli's Introduction

CLI for GroupDocs.Viewer for .NET

Nuget Nuget

CLI - Command Line Interface for GroupDocs.Viewer for .NET document viewer and automation API.

How to install

GroupDocs.Viewer CLI is a dotnet tool. To start using the CLI you'll need .NET runtime and GroupDocs.Viewer CLI.

  1. Install .NET Core runtime following by the instructions
  2. Install dotnet tool by running dotnet tool install --global groupDocs.viewer-cli
  3. You can run GroupDocs.Viewer.CLI by using command groupdocs-viewer

Example usage

Type view command and source filename to convert the file to HTML and place the output in the current directory:

groupdocs-viewer view source.docx

Set output-format parameter value to PDF to convert document to PDF:

groupdocs-viewer view source.docx --output-format PDF

Set pages parameter valued to 1,3,4 to convert first three pages of the document:

groupdocs-viewer view source.docx --output-format pdf --pages 1,2,3

The --help or view --help option provides more detail about each parameter.
The --version option provides information about CLI version in use.

Commands

  • view converts file to specified output-format. The default value is HTML.

  • get-view-info retrieves view details for a specified file that includes list of pages and source file-type.

Parameters

Parameters for "view" command

  • --file-type: Source document file type e.g. DOCX.

  • --password [short: -pwd]: Password to open password-protected file.

  • --encoding [short: -enc]: Source document encoding e.g UTF-8.

  • --pages [short: -p]: Comma-separated page numbers to convert e.g 1,2,3.

  • --output [short -o]: Output file path when converting to HTML, PNG, and JPG. Or output filename when converting to PDF.

  • --resource-filepath-template: Resource filepath template when converting to HTML with external resources e.g. p_{0}_{1}.

  • --resource-url-format: Resource URL format for HTML with external resources.

  • --height: Output image height.

  • --width: Output image width.

  • --max-height: Max height for output image.

  • --max-width: Max width for output image.

Parameters for "view" and "get-view-info" commands

  • --license-path: Path to license file.

  • --output-format [short: -f]: Output format, supported values are Html, HtmlExt, Png, Jpg, and Pdf.

  • --verbose [short -v]: Enable detailed logging to console.

  • --save-attachments: Save attachments on disk if selected file support it.

  • --attachments-list: Get attachments list for selected file if it supported.

Setting the license

Without a license the tool will work in trial mode so you can convert only first two pages of a document see Evaluation Limitations and Licensing of GroupDocs.Viewer for more details. A temporary license can be requested at Get a Temporary License.

The license can be set with --license-path parameter:

groupdocs-viewer view source.docx --license-path c:\\licenses\\GroupDocs.Viewer.lic

Also, you can set path to the license file in GROUPDOCS_VIEWER_LICENSE_PATH environment variable.

Linux dependencies

For correct deploy please install the following package dependencies:

  • apt-transport-https
  • dirmngr
  • gnupg
  • libc6-dev
  • libgdiplus
  • libx11-dev
  • ttf-mscorefonts-installer

As an example the following commands should be executed to install the dependencies on Ubuntu 18.04.5 LTS (Bionic Beaver):

  • apt-get update
  • apt-get install -y apt-transport-https
  • apt-get install -y dirmngr
  • apt-get install -y gnupg
  • apt-get install -y ca-certificates
  • apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $ 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
  • echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic $ main" >> /etc/apt/sources.list.d/mono-official-stable.list
  • apt-get update
  • apt-get install -y --allow-unauthenticated libc6-dev libgdiplus libx11-dev
  • apt-get install -y ttf-mscorefonts-installer

groupdocs.viewer-for-.net-cli's People

Contributors

denis-gvardionov avatar dmitry-korolev-groupdocs avatar dmitry-t-aspos avatar kernell avatar mikhail-evgrafov avatar vladimir-litvinchik avatar vyacheslav-prokopenko avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

powerlight2017

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.