Categories

PDF Vector Shapes Demo

Generate a PDF showcasing rectangle, circle, polygon, Bezier curve, and gradient simulation

Create a one-page vector graphics demo PDF using pdf-lib.

Includes:

  • Rectangle and circle samples
  • Polygon with adjustable sides
  • Cubic Bezier curve path
  • Gradient-like strip simulation

Example Results

2 examples

Vector Shapes Default Showcase

A4 portrait with grid, 6-sided polygon and 40-step gradient

vector-shapes-demo-example1.pdf View File
View input parameters
{ "pageSize": "A4", "landscape": false, "showGrid": true, "polygonSides": 6, "gradientSteps": 40, "backgroundColor": "#F7F9FC", "primaryColor": "#2F6FED", "secondaryColor": "#13A89E", "accentColor": "#F15B3A" }

Vector Shapes Landscape Variant

Letter landscape variant with no grid and denser gradient

vector-shapes-demo-example2.pdf View File
View input parameters
{ "pageSize": "Letter", "landscape": true, "showGrid": false, "polygonSides": 9, "gradientSteps": 80, "backgroundColor": "#FFF7F2", "primaryColor": "#3A52D1", "secondaryColor": "#00A78F", "accentColor": "#FF5A36" }

Key Facts

Category
Document Tools
Input Types
select, checkbox, number, color
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

Generate professional-grade PDF documents featuring complex vector graphics, including geometric shapes, Bezier curves, and custom gradient simulations using the pdf-lib engine.

When to Use

  • When you need to verify PDF rendering capabilities for vector-based graphics.
  • When creating technical documentation that requires precise geometric illustrations.
  • When you want to test how different page layouts and color schemes appear in a generated PDF.

How It Works

  • Select your preferred page size and orientation settings.
  • Customize the visual parameters, such as the number of polygon sides and gradient density.
  • Define your brand or project color palette using the primary, secondary, and accent color pickers.
  • Click generate to produce a downloadable PDF file containing the rendered vector elements.

Use Cases

Creating visual test patterns for PDF printing and display software.
Generating custom geometric assets for digital reports or presentations.
Prototyping document layouts with specific color branding and vector elements.

Examples

1. Standard Vector Showcase

Background
A designer needs a reference document to test how vector shapes render on A4 paper.
Problem
Need a quick way to visualize basic shapes and a 40-step gradient.
How to Use
Select A4 size, enable the grid, and use the default color settings.
Example Config
pageSize: A4, showGrid: true, polygonSides: 6, gradientSteps: 40
Outcome
A clean, portrait-oriented PDF with a grid background and standard vector samples.

2. Landscape Branding Prototype

Background
A developer is testing a new color palette for a client's technical documentation.
Problem
Need to see how custom brand colors look when applied to complex vector shapes in landscape mode.
How to Use
Set to Letter landscape, disable the grid, and input custom brand hex codes.
Example Config
pageSize: Letter, landscape: true, showGrid: false, polygonSides: 9, gradientSteps: 80
Outcome
A high-density, landscape-oriented PDF showcasing the brand colors across shapes and a smooth 80-step gradient.

Try with Samples

pdf

Related Hubs

FAQ

What file format does this tool produce?

This tool generates standard PDF files.

Can I adjust the complexity of the polygon?

Yes, you can set the number of polygon sides between 3 and 12.

How are gradients created?

Gradients are simulated by rendering multiple color steps, which you can configure between 8 and 120 steps.

Is it possible to remove the background grid?

Yes, you can toggle the 'Show Grid' option off in the configuration settings.

What library powers this PDF generation?

This tool utilizes the pdf-lib library to render vector shapes directly into the document.

API Documentation

Request Endpoint

POST /en/api/tools/pdf-vector-shapes-demo

Request Parameters

Parameter Name Type Required Description
pageSize select No -
landscape checkbox No -
showGrid checkbox No -
polygonSides number No -
gradientSteps number No -
backgroundColor color No -
primaryColor color No -
secondaryColor color No -
accentColor color No -

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-pdf-vector-shapes-demo": {
      "name": "pdf-vector-shapes-demo",
      "description": "Generate a PDF showcasing rectangle, circle, polygon, Bezier curve, and gradient simulation",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=pdf-vector-shapes-demo",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

If you encounter any issues, please contact us at [email protected]