
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
Layout engine to create vector graphics (like PDF) using JavaScript and XML based declarative markup.
npm i -g evg
Example of markup:
<div>
<div padding="20">
<QRCode text="https://github.com/terotests/evg" width="20%" height="20%"/>
<div width="80%" padding="20">
Here is your personal QR code
</div>
</div>
</div>
See hello.xml and hello.pdf to get started quickly.
The engine supports following commands (and more):
div, img and path for common layout elementscolor, background-color, border-color, opacityborder-width, border-radiuspadding, margin, margin-top etc. supportedpx, % (%of available width) or hp (% of height)50% or 50 or 50px, `<div>Hello World</div>font-size, font-family can be used to specify TTF fonts used (or fonts/ dir for CLI)align=center, align=left, align=righttop and left, bottom, rightoverflow="hidden" for View and Path elementsExtra features include:
<QRCode text="foobar"/>page-break to change pagesfooter and header to specify page header and footer<component id=""></component> to declare re-usable componentsid="content" to hold component contents<path d=""/> elements which can contain SVG path are scaled automatically to fit viewportRunning from command line
evg hello.xml hello.pdf
Subdirectories:
fonts/ can include TTF filescomponents/ can include XML components which are used in the file.Components can use id="content" to indicate place for child nodes.
The .git reposity has example directory testfiles/ where is example XML file.
Elastic View Graphics
import {EVG} from 'evg'
// you have to install some fonts...
EVG.installFont('candal', '../evg/fonts/Candal/Candal.ttf')
// create a text element component....
EVG.installComponent('t', `<Label font-family="candal" background-color="blue" />`)
// create node and render it to PDF
const node = new EVG(`<View>
<t text="Hello World!"/>
</View>
`)
EVG.renderToFile('./out.pdf', 600,800, node)
// or render to stream
const fs = require('fs')
EVG.renderToStream(fs.createWriteStream('fileName.pdf'), 600,800, node)
You can define own components, which receive the child elements under a certain tag.
To define your own custom <h1>Hello</h1> component as inline XML like this
<component id="h1">
<div margin-top="10" margin-bottom="20" margin-left="20">
<div font-size="28" color="#666" id="content"/>
</div>
</component>
The id="content" marks the spot where component children are to be inserted.
MIT
FAQs
Elastic View Graphics
We found that evg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.