diff --git a/example_input.svg b/example_input.svg new file mode 100644 index 0000000..835eb2e --- /dev/null +++ b/example_input.svg @@ -0,0 +1,70 @@ + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/example_output.pdf b/example_output.pdf new file mode 100644 index 0000000..131011e Binary files /dev/null and b/example_output.pdf differ diff --git a/printSvg2Pdf.sh b/printSvg2Pdf.sh index d649d50..8850ee0 100755 --- a/printSvg2Pdf.sh +++ b/printSvg2Pdf.sh @@ -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 diff --git a/readme.md b/readme.md index 96b6e3d..90af419 100644 --- a/readme.md +++ b/readme.md @@ -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