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
#!/bin/bash | |
# Adds a cover page to one or more PDF documents. | |
# USAGE: add-cover.sh <COVER-PAGE> <FILES> | |
# | |
# EXAMPLE: add-cover.sh cover.pdf doc/*.pdf | |
# This is your DocumentAlchemy API key. It may be set via the | |
# environment variable named `DA_API_KEY`. |
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
#!/bin/bash | |
# Adds a cover page to one or more PDF documents. | |
# USAGE: add-cover.sh <COVER-PAGE> <FILES> | |
# | |
# EXAMPLE: add-cover.sh cover.pdf doc/*.pdf | |
# This is your DocumentAlchemy API key. It may be set via the | |
# environment variable named `DA_API_KEY`. |
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
curl -H "Authorization: da.key=403l1zh3dkbakyb9" \ | |
-X POST \ | |
-F "[email protected]" \ | |
-F "document=@DOC_BODY.PDF" \ | |
https://documentalchemy.com/api/v1/documents/-/rendition/combined.pdf \ | |
-o "combined.pdf" |
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
#!/bin/bash | |
# Extracts images from Microsoft Office or PDF files using the DocumentAlchemy API. | |
# USAGE: extract-images.sh <FILES> | |
# | |
# EXAMPLE: extract-images.sh MyDeck.pptx *.doc | |
# A ZIP archive containing the extracted images (if any) will be | |
# created for each document submitted. |
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
curl -H "Authorization: da.key=403l1zh3dkbakyb9" \ | |
-X POST --form "[email protected]" \ | |
https://documentalchemy.com/api/v1/document/-/rendition/images.zip \ | |
-o "IMAGES-FROM-MY-DECK.ZIP" |
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
#!/bin/bash | |
# Resizes one or more images to a fixed width using the DocumentAlchemy API | |
# USAGE: resize.sh <NEW-WIDTH> <FILES> | |
# | |
# EXAMPLE: resize.sh 180 images/*.png | |
# The generated files will have the same name (and location) as their source | |
# image, but with '-resized' inserted between the filename and the extension. |
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
# Example of using curl and the DocumentAlchemy API to render a | |
# scale an image to fixed width while preserving the orignal | |
# aspect ratio. | |
# This particular example will work with PNG and JPEG files, | |
# and convert any input JPEG documents to PNG. | |
# See <https://documentalchemy.com/> for more information about | |
# DocumentAlchemy's document conversion and processing capabilities. |
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
#!/bin/bash | |
# Converts a Markdown file into an HTML, PDF or Microsoft Word document | |
# USAGE: md2x.sh <MARKDOWN-FILE> <FORMAT> | |
# | |
# EXAMPLE: md2x.sh README.md pdf | |
# This is your DocumentAlchemy API key. It may be set via the | |
# environment variable named `DA_API_KEY`. | |
# (See <https://documentalchemy.com/> to get one of your own.) |
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
# Example of using curl and the DocumentAlchemy API to render a | |
# Markdown document as a PDF. | |
# There are several parameters that can be used to control the | |
# structure and format of the generated PDF document that are | |
# not included in this simple example. See the DocumentAlchemy | |
# API documentation at <https://documentalchemy.com/api-doc> for | |
# more information about these options. | |
# | |
# See <https://documentalchemy.com/> for more information about |
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
# Example of using curl and the DocumentAlchemy API to convert a | |
# Word *.doc file to a post-Office 2007 *.docx file. | |
# (See <https://documentalchemy.com/> for more information.) | |
# Assuming: | |
# | |
# - `403l1zh3dkbakyb9` is the value of your Document Alchemy API key, | |
# - `MY_DOCUMENT.doc` is the file you want to convert | |
# - `MY_DOCUMENT.docx` is the file you want to save the converted document to | |
# |
NewerOlder