Dear Aspose Team,
I logged a ticket towards the end of last year requesting the drawLine() and drawPolyLine() to be added to the Java API. Draw Line with multiple points (Java). Released in version 22.12
It is meeting my needs perfectly however the shapes/lines seem to be missing when exported to PDF/HTML and PNG from the Visio file.
Any assistance would be appreciated.
Thanks
@joshualotz81
Can you please provide the sample files for our reference so that we can test the scenario in our environment and address it accordingly?
Please see attached reference files.
Includes:
- .vsdx visio file (Drawing-Export.vsdx)
- .html file exported from visio file (ExportToHTML.html and ExportToHTML_files)
- .pdf file exported from visio file (ExportToPDF.pdf)
- .png file exported from visio file (ExportToPNG.png)
- The custom stencil i have been using (Custom-Stencil.vssx)
- The image I used for the shapes (Host-HostServer.png)
Code lines I have been using to generate the files:
DiagramSaveOptions options = new DiagramSaveOptions(SaveFileFormat.VSDX);
diagram.save(path, options);
diagram.save("./generated/ExportToHTML.html", SaveFileFormat.HTML);
diagram.save("./generated/ExportToPNG.png", SaveFileFormat.PNG);
diagram.save("./generated/ExportToPDF.pdf", SaveFileFormat.PDF);
page.drawLine(0,0,0,0,cpArray);
cpArray being all the points of the line (double [])
Aspose Support.zip (3.2 MB)
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-51076
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-51076) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou
Dear Aspose Team
I downloaded the latest 23.2 .jar file but the issue still persists.
Could you please confirm if it is working in your environment or if I am doing it incorrectly?
Thanks
@joshualotz81
We are checking it and will get back to you shortly.
@joshualotz81
Please provide the code to generate the “Drawing-Export.vsdx” file, mainly for drawing lines and setting the color of the lines.
When calling ‘drawingline’, we will set the line to the basic style and the color of the line will be black.
Thanks.
Hi Aspose Team
Apologies for the delayed response, i was working on a different project until now.
Please see attached file with code.
The project is to export a json based drawing to visio/PDF/PNG/HTML
Aspose code.zip (8.3 KB)
As mentioned, the lines dont seem to appear on anything except the vsdx file.
I have also downloaded and tested on the 23.3 version.
createLine.txt -> The function to draw lines
wholeFile.txt -> The entire file for referance
@joshualotz81
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-51097
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.
@joshualotz81
We will fix this issue in next version 23.4.
We find that in the code, in one case, the line pattern is set to 2, please set the other cases to 1, so that the line can be drawn
if(lineDash != null) newLine.getLine().getLinePattern().setValue(2);
When using the version 23.4 released start of next month, please set the line pattern to 1.
Thanks.
Thank you for the assistance
@joshualotz81
You are welcome,Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.
The issues you have found earlier (filed as DIAGRAMJAVA-51097) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou
Hi Aspose Team
Tested with 23.4
Lines are showing as expected on HTML/PDF and PNG
Thanks for the assist
Joshua
@joshualotz81
You are welcome.
Please feel free to contact us any time if you find any issue.
Thanks.