GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - dantio/carbone-docker: Embedded Carbone in a Docker with simple image support

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

95 Commits
95 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.vscode
.vscode
 
 
demo
demo
 
 
templates
templates
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
docker-compose.yml
docker-compose.yml
 
 
images.js
images.js
 
 
index.js
index.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

Carbone Docker

Embedded Carbone in a Docker image with simple REST API.

How to consume exposed API ?

The simpliest way to use this image is to use node and install carbone-connect package.

Images

Images should be base64 encoded and send into the render request.

  • content: base64 encoded image.
  • path: path of the image to replace onto the zip archive.

In this way, image loop are not supported.

Render parameters example:

const request = {
    "data": {},
    "options": {},
    "images": [
        {
            // "path": "Pictures/100000000000012C000000C8301A8B8F6814976E.png", specify the path, otherwise it will look inside "media" or "word/media" folder
            "content": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABA0lEQVR4AWMAAcNkBnnjNJYtRqnMH41SmD8YpzJvNk1kkAXJMerFMoixc3FcD/aI5FeQU2R+++0Zw6Grm/5//f+GgfE/QzsDUPXqxpURf6YdzfifulHqf8xKof81W9z+f/358X/gLJ4fjA51rN9F5Dk5QMpZORkY2P8KMvQFnmLYeWM2w5ydTT8ZfKZw/v0PBBP2J/0PmsP9/+LTff8vPd3/338q93+g6e+YPj37fXLK7pz/2XYzGKaGXmaQFdBi6NuVzPD+ye/fDP8ZdjCAHGmWzfquZ30W2KTypV7/rYtZfxklMb8xi2MQBnsT5CWjZOaNQPweiN8ZJzOv149jkAbJAQDOgW4m18mcLgAAAABJRU5ErkJggg==",
            // "resize": false, disable image resize
            "resize": { // sharp options see https://sharp.pixelplumbing.com/api-resize
              "fill": "cover"
            }
        }
    ]
}

From carbone.io website

Fast, Simple and Powerful report generator in any format PDF, DOCX, XLSX, ODT, PPTX, ODS [, ...]

... using your JSON data as input.

See carbone.io website for full Carbone documentation.

Docker setup

Build docker image

docker-compose build

Set doc templates in templates directory.

Run docker

docker-compose up
# open http://localhost:8080/

About

Embedded Carbone in a Docker with simple image support

hub.docker.com/r/dantio/carbone-docker

Topics

carbonepdf-generation

Resources

Readme
Activity

Stars

3 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.