Hello, I got an exception while converting a visio file to pdf, my java code is:
Diagram dgrm = new Diagram(oriFilePath);
dgrm.save(pdfPath, SaveFileFormat.PDF);
I use aspose-diagram java sdk 23.5, my visio file as below:
Hello, I got an exception while converting a visio file to pdf, my java code is:
Diagram dgrm = new Diagram(oriFilePath);
dgrm.save(pdfPath, SaveFileFormat.PDF);
I use aspose-diagram java sdk 23.5, my visio file as below:
@guguzzz
Thanks for the template file.
After an initial testing, I am able to reproduce the issue as you mentioned by using your template file.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): DIAGRAMJAVA-51128
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
The issues you have found earlier (filed as DIAGRAMJAVA-51128) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou
Hello, I tried aspose-diagram 23.8, it worked, nice. But I found the outcome Image blurry, this is origin file:
image.png (45.1 KB)
and this is after conversion:
image.jpg (116.6 KB)
how can I optimize the result?
@guguzzz
Thanks for the screenshots.
It is strange as it works fine on my end using the latest version aspose-diagram 23.8
Here is my output pdf file for your reference:
51128.pdf (146.9 KB)
Could you please share the output pdf.
We will evaluate your issue further.
It was my problem, aspose-diagram worked fine, thank you
@guguzzz
It’s good to know that your issue is sorted out now.
Please feel free to contact us in case you have further comments or questions.
Pdf is ok, but I saved the file to pngs using code like below, the outcome Image blurry, can you help me solve this,
Diagram dgrm = new Diagram(oriFilePath);
for (int i = 0; i < dgrm.getPages().getCount(); i++) {
ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.PNG);
options.setPageIndex(i);
dgrm.save(pagename+i, options);
}
@guguzzz
It is strange as it works fine on my end with the latest version 23.8.
Please find attached the output file for your reference.
511280.png (45.7 KB)
Could you please share your output file or some screenshots.
Thanks.
The png you attached has the problem, look at the words, many of them can not be recognized
When exporting a Microsoft Visio file to the PNG format, you might encounter text size issues.
When manually saving a Microsoft Visio file as a PNG format, you may encounter the same issue.
This could be due to inappropriate resolution settings during export, resulting in small text within the PNG image.
Please try setting a higher resolution when exporting the PNG image or saving to emf.
Sample code:
ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.PNG);
options.setResolution(160);|
Thanks.