PcbDrawToPDF exports the masks employed by PcbDraw in order to apply masking on Adobe software and be able to save on PDF correctly.
Project description
PcbDrawToPdf
Convert the SVG files generated by PcbDraw to PDF files.
This tool addresses the challenge of exporting PDF files from PcbDraw, particularly related to the SVG mask property that Inkscape does not convert properly. It processes the SVG file generated by PcbDraw and produces another SVG file without the masks. The masks are exported as additional groups, allowing for their application in other software, such as Adobe Illustrator.
Installation
PcbDrawToPdf is a stand-alone CLI tool. PcbDrawToPdf is tested with Inkscape 1.3.2 and PcbDraw v1.1.2.
PcbDrawToPdf is distributed as a Python package. You just have to follow the installation instructions from PcbDraw and then install PcbDrawToPdf via Pip:
pip install PcbDrawToPdf # Use pip or pip3 based on your distribution
Now you can test that it works:
pcbdrawtopdf --help
You should get a help menu.
Usage
The input for PcbDrawToPdf is the SVG file generated by PcbDraw. This tool provides this command:
convert-masks: This command generates a new SVG file by removing the mask effects and adding the masks to an additional group calledmasks. These masks must be applied in Adobe Illustrator from the lowest hierarchy level to the highest. The groups that need masking are renamed with_<mask-name>, where<mask-name>corresponds to the name of the group containing the mask.
Mask Application
PcbDraw generates three masks: hole-mask, pads-mask-silkscreen, and pads-mask. The masks should be applied in the following order:
pads-mask-silkscreenpads-maskhole-mask
This order is important because hole-mask applies to a group at a higher hierarchy level in the SVG file.
See the section below to learn about applying opacity masks in Adobe Illustrator. Moreover, the mask property Drop must ticked and the property Invert doesn't.
Once the masks are applied, they can be removed.
Additional Resources
For more information about applying opacity masks in Adobe Illustrator, please refer to this video.
Examples
pcbdrawtopdf convert-masks ArduinoLearningKitStarter.svg ArduinoLearningKitStarter_export.svg
pcbdrawtopdf extract-masks ArduinoLearningKitStarter.svg export_folder
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pcbdrawtopdf-1.0.0.tar.gz.
File metadata
- Download URL: pcbdrawtopdf-1.0.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16ff4e964ee3e6d9335ff1752d877d1eb8745dc9db8ec8a604d72084faf0ffba
|
|
| MD5 |
eb41a89363fe57b91b7b126542ec87ec
|
|
| BLAKE2b-256 |
8b7204a726eeed72d3f2c38a5a5c7a152e0b5351ebe62e460aeee11f2f88e7db
|
Provenance
The following attestation bundles were made for pcbdrawtopdf-1.0.0.tar.gz:
Publisher:
release.yml on rafo-og/PcbDrawToPdf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pcbdrawtopdf-1.0.0.tar.gz -
Subject digest:
16ff4e964ee3e6d9335ff1752d877d1eb8745dc9db8ec8a604d72084faf0ffba - Sigstore transparency entry: 148608660
- Sigstore integration time:
-
Permalink:
rafo-og/PcbDrawToPdf@7e7161e2cc346d0fc69c02e3cb921e766cf949cf -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/rafo-og
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7e7161e2cc346d0fc69c02e3cb921e766cf949cf -
Trigger Event:
push
-
Statement type:
File details
Details for the file pcbdrawtopdf-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pcbdrawtopdf-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ad3ab23ef64834e69f0007536b0951a3fa889b209d2db2bd53c6b721b9ce1f0
|
|
| MD5 |
79fa499da4eb76abfbb026ede6a562bc
|
|
| BLAKE2b-256 |
be1f27d36b4be01d2b28accf562ed90a55d05439da853120eef649c97b15dadd
|
Provenance
The following attestation bundles were made for pcbdrawtopdf-1.0.0-py3-none-any.whl:
Publisher:
release.yml on rafo-og/PcbDrawToPdf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pcbdrawtopdf-1.0.0-py3-none-any.whl -
Subject digest:
6ad3ab23ef64834e69f0007536b0951a3fa889b209d2db2bd53c6b721b9ce1f0 - Sigstore transparency entry: 148608661
- Sigstore integration time:
-
Permalink:
rafo-og/PcbDrawToPdf@7e7161e2cc346d0fc69c02e3cb921e766cf949cf -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/rafo-og
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7e7161e2cc346d0fc69c02e3cb921e766cf949cf -
Trigger Event:
push
-
Statement type: