java - How to generate pdf by using org chart svg format? -
we developing org chart (it long chart both vertical , horizontal) using svg
format integrating html
. presently using apace batik generating pdf
through svg
format, generating pdf here problem not getting full chart. coming 4 nodes svg
file contains 200
nodes. can u please how can show in pdf
format??
i used code..
string svg_uri_input = paths.get("d:\\orgchart.svg").touri().tourl().tostring(); transcoderinput input_svg_image = new transcoderinput(svg_uri_input); //step-2: define outputstream pdf file , attach transcoderoutput outputstream pdf_ostream = new fileoutputstream("d:\\orgchartv3.jpeg"); transcoderoutput output_pdf_file = new transcoderoutput(pdf_ostream); // step-3: create pdf transcoder , define hints transcoder transcoder = new pdftranscoder(); // transcoder.addtranscodinghint(svgabstracttranscoder.k, new float(19200)); // transcoder.addtranscodinghint(svgabstracttranscoder.key_height, new float(19200)); // step-4: write output pdf format transcoder.transcode(input_svg_image, output_pdf_file); // step 5- close / flush output stream pdf_ostream.flush(); pdf_ostream.close();
Comments
Post a Comment