When saving a vsdx object as PDF we get a blank diagram.
I’ve noticed this was reported previously and it doesn’t seem to be resolved. I’m using a flowchart LayoutOptions to get around the awful pagination in vxsdx.
It’s not actually fully blank - the text on the connectors is there but not the connectors or shapes. There is a Process shape with some text in it that contains the text but is not visible. The original vsdx saves fine as a PDF in Visio.
As requested earlier, please share source Diagram (.vsdx/.vsd) in .zip format with us so that we can test it in our environment and address the issue accordingly.
Would you kindly make sure that you are using a valid or 30-days free temporary license during evaluation of the API? We tested the scenario in our environment using Aspose.Diagram for .NET 20.8 and were unable to notice any issue. For your kind reference, an output PDF is also attached. Please let us know in case you notice any issue in the attached file.
One difference might be that I am creating the Visio document and then creating a stream to download ? I’m not saving the file then opening and converting.
You may please try saving the generated diagram into memory stream and reloading it into Diagram object to convert into PDF. Furthermore, we request you to please share complete sample code snippet which includes steps to generate the diagram that you are generating. Also, please share sample stencil file for our reference so that the scenario can be tested and addressed accordingly.
So you want me to create the document, write it to a stream, then reload from a stream as a pdf, then write it to a stream again so I can download it ?
I’ve attached the class that generates the Visio and the stencil as requested - instead of reading the data just loop and create 40 empty shapes. visio stuff.zip (32.2 KB)
We do realize that it will increase time and memory cost. We only suggested it as a workaround. Nevertheless, we are now testing the scenario with your provided code and sample stencil file and will get back to in a while.
Saving the vsdx to a stream, then loading that stream into a new document and then saving stream using PDF options didn’t work.
I’ve also noticed that some of the colours in the vxdx are not showing, in my example code you’ll see some code that switched the colour to red if the duration is greater than the threshold - this no longer works at all - to be honest it was patchy before but we have bigger issues with the PDF failing.
We have logged an issue as DIAGRAMNET-51935 in our issue tracking system for the sake of further investigation against this scenario. We will further look into its details and let you know as soon as the ticket is resolved. Please be patient and spare us some time.
We would like to share with you that investigation against earlier logged-ticket is underway. However, we tried to execute the code snippet shared by you and noticed that some namespaces or .dll were missing. Would you kindly provide a sample project in .zip format which can run without error and replicate the issue. It would help us during investigation and resolving the issue accordingly.
Hi - just extract the routine that generates the Visio and loop 30 times adding new shapes. The code is data driven and there is nothing in there that can’t be easily mocked.
We have used the attached code to test the scenario. Would you kindly use it and see if PDF related issue still occurs. You may please change it as per your needs and share it back if issue persists with your changes. 51935.zip (1.5 KB)
Hi - this seems to have fixed it - the only change I could see was that then line colour now uses the RGB value and not the formula set. Thanks for the change but the PDF output is not paginated and only prints the first page cutting off the rest of the diagram - good to get some output but it’s not usable.