Open antmar904 opened 1 year ago
From the last line and
check_call(["inkscape", fsvg.name, "--export-filename", fpdf.name])
you can see that the SVG to PDF conversion is done with inkscape. You need to install it to your system first, and check that you can run it by typing inkscape
in your terminal.
rmc /mnt/c/Temp/TestRM/f57e211c-2fb6-4e8b-838f-74718ba12fc6.rm -o /mnt/c/Temp/test.pdf Unknown block type 8. Skipping 17 bytes.
@antmar904 can you share this file f57e211c-2fb6-4e8b-838f-74718ba12fc6.rm
and a description of how you made it / what it contains? It looks like it contains a new piece of data that hasn't come up before.
(this is unrelated to your main problem as hersle says)
From the last line and
check_call(["inkscape", fsvg.name, "--export-filename", fpdf.name])
you can see that the SVG to PDF conversion is done with inkscape. You need to install it to your system first, and check that you can run it by typing
inkscape
in your terminal.
I'm not a linux person, I think I installed inkscape by using:
sudo add-apt-repository ppa:inkscape.dev/stable sudo apt update sudo apt install inkscape
I run the following command:
**rmc /home/User/TestRM/f57e211c-2fb6-4e8b-838f-74718ba12fc6.rm -o /home/User/TestRM/test.pdf Unknown block type 8. Skipping 17 bytes. Unknown block type 8. Skipping 17 bytes.
(inkscape:3367): WARNING : 07:09:23.979: Failed to wrap object of type 'GtkRecentManager'. Hint: this error is commonly caused by failing to call a library init() function.
I just realized that the test.pdf file has been successfully created. :)
rmc /mnt/c/Temp/TestRM/f57e211c-2fb6-4e8b-838f-74718ba12fc6.rm -o /mnt/c/Temp/test.pdf Unknown block type 8. Skipping 17 bytes.
@antmar904 can you share this file
f57e211c-2fb6-4e8b-838f-74718ba12fc6.rm
and a description of how you made it / what it contains? It looks like it contains a new piece of data that hasn't come up before.(this is unrelated to your main problem as hersle says)
let me find out which file this is and what it contains before I can share it. Thank you again for all your help.
any update?
Hello:
When running the following I get the following error:
rmc /mnt/c/Temp/TestRM/f57e211c-2fb6-4e8b-838f-74718ba12fc6.rm -o /mnt/c/Temp/test.pdf
rmc /mnt/c/Temp/TestRM/f57e211c-2fb6-4e8b-838f-74718ba12fc6.rm -o /mnt/c/Temp/test.pdf Unknown block type 8. Skipping 17 bytes. Unknown block type 8. Skipping 17 bytes. Traceback (most recent call last): File "/home/anthony/.local/bin/rmc", line 8, in
sys.exit(cli())
File "/home/anthony/.local/lib/python3.10/site-packages/click/core.py", line 1130, in call
return self.main(args, kwargs)
File "/home/anthony/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/anthony/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/home/anthony/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(args, kwargs)
File "/home/anthony/.local/lib/python3.10/site-packages/rmc/cli.py", line 37, in cli
convert_rm(Path(fn), to, fout)
File "/home/anthony/.local/lib/python3.10/site-packages/rmc/cli.py", line 91, in convert_rm
svg_to_pdf(buf, fout)
File "/home/anthony/.local/lib/python3.10/site-packages/rmc/exporters/pdf.py", line 36, in svg_to_pdf
check_call(["inkscape", fsvg.name, "--export-filename", fpdf.name])
File "/usr/lib/python3.10/subprocess.py", line 364, in check_call
retcode = call(*popenargs, *kwargs)
File "/usr/lib/python3.10/subprocess.py", line 345, in call
with Popen(popenargs, kwargs) as p:
File "/usr/lib/python3.10/subprocess.py", line 969, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'inkscape'