Skip to content

Commit

Permalink
Added example and changed the sed delimiter to |
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Lera Ramirez committed May 27, 2021
1 parent 8adef93 commit 793567f
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 3 deletions.
70 changes: 70 additions & 0 deletions example_input.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example_output.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions printSvg2Pdf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
chrome_executable="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

# Path to the template.html file in this folder
template_file="path/to/template.html"
template_file="/Users/Manu/Documents/Projects/anaphase_yeast/experimental_data/figures_paper/printSvg2Pdf/template.html"

sed "s/__targetfile__/${1}/" "$template_file" > printSvg2Pdf_temp.html
sed "s|__targetfile__|${1}|" "$template_file" > printSvg2Pdf_temp.html
"$chrome_executable" --headless --disable-gpu --print-to-pdf-no-header --print-to-pdf=$2 printSvg2Pdf_temp.html
rm printSvg2Pdf_temp.html
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In the file `printSvg2Pdf.sh` set the following variables:
Then simply:

```
bash printSvg2Pdf.sh input_file.svg output_file.pdf
bash printSvg2Pdf.sh example_input.svg example_output.pdf
```

## What it does
Expand Down

0 comments on commit 793567f

Please sign in to comment.