This file contains hidden or 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
// Convert PDF Document to image format using the PixLab PDFTOIMG SDK-Free REST API Endpoint | |
fetch('https://api.pixlab.io/pdftoimg?src=https://www.getharvest.com/downloads/Invoice_Template.pdf&export=jpeg&key=PIXLAB_API_KEY') | |
.then(response => response.json()) | |
.then(reply => { | |
if (reply.status !== 200) { | |
console.log(reply.error); | |
} else { | |
console.log("Link to the image output (Converted PDF page): " + reply.link); | |
} | |
}) |
This file contains hidden or 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
<?php | |
# Programmatically Generate PDF document from markdown or HTML input | |
# Replace with your actual PixLab API key | |
$api_key = "YOUR_PIXLAB_API_KEY"; // Get yours from https://console.pixlab.io/ | |
# Markdown formatted invoice | |
$markdown_text = <<<EOD | |
# Invoice |
This file contains hidden or 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
# Programmatically Generate PDF document from markdown or HTML input | |
import requests | |
import json | |
# Replace with your actual PixLab API key | |
api_key = "YOUR_PIXLAB_API_KEY" # Get yours from https://console.pixlab.io/ | |
# Markdown formatted invoice | |
markdown_text = """ |
This file contains hidden or 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
// Programmatically Generate PDF document from markdown or HTML input | |
// Replace with your actual PixLab API key | |
const apiKey = "YOUR_PIXLAB_API_KEY"; // Get yours from https://console.pixlab.io/ | |
// Markdown formatted invoice | |
const markdownText = ` | |
# Invoice | |
## To: |
This file contains hidden or 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
# Remove background programmatically using the PIxLab BGREMOVE API Endpoint - https://pixlab.io/endpoints/background-remove-api | |
# The /BGREMOVE API endpoint supports both GET and POST requests so you can make image uploads directly from your app | |
import requests |
This file contains hidden or 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
import requests | |
import json | |
# Get natural language responses to image-related queries | |
# Target Image: Change to any link or switch to POST if you want to upload your image directly, refer to the REST API code samples for more info. | |
img = 'https://s-media-cache-ak0.pinimg.com/originals/35/d0/f6/35d0f6ee0e40306c41cfd714c625f78e.jpg' |
This file contains hidden or 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
import requests | |
import json | |
# Generate a natural language description of an image content | |
# Target Image: Change to any link or switch to POST if you want to upload your image directly, refer to the REST API code samples for more info. | |
img = 'https://s-media-cache-ak0.pinimg.com/originals/35/d0/f6/35d0f6ee0e40306c41cfd714c625f78e.jpg' | |
key = 'PIXLAB_API_KEY' # Get your API key from https://console.pixlab.io/ |
This file contains hidden or 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
# Age verification and gender extraction using the FACEIO REST API - https://faceio.net/rest-api |
This file contains hidden or 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
# Determine if the provided faces represent the same individual | |
# using the FACEIO REST API - https://faceio.net/rest-api |
This file contains hidden or 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
=begin | |
* Scan over 11K ID Documents from over 197 countries using the PixLab DOCSCAN API Endpoint | |
* documented at: https://pixlab.io/id-scan-api/docscan | |
* | |
* In this example, given a Passport document, extract the passport holder face and convert/parse all Machine Readable Zone | |
* to textual content ready to be consumed by your application. | |
* | |
* PixLab recommend that you connect your AWS S3 bucket via the dashboard at https://console.pixlab.io | |
* so that any extracted face or MRZ crop is automatically stored on your S3 bucket rather than the PixLab one. | |
* This feature should give you full control over your analyzed media files. |
NewerOlder