I am doing a process of converting SVG to EPS file and EPS file to DXF file format using shell scripting. While converting EPS file to DXF file using the following command:
pstoedit -dt -f dxf:-polyaslines ${epsfile} ${dxffile}
I am facing an issue in converting the text. In the output DXF file, the text are created using polylines, So there is no text property when I open the file in DXF viewer. I need the text should be created as text in DXF file. I gone through the following link http://manpages.ubuntu.com/manpages/hardy/man1/pstoedit.1.html. But I didn't got the exact solution what I need. Can any one help me with this?
Related
I'm trying to write a paper in Overleaf and trying to follow Gilles Castel's format of importing SVG files into my TeX document. I understand he used VIM to program his TeX documents, but the fundamental should be the same. However, when compiling the file I'm trying to include is recognized as a *.pdf instead of *.pdf_tex, which results in a blank figure box to appear in my document with the text which is included in the figure, but not any of the graphic art drawn.
Below is a minimal reproducible example of how I attempted to import the image.
\documentclass{article}
\usepackage{import}
\usepackage{pdfpages}
\newcommand{\incfig}[1]{%
\def\svgwidth{\columnwidth}
\import{./figures/}{#1.pdf_tex}
}
\begin{document}
\begin{figure}[h!]
\centering
\incfig{myfigure}
\caption{A figure.}
\label{fig:myfigure}
\end{figure}
\end{document}
My SVG files are stored in a local folder ./pdftex/ and has figure name HBRIDGE-CIRCDIAGRAM. However, to reproduce, you can choose whichever filename with *.pdf_tex.
I'm expecting that the file name is recognized and pulled from ./figures/ but instead the program recognizes it as a *.pdf file instead, resulting in a blank image.
Below is an image of how I have the files set up in my folder:
I then include it in my code in the following fashion:
And Overleaf produces the following output:
Any thoughts on why this is happening and how to fix it?
Thank you.
TL;DR: Is there a way to tell Inkscape on the command line, what the file extension is of the parameter --file=?
I have a case where I have to convert vector image files to SVG, using Inkscape command line tool. Current code is targeted at PDFs, so the following works fine:
inkscape --without-gui --file=source_file.pdf --export-plain-svg=result_file.svg
My problem is that I have to apply the same to new files, that are stored without extension, so my command would look like this:
inkscape --without-gui --file=some_stored_file --export-plain-svg=result_file.svg
When I run this command I get an error: "Specified document some_stored_file cannot be opened (does not exist or not a valid SVG file)"
I think this happens because the file doesn't have an extension and Inkscape can't guess the format.
What I can do is: get the format somewhere else, copy the stored file to a temp file with extension (some_temp_file.pdf) and then convert that to SVG, then remove the new temp file.
While this works fine, I would skip the otherwise unnecessary file copying just to have an extension.
Is there a way to tell Inkscape what the file extension is, other than having a file extension explicitely?
Well, I didn't found an answer to my question so what I did is symlinking the file (instead of copying), adding the extension on the symlink. Still better than copying the file and works fine.
I am generating a logfile on one of my servers.
Storing alot of data, then sending it to my mail once a month as a pdf file.
The prosess i am using is to 'cat' alot of commands to a text file, then convert it and send.
Is there any linux programs or some eazy way to do something simulare and add a image i have stored on the server in the pdf file?
This answer assumes that you just want to put the image at the end of the PDF.
You could first convert the image using imagemagick to a PDF doing this (will also work with different file types):
convert image.jpg image.pdf
Then, you can use a tool like stapler or pdftk to combine your generated text PDF and the image.pdf (you can add multiple images):
stapler cat text.pdf image.pdf combined.pdf
pdftk text.pdf image.pdf output combined.pdf
I have a bunch of images in jpeg format and i would like to batch convert them to .dds (DirectDraw surface).
Does anyone know a command line tool to achieve such a conversion?
How to convert WMF file to svg file? I have around 550 WMF files to be converted to SVG format.
For one file, I opened the WMF file in VISIO and saved it as SVG format, but to convert around 550 files is a tedious process.
Please help me
Actually, these WMF files are the converted files from the PDF document. So, any better way to convert the PDF image to an svg image ? Currently I converted the PDF schematic diagram into wmf and opened it with visio, so that I can select each circuit or connector by ungrouping and later saved it to SVG format. This svg format, I will import into another tool, where i can select each circuit and connector for further work.
Thanks
Ramm
I'll just add a link to the Free EMF/WMF to SVG File Convert Tool 2.0 for future reference.
http://visualstudiogallery.msdn.microsoft.com/dc4e0116-a730-45d2-ae9f-03be676817ea
and the WMF2SVG project over at Github:
https://github.com/hidekatsu-izuno/wmf2svg
For batch processing WMF to SVG you can use Inkscape. You must use the command line. Start it with inkscape --shell.
Then to convert automagically use:
inkscape yourfile.wmf --export-plain-svg=yourfile.svg.
To make your life easier, here is a BATCH skript. Create a text file, name it wmftosvg.bat and place it into the folder with all wmf files. The content of the file:
#ECHO OFF
echo.
echo.
echo. Enter graphic format (like wmf):
echo.
set /p Input1= Graphic file type:
echo.
echo.
FOR %%I IN (*."%Input1%") DO (
setlocal enabledelayedexpansion
C:\Portables\InkscapePortable\App\Inkscape\inkscape "%%~nI.!Input1!" --export-plain-svg="%%~nI".svg
)
With the script above you can convert arbitrary graphics to SVG. Just enter the graphic format (file extension).
If you are familiar with C#/.NET you can use WMF library from CodePlex to create a converter to SVG. Since WMF supports only basic shapes (line, rectangle, polygon, arc) and no layers nor element nesting it should be quite easy to convert as SVG supports all those features and more.
Also check out this question: WMF / EMF File Format conversion C#
I used the wmf2svg Java project to convert a load of old wmf files.
Wrote a little bash script to convert all the files in my folder to .svg
shopt -s nullglob
for file in *; do
fname="${file%.*}.svg"
java -jar wmf2svg-0.9.11.jar $file $fname
done
The WMF2SVG project was moved over to GitHub
https://github.com/hidekatsu-izuno/wmf2svg
It works fabulously on my MacBook OS X 10.10.2