I have some special characters ☎ in svg file, I use inkscape to export svg to pdf, but the special characters don't display.
Could you give me solutions for that?
Many thank.
How can export pdf content special character with inkscape?
Re: How can export pdf content special character with inkscape?
Perhaps converting them to Paths/Outlines?
Re: How can export pdf content special character with inkscape?
Maestral wrote:Perhaps converting them to Paths/Outlines?
I don't know, what you're mean?
I would some special characters such as: U+1F512 (Lock), U+1F511 (Key), U+260E (Black Telephone) display on pdf file.
Re: How can export pdf content special character with inkscape?
Convert Text to Path (Shift+Ctrl+C)
Re: How can export pdf content special character with inkscape?
There's also a checkbox to "Convert text to paths" in the dialog that appears when I choose "Save As..." to save the file as a PDF. You should be able to use that rather than changing the text to paths in the original document (per Maestral's instructions). That said, try both approaches to see if there's any difference in the files.
With my testing I was able to save a PDF that contained the Black Telephone character whether that checkbox was ticked or not. If you don't tick the box I suspect it only works on a machine with the same font installed (I don't think Inkscape embeds fonts into PDF files). If you do tick the box it should work with any machine, but the file will be larger.
With my testing I was able to save a PDF that contained the Black Telephone character whether that checkbox was ticked or not. If you don't tick the box I suspect it only works on a machine with the same font installed (I don't think Inkscape embeds fonts into PDF files). If you do tick the box it should work with any machine, but the file will be larger.
Re: How can export pdf content special character with inkscape?
Xav wrote:There's also a checkbox to "Convert text to paths" in the dialog that appears when I choose "Save As..." to save the file as a PDF. You should be able to use that rather than changing the text to paths in the original document (per Maestral's instructions). That said, try both approaches to see if there's any difference in the files.
With my testing I was able to save a PDF that contained the Black Telephone character whether that checkbox was ticked or not. If you don't tick the box I suspect it only works on a machine with the same font installed (I don't think Inkscape embeds fonts into PDF files). If you do tick the box it should work with any machine, but the file will be larger.
Thank for your response.
I use vb.net to convert svg with special characters to pdf.
1. Create svg file
Code: Select all
Dim pathSvgs = HttpContext.Current.Server.MapPath("~/src/svgs")
If Not Directory.Exists(pathSvgs) Then
Directory.CreateDirectory(pathSvgs)
End If
Dim svgDoc As System.Xml.XmlDocument = New System.Xml.XmlDocument()
svgDoc.LoadXml(strLayer.ToString())
newSvgFile = pathSvgs & "\" & Regex.Replace(layerName, "[^a-zA-Z0-9_]", "_") & ".svg"
If fresh OrElse
Not File.Exists(newSvgFile) Then
svgDoc.Save(newSvgFile)
End If
2. Convert to pdf
Code: Select all
string pdfFileName;
pdfFileName = svgFileName.Replace(".svg", ".pdf").Replace(".SVG", ".pdf");
ProcessStartInfo startInfo = default(ProcessStartInfo);
Process pStart = new Process();
startInfo = new ProcessStartInfo(pathInkSpace, "\"" + svgFileName + "\" --export-pdf=\"" + pdfFileName + "\"");
pStart.StartInfo = startInfo;
pStart.Start();
pStart.WaitForExit();
when pdf file is created, the special characters don't display. How can I convert to pdf with special chars
Re: How can export pdf content special character with inkscape?
The problem isn't an Inkscape one, it's a vb.net one. You might gave a better chance on a .Net forum as the question is about how to escape unicode characters in a pdf export, and is probably not SVG specific.
I've moved this thread to the Programming forum, as that's a more appropriate place for this kind of question.
I've moved this thread to the Programming forum, as that's a more appropriate place for this kind of question.