Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to exclude scissors in SVG #420

Closed
Tracked by #414
rkreienbuehl opened this issue Oct 26, 2023 · 1 comment
Closed
Tracked by #414

Add option to exclude scissors in SVG #420

rkreienbuehl opened this issue Oct 26, 2023 · 1 comment
Labels
feature request New feature or request

Comments

@rkreienbuehl
Copy link

It would be nice to have an option to exclude scissors when creating an svg.

@schoero schoero mentioned this issue Oct 28, 2023
29 tasks
schoero added a commit that referenced this issue Oct 28, 2023
@schoero
Copy link
Owner

schoero commented Nov 10, 2023

Thank you for the issue. I agree, SVG should have the same options available as PDF.

In SwissQRBill v4 this is now possible:

import { writeFileSync } from "node:fs";

import { SwissQRBill } from "swissqrbill/svg";


const data = {
  amount: 1994.75,
  creditor: {
    account: "CH44 3199 9123 0008 8901 2",
    address: "Musterstrasse",
    buildingNumber: 7,
    city: "Musterstadt",
    country: "CH",
    name: "SwissQRBill",
    zip: 1234
  },
  currency: "CHF",
  debtor: {
    address: "Musterstrasse",
    buildingNumber: 1,
    city: "Musterstadt",
    country: "CH",
    name: "Peter Muster",
    zip: 1234
  },
  reference: "21 00000 00003 13947 14300 09017"
};

const svg = new SwissQRBill(data, { scissors: false });

writeFileSync("svg-without-scissors.svg", svg.toString());

@schoero schoero closed this as completed Nov 10, 2023
@schoero schoero added the feature request New feature or request label Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants