我有一个扭曲的pdf格式的结果转换svg图像后的问题
我用https://mvnrepository.com/artifact/com.itextpdf/svg 第7.1.13版
FileInputStream svgFileInputStream = new FileInputStream("/home/user/mySvgFile.svg");
FileOutputStream pdfFileOutputStream = new FileOutputStream("/home/user/myPdfFile.pdf");
PdfWriter writer = new PdfWriter(pdfFileOutputStream);
PdfDocument pdfDocument = new PdfDocument(writer);
Document document = new Document(pdfDocument);
Image image = SvgConverter.convertToImage(svgFileInputStream,pdfDocument);
document.add(image);
document.close();
我的svg文件:https://www.sendspace.com/file/w8h2uc
<svg xmlns="http://www.w3.org/2000/svg" width="901" height="1295.59" viewBox="0 0 901 1295.59">
<path class="v" fill="blue"
d="5.85,6,7.59,9.17H194c-1.42-2.39-3.42-9.31-6.11-10.49M180,92.62h-1.52v-5.1h1.65c5-.46,4.91,5.72-.13,5.1m36.69-6.13c-10.53-10.12-30.28,4.8-18.11,16.21,10.54,10.17,30.21-4.79,18.11-16.21m-9.07,13c-6.15.26-6.18-10,0-9.72,6.18-.26,6.15,10,0,9.72m29.61.71c-13.35-2.1-3.79-16.71,7-9v-6c-28.23-11.18-27.46,30.55.2,18.87l-.2-5.94a13.25,13.25,0,0,1-7,2.12m19-16.52-10.76,21.91h8.06l1.62-3.75h10.42l1.56,3.75h8L264.65,83.64Zm.74,14,3.48-8.11,3.37,8.11Zm29.79-5c-7.93-4.16,1.75-5.47,5.12-1.15V85.66c-4.74-4.1-15.69-2.88-15.51,4.3-1,4.24,6.85,6.46,8.5,9.08-1.07,3.1-5.6,1-8.53-.77v6c10.77,6.09,24.91-5"
transform="translate(1)"/>
</svg>
结果pdf:https://www.sendspace.com/file/xzrtax
问题是为什么字母a和s被扭曲了?
itext库中是否有bug或我的svg文件“损坏”?
暂无答案!
目前还没有任何答案,快来回答吧!