0

I export an Highcharts chart as a PDF file, everything's fine.

But when I open this chart in Adobe Illustrator (to change some text) :

  • the characters are all vectorized
  • so, to change the text, I have to delete all my text and rewrite another one
  • thus I lose all my style properties that I have set in HighCharts.


Is it possible to export an SVG (via batik, the exporting server of HighCharts) to PDF with not-vectorized text ?

Does it exist another way to do this with ou without Batik ?

kmas
  • 6,401
  • 13
  • 40
  • 62
  • Small note: Right now Highcharts is using phantomJS to export images, not Batik. I don't know answer (unfortunately), but maybe you can get SVG (`chart.getSVG()`) and then from that SVG generate PDF using another tool? Like wkhtmltopdf? – Paweł Fus Feb 05 '14 at 15:44
  • Well, I have configure my export server to use Batik (`export_url : 'highcharts/exporting-server/index.php'`). Well it is what I see when I open the file inside the HighCharts archive. I'm gonna look at the wkhtmltopdf. I know this utility, I just hope it can convert SVG to PDF. Thanks again Pawel, you're a great help to me. ;) – kmas Feb 05 '14 at 15:54

1 Answers1

0

I have a solution to export svg to pdf with text that can be then edited in Illustrator/inkscape for example.

It is thanks to Inkscape used in command line.

  1. Install inkscape (add its installation path into PATH variable if you use Windows)
  2. Change only one line in the highcharts/exporting-server/index.php

Old one :

$output = shell_exec("java -jar ". BATIK_PATH ." $typeString -d $outfile $width temp/$tempName.svg");

New one :

$output = shell_exec("inkscape -f temp/$tempName.svg -A $outfile");
kmas
  • 6,401
  • 13
  • 40
  • 62