PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)
PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)
Hi There,
With a developer we created a website that processes SVG files, replaces parts of the SVG text with texts we want and than creates PDF's out of them.
This works all fine and dandy except we have a problem with Chinese. When we create the Chinese PDF' inexplicably the Brackets and Numbers in the text turn into a waaaaayyy different font than the font we specify with the converter.
We are very much around the clock here and we would love someone who could look into the problem and remove the wrench from the cogwheel that is screwing us.
I have no idea whats the price or how is payment is done around here, probably it needs just a fresh set of expert eyes who can go "yeap there is your problem <inserts 2 rows of code>", but we are willing and glad to pay to fix this, or even brush up the code, as the person doing this whole thing was really "hacking and slicing" his way through.
I am linking the 2 files the SVG we have and the PDF we get as a result.
I could not yet get into touch with the developer to pass on all the code files, but as soon as I get it, I am uploading those too.
http://www.megafileupload.com/k00H/boun ... magick.zip
Help please.
We need to make this work by Sept 3.
Update 3: SOLVED
Hi there,
We managed to find the problem, dlemestra set us on the right path and for record, or if anyone bumps into this in the future.
The font had a kanji name, we renamed it for zh.ttf for easier reading.
Apparently for reasons beyond our understanding the convert program disregarded the font, this way. So the developer dug into the FONT file, found what is the font is called in Kanji and burned in the font with that name.
Since than it works.
Moral of the story, never rename your font file.
Thanks for the help
Update 2:
For those who don't "see" the problem at first hand side by side comparison
https://www.dropbox.com/s/q94c8zhqinffu ... n.jpg?dl=0
Code wise what happens, that the brackets + numbers are not being rendered at the Chinese font that is given to them. The Chinese font has a bracket and number style, which shows in the SVG. Reasons beyond my understanding it renders differently. When trying OTHER Chinese fonts we get all kinds of different visual errors. They are not even consistent.
Update 1:
shell_exec('convert -density 300 -compress Lossless /var/www/clients/client90/web294/subdomains/translate/'.$_GET['in'].' /var/www/clients/client90/web294/subdomains/translate/'.$_GET['out'].'');
This is the script that runs. Someone requested I put my files up in a non malwary format. Here are the files non compressed:
https://www.dropbox.com/s/wjjc9vbceqskh ... f.pdf?dl=0
https://www.dropbox.com/s/q1c1ed3ngvzrj ... g.svg?dl=0
With a developer we created a website that processes SVG files, replaces parts of the SVG text with texts we want and than creates PDF's out of them.
This works all fine and dandy except we have a problem with Chinese. When we create the Chinese PDF' inexplicably the Brackets and Numbers in the text turn into a waaaaayyy different font than the font we specify with the converter.
We are very much around the clock here and we would love someone who could look into the problem and remove the wrench from the cogwheel that is screwing us.
I have no idea whats the price or how is payment is done around here, probably it needs just a fresh set of expert eyes who can go "yeap there is your problem <inserts 2 rows of code>", but we are willing and glad to pay to fix this, or even brush up the code, as the person doing this whole thing was really "hacking and slicing" his way through.
I am linking the 2 files the SVG we have and the PDF we get as a result.
I could not yet get into touch with the developer to pass on all the code files, but as soon as I get it, I am uploading those too.
http://www.megafileupload.com/k00H/boun ... magick.zip
Help please.
We need to make this work by Sept 3.
Update 3: SOLVED
Hi there,
We managed to find the problem, dlemestra set us on the right path and for record, or if anyone bumps into this in the future.
The font had a kanji name, we renamed it for zh.ttf for easier reading.
Apparently for reasons beyond our understanding the convert program disregarded the font, this way. So the developer dug into the FONT file, found what is the font is called in Kanji and burned in the font with that name.
Since than it works.
Moral of the story, never rename your font file.
Thanks for the help
Update 2:
For those who don't "see" the problem at first hand side by side comparison
https://www.dropbox.com/s/q94c8zhqinffu ... n.jpg?dl=0
Code wise what happens, that the brackets + numbers are not being rendered at the Chinese font that is given to them. The Chinese font has a bracket and number style, which shows in the SVG. Reasons beyond my understanding it renders differently. When trying OTHER Chinese fonts we get all kinds of different visual errors. They are not even consistent.
Update 1:
shell_exec('convert -density 300 -compress Lossless /var/www/clients/client90/web294/subdomains/translate/'.$_GET['in'].' /var/www/clients/client90/web294/subdomains/translate/'.$_GET['out'].'');
This is the script that runs. Someone requested I put my files up in a non malwary format. Here are the files non compressed:
https://www.dropbox.com/s/wjjc9vbceqskh ... f.pdf?dl=0
https://www.dropbox.com/s/q1c1ed3ngvzrj ... g.svg?dl=0
Last edited by Gergelyc on 2016-08-28T07:28:15-07:00, edited 6 times in total.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)
Using IM v6.9.2-5 and Inkscape 0.91, I get the same results as you.
The font is embedded in the SVG file, and it seems to be used correctly.
In the SVG file, there are UTF strings with (I suppose) Chinese characters and ANSI characters such as "(26G/26H/26I)"
I suppose these ANSI characters have glyphs in that font. I have no way of checking this.
Most font files for non-Western character sets also have glyphs for Western characters such as "26G". As far as I can see, these are being drawn correctly. Do you have an image of what you want them to look like?
The font is embedded in the SVG file, and it seems to be used correctly.
In the SVG file, there are UTF strings with (I suppose) Chinese characters and ANSI characters such as "(26G/26H/26I)"
I suppose these ANSI characters have glyphs in that font. I have no way of checking this.
Most font files for non-Western character sets also have glyphs for Western characters such as "26G". As far as I can see, these are being drawn correctly. Do you have an image of what you want them to look like?
snibgo's IM pages: im.snibgo.com
Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)
Your file is marked as malware by firefox. Can you check your file or share it somewhere else?
Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)
@Snibgo I want the PDF to look like the SVG. I cant say that differently.
@Dlemstra I uploaded the files individually different hosting site.
Updated what convert code we use. What we want that the PDF to look exactly like the SVG.
@Dlemstra I uploaded the files individually different hosting site.
Updated what convert code we use. What we want that the PDF to look exactly like the SVG.
Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)
DropBox is free. That site wants my e-mail, please use something that doesnt require that...
Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)
Thanks for sharing it otherwise. Are you sure you shared the correct PDF? It looks okay to me.
Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)
It is, maybe the error is not that glaring for you guys, but on the SVG the letters are much smaller than on the PDF. The Text "spills"into the graphic art at the end of the leafs. The chinese Kanjis and the Brackers / numbers are clearly not the same size.
Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)
Here is a side by side comparison of the leafs that how does the PDF and the SVG look like.
https://www.dropbox.com/s/q94c8zhqinffu ... n.jpg?dl=0
Again, maybe this is nuanced but art wise it is very important to use that the PDF looks as the SVG, as we use the SVG version to "set" the image, and its clearly not the same font.
https://www.dropbox.com/s/q94c8zhqinffu ... n.jpg?dl=0
Again, maybe this is nuanced but art wise it is very important to use that the PDF looks as the SVG, as we use the SVG version to "set" the image, and its clearly not the same font.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)
Thank you for finally showing what you want the result to look like.
The two images show clearly that different fonts have been used, for both ANSI and Kanji characters.
Adjusting the SVG text to 11 point instead of 12 point gets the spacing closer, but doesn't change the font. I suspect the wrong font has been embedded in the SVG file. It certainly isn't the same font as the "correct" version.
What software made the "correct" version?
The two images show clearly that different fonts have been used, for both ANSI and Kanji characters.
Adjusting the SVG text to 11 point instead of 12 point gets the spacing closer, but doesn't change the font. I suspect the wrong font has been embedded in the SVG file. It certainly isn't the same font as the "correct" version.
What software made the "correct" version?
snibgo's IM pages: im.snibgo.com
Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)
What is the output from your command on the command line? And what is the output for the following command:
Code: Select all
convert -list format | grep svg
Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)
Snbigo: The "correct" version is nothing else than a PHP script changing the text in the SVG. "nothing" is making it.
Dlemstra:
The output of the convert -list format | grep SVG: (there was no result for small letter svg)
MSVG SVG rw+ ImageMagick's own SVG internal renderer
SVG SVG rw+ Scalable Vector Graphics (RSVG 2.26.0)
SVGZ SVG rw+ Compressed Scalable Vector Graphics (RSVG 2.26.0)
But I doN't understand the first part of your question what is the output of the command on the command line? You mean the convert one? It does not have any output on command line only the PDF file.
Dlemstra:
The output of the convert -list format | grep SVG: (there was no result for small letter svg)
MSVG SVG rw+ ImageMagick's own SVG internal renderer
SVG SVG rw+ Scalable Vector Graphics (RSVG 2.26.0)
SVGZ SVG rw+ Compressed Scalable Vector Graphics (RSVG 2.26.0)
But I doN't understand the first part of your question what is the output of the command on the command line? You mean the convert one? It does not have any output on command line only the PDF file.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)
The SVG file is text. Your "Right SVG" is an image. Some software must have made an image from the SVG file.Gergelyc wrote:Snbigo: The "correct" version is nothing else than a PHP script changing the text in the SVG. "nothing" is making it.
We know your "Wrong (PDF)" image was made from that SVG file by ImageMagick. (And Inkscape makes the same result.) We know the result is different to the "Right SVG" image. If you don't know what software made the "Right SVG" image, then you also don't know if it was made from the same SVG file.
snibgo's IM pages: im.snibgo.com
Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)
Maybe I don't understand your question than.
The initial SVG image is an Export from an Adobe Illustrator file to SVG 1.2.
Than this SVG is read into our translation system, where the parts of the SVG that contains text are recognized and processed so later we can change the text to different languages.
Than this is SVG is processed into pdf.
Does this answer your question?
I'll get in touch with the developer to paste the file / code that changes the text in the SVG if that helps, but as my understanding goes, the "initial" svg is created by Illustrator.
The initial SVG image is an Export from an Adobe Illustrator file to SVG 1.2.
Than this SVG is read into our translation system, where the parts of the SVG that contains text are recognized and processed so later we can change the text to different languages.
Than this is SVG is processed into pdf.
Does this answer your question?
I'll get in touch with the developer to paste the file / code that changes the text in the SVG if that helps, but as my understanding goes, the "initial" svg is created by Illustrator.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)
Thank you. Perhaps your "Right SVG" was created by Adobe Illustrator. When you take the final SVG file, and read it into Adobe Illustrator, and look at the image, does it look right or wrong? Are you sure Illustrator is using the font from the SVG file?Gergelyc wrote:The initial SVG image is an Export from an Adobe Illustrator file to SVG 1.2.
snibgo's IM pages: im.snibgo.com