format.toSVG(): paper background image does not appear in exported png/svg/jpeg file
Open
Nobody has claimed this yet.
enhancement
jointjs+
- Dominant language
- JavaScript
- Stars
- 5.4k
- Forks
- 893
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 26
Description
paper.toPNG(function (dataURI) {
const link = document.createElement("a");
link.href = dataURI;
link.setAttribute("download", 'fileName.png');
document.body.appendChild(link);
link.click();
});
The above code is use to export in PNG format, but the paper background image is not applied to the downloaded image
The background image is applied as flows
paper.drawBackground({
image: 'image url',
position: 'center',
repeat: 'no-repeat',
size: 'cover',
opacity: 1
});
Acutal Graph contained

Downloaded Image

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the export with paper.drawBackground({ image, position, repeat, size, opacity }) and paper.toPNG(), then compare the behavior of format.toSVG() and the other mentioned export formats. Trace how the background is represented during export; done means the configured paper background image appears in the downloaded PNG, SVG, and JPEG outputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100