VSS Files Converted to PDF Blank

Thank you for the sample code. Is there a way to iterate through stencils and print each stencil and its Name in a grid layout, starting from the upper left of the diagram, and then output that diagram to PDF? I do not want to save the stencils as bitmaps first if I can avoid it.


There would be N rows and M columns of stencil icons on a single diagram page, each with its Name printed as a label beside it. Also, I would like to preserve the aspect ratio of the stencil icons within a fixed size square so they don’t get stretched/skewed.

I’m having difficulty understanding the coordinate system of a diagram and how to place icons accordingly. There are floating point numbers (pinX and pinY), but I don’t know how this relates to the diagram size, the max pinX/pinY, resolution, etc.

EDIT: Here’s some sample code I’ve tried that doesn’t do the job. The text boxes and shapes don’t seem to match when placed on the diagram. Also, the grid is messed up.

diagram = new Diagram(inputPath);
Diagram stencils = new Diagram();

int i = 0;
double x = 0;
double y = 12;
foreach (Master master in diagram.Masters)
{
stencils.AddMaster(diagram, master.Name);
long id = stencils.AddShape(x, y, 2, 2, master.Name, 0);
stencils.Pages[0].AddText(x, y, 2, 2, master.Name);
if (i % 10 == 9) {
x = 0;
y -= 2;
} else {
x += 2;
}
i++;
}
stencils.Save(outputPath, SaveFileFormat.PDF);

Also, from your bitmap output code above where you showed how to resize and then output the bitmap, it doesn’t resize the shape for the example you showed. All it does is add whitespace padding to the output PNG. I attached output examples so you can see what I mean from sample code below:


// resize shape Output-3x.png

shape.SetWidth(3 * shape.XForm.Width.Value);

shape.SetHeight(3 * shape.XForm.Height.Value);


// resize shape Output-2x.png

shape.SetWidth(2 * shape.XForm.Width.Value);

shape.SetHeight(2 * shape.XForm.Height.Value);


// resize shape Output-1x.png

shape.SetWidth(shape.XForm.Width.Value);

shape.SetHeight(shape.XForm.Height.Value);


Do you know why this is? I need to be able to scale the size or else I will have trouble displaying icons consistently across all .vss files.

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.5px Consolas; color: #008f00}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.5px Consolas}

Hi Per,


Thank you for the inquiry. PinX and PinY are the center points of any master shape. If both PinX and PinY values are zero, then master shape’s center would be at left bottom corner of the Visio page. Please try the following code example on your stencil file:

[.NET, C#]
Diagram diagram = new Diagram(@“C:\Diagram\testdiagram2001\3015.vss”);
int pageindex = 0;

// get page by index
Page page = diagram.Pages[pageindex];
// retrieve page’s statistics
double pagewidth = page.PageSheet.PageProps.PageWidth.Value;
double pageheight = page.PageSheet.PageProps.PageHeight.Value;
double pageleftmargin = page.PageSheet.PrintProps.PageLeftMargin.Value;
double pagerightmargin = page.PageSheet.PrintProps.PageRightMargin.Value;
double pagetopmargin = page.PageSheet.PrintProps.PageTopMargin.Value;
double pagebottommargin = page.PageSheet.PrintProps.PageBottomMargin.Value;

int mastercount = 0;
// lets place master shapes with same width and height as 2
// here 2 is the width of master shape
// e.g. if cols is 4, then we can place 4 shapes in a row
int cols = ((int)Math.Floor(pagewidth - pageleftmargin - pagerightmargin)) / 2;
// here 2 is the height of master shape
int rows = ((int)Math.Floor(pageheight - pagetopmargin - pagebottommargin)) / 2;

// here 1 is the half of master shape’s width
double pinx = pageleftmargin + 1;
// here 1 is the half of master shape’s height
double piny = pageheight - 1 - pagetopmargin;

foreach (Master master in diagram.Masters)
{
long shapeid = 0;
if (mastercount < cols)
shapeid = diagram.AddShape(pinx + mastercount*2, piny, 2, 2, master.Name, pageindex);
else
{
mastercount = 0;
piny = piny - 2;
rows = rows - 1;
if (rows == 0)
break;
shapeid = diagram.AddShape(pinx + mastercount * 2, piny, 2, 2, master.Name, pageindex);
}
Aspose.Diagram.Shape shape = diagram.Pages[pageindex].Shapes.GetShape(shapeid);
shape.Text.Value.Add(new Txt(master.Name));
mastercount = mastercount+1;
}
diagram.Save(@“C:\Diagram\testdiagram2001\Output.pdf”, SaveFileFormat.PDF);

Thank you for giving this sample code. I actually didn’t expect you to do algorithm work yourself, so thanks for working with me here.


I get a really funny looking PDF from the code above. I attached the output PDF that was generated with Aspose.Diagram 17.3.0. Did you run the code on the 3015.vss file and get different results?

Hi Per,


Thank you for the details. When you will save drawing in the VDX format, it looks perfect. However, on saving in the PDF format, it renders shapes partially. We have logged this problem under ticket ID DIAGRAMNET-51171 in our bug tracking system.
spurgeon:
Also, from your bitmap output code above where you showed how to resize and then output the bitmap, it doesn’t resize the shape for the example you showed. All it does is add whitespace padding to the output PNG. I attached output examples so you can see what I mean from sample code below:
We managed to replicate the same problem on our side. It has been logged under ticket ID DIAGRAMNET-51172 in our bug tracking system. Your post has also been linked to these tickets. We shall let you know once a significant progress has been made in this regard. We are sorry for the inconvenience caused.

Thanks for your continued support.

Ultimately, I have a customer who does not have Visio but wants to be able to view .vss (and .vssx) stencils with each stencil having an icon and label, and I haven't been able to find a solution to this yet. The view from the Visio 2016 stencil viewer (I've attached a screenshot of it) is an example of the layout I'm trying to achieve, rendered as a PDF. I would also accept bitmap (PNG/JPEG) output at this point. If you have a way that I could achieve this with your API, please let me know.

With whatever issues you've identified for fix, can you please make sure that I have the ability to render stencils and their names as text labels to a non-Visio format, preferably PDF?

Lastly, I tried outputting VDX, VSDX, PDF, and PNG files. Each of the renderings is different (the VDX and VSDX files are shown in Visio 2016). Also, only 20 icons are shown, whereas I believe there are 300 in the 3015.vss file.

Hi Per,


Thank you for the details. To achieve the requirement, you do not need to change the width and height of a shape. When you are setting the width and height of a shape, it does not properly render shapes in non-Visio formats. You can add text to a shape, and then formulate the position of shape’s text. Please modify the code which is already shared in an earlier post as below:

[.NET, C#]
<span class=“rem” style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// place a shape in the drawing <br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// here we are not passing width and height parameters<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
<span class=“kwrd” style=“color: rgb(0, 0, 255); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>long<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> shapeID = diagram.AddShape(0, 0, “100BaseT hub”, 0);<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
Aspose.Diagram.Shape shape = srcPage.Shapes.GetShape(shapeID);<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
<span style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// setting shape’s text as master name
<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>shape.Text.Value.Add(<span class=“kwrd” style=“color: rgb(0, 0, 255); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>new<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> Txt(shape.Master.Name));<br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span class=“rem” style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// set text position<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
shape.TextXForm.TxtPinX.Ufe.F = “Width+TxtWidth/2”;<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
shape.TextXForm.TxtPinY.Ufe.F = “Height+TxtHeight/2”;

Once you save icons in the PNG format, then please use Aspose.Pdf for .NET API to generate a new PDF. You can place icons in the tabular form, and store PDF in the local memory. Please refer to these help topics: Add Image to an Existing PDF and Add Image to a Table’s Cell

Thanks, but I don’t see the text labels on the output PNGs. Is this because you trim the page size to the shapeWidth and shapeHeight and it clips the text? Can you please provide the complete code sample and verify the output?


Unfortunately, we can’t use the Aspose.Pdf API in our application because we cannot add a 26MB dll, so we’ll have to find another method, or wait for fixes to the Aspose.Diagram library.
I'm going to close this thread from my end, meaning that, at this point, I don't need text labels to be printed next to stencil icons before outputting them to individual PNG files. Also, ticket ID IMAGINGNET-2275 is a low priority for me. I have found another solution where I can output the stencils as PNGs and then view the list of PNGs in an image thumbnail viewer. This solution will work for the 3015.vss file that I referenced, although I've found bugs when trying to output stencils from several other .vss files (0 byte PNG outputs).

I would still like to be able to render stencils placed in a diagram to PDF at some point, but this thread has just become fatiguing at this point. There just seem to be a lot of bugs and limitations for rendering stencils to non Visio formats.

Hi Per,


Thank you for the details.
spurgeon:
Also, only 20 icons are shown, whereas I believe there are 300 in the 3015.vss file.
In the code example, we are placing shapes in a single page. If there is no more space on the page to place a shape, then it stops placing any other shape. However, we can remove this check to render shapes in multiple pages. It is not an issue.

We have raised the priority of ticket ID DIAGRAMNET-51171 because it is about rendering the incomplete shapes in the PDF format. We shall let you know once a significant progress has been made in this regard.

Hi Per,


In reference to the ticket ID DIAGRAMNET-51172, please try the code below. I have attached an output image for your kind reference:

[.NET, C#]
<span style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// create a new drawing
<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>Diagram diagram = <span class=“kwrd” style=“color: rgb(0, 0, 255); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>new<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> Diagram();<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
<span class=“rem” style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// add master from an existing stencil <span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
diagram.AddMaster(@“C:\Diagram\3015.vss”, “100BaseT hub”);<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
<span class=“rem” style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// get Visio page <span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
Aspose.Diagram.Page srcPage = diagram.Pages[0];<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
<span class=“rem” style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// remove background page <span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
srcPage.BackPage = <span class=“kwrd” style=“color: rgb(0, 0, 255); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>null<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>;<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
<br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span class=“rem” style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// place a shape in the drawing <span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
<span class=“kwrd” style=“color: rgb(0, 0, 255); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>long<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> shapeID = diagram.AddShape(0, 0, “100BaseT hub”, 0);<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
Aspose.Diagram.Shape shape = srcPage.Shapes.GetShape(shapeID);<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
<br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span class=“rem” style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// resize shape <span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
shape.SetWidth(2 * shape.XForm.Width.Value);<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
shape.SetHeight(2 * shape.XForm.Height.Value);<br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span class=“rem” style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// move shape to the origin corner <span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
<span class=“kwrd” style=“color: rgb(0, 0, 255); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>double<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> shapeWidth = shape.XForm.Width.Value;<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
<span class=“kwrd” style=“color: rgb(0, 0, 255); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>double<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> shapeHeight = shape.XForm.Height.Value;<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
shape.MoveTo(shapeWidth * 0.5, shapeHeight * 0.5);<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>shape.Foreign.ImgWidth.Value = shapeWidth;<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>
shape.Foreign.ImgHeight.Value = shapeHeight;<br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
<span class=“rem” style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// trim page size <span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
srcPage.PageSheet.PageProps.PageWidth.Value = shapeWidth;<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
srcPage.PageSheet.PageProps.PageHeight.Value = shapeHeight;<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
<br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span class=“rem” style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// specify saving options <span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
ImageSaveOptions opts = <span class=“kwrd” style=“color: rgb(0, 0, 255); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>new<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> ImageSaveOptions(Aspose.Diagram.SaveFileFormat.PNG);
<span class=“rem” style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// set page count to save <span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
opts.PageCount = 1;<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
<span class=“rem” style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// set starting index of the page <span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
opts.PageIndex = 0;<br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span class=“rem” style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// save it <span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
diagram.Save(@“C:\Diagram\Output.png”, opts);
<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>

Hi Per,


Thank you for being patient. In reference to the ticket ID DIAGRAMNET-51171, our product team has plans to resolve it in the next month. It depends upon if everything goes by plan. We shall let you know in this forum thread once it is resolved.

Thanks, the code for scaling the shapes and then saving to bitmaps seems to work (DIAGRAMNET-51172), and therefore DIAGRAMNET-51171 is a lower priority to me at this point than the other open tickets (51182, 51183, 51184, 51185, 51186). I show how I’m creating 96x96px thumbnails while maintaining the aspect ratio in the code below.

Some .vss and .vssx files render pretty well to thumbnails using the code, but some do not. Do you know why some thumbs don’t render well? Attached are a couple of .vssx files from the Visio 2016 stencils library, as well as some other .vss files where I’ve seen rendering issues.

public string GetSafeFilename(string filename)
{
return string.Join(" ", filename.Split(Path.GetInvalidFileNameChars()));
}

public int GenerateStencilsImages(String inputPath, String outputDir)
{
try
{
diagram = new Diagram(inputPath);
if (diagram == null)
{
return -1;
}
}
catch (Exception e)
{
return -1;
}

int i = 0;
foreach (Master master in diagram.Masters)
{
try
{
i++;
string tempfile = outputDir + “\” + GetSafeFilename(master.Name) + “.png”;
// create a new drawing
Diagram stencil = new Diagram();

// add master from an existing stencil
stencil.AddMaster(diagram, master.Name);

// get Visio page
Aspose.Diagram.Page srcPage = stencil.Pages[0];

// remove background page
srcPage.BackPage = null;

// place a shape in the drawing
long shapeID = stencil.AddShape(0, 0, master.Name, 0);
Aspose.Diagram.Shape shape = srcPage.Shapes.GetShape(shapeID);
double w = 0;
double h = 0;
FitToBox(shape.XForm.Width.Value, shape.XForm.Height.Value, 1, 1, ref w, ref h); // .5 seems to be 48px when exported, 1=96px

// resize shape
shape.SetWidth(w);
shape.SetHeight(h);

// move shape to the origin corner
double shapeWidth = shape.XForm.Width.Value;
double shapeHeight = shape.XForm.Height.Value;

shape.MoveTo(shapeWidth * 0.5, shapeHeight * 0.5);
shape.Foreign.ImgWidth.Value = shapeWidth;
shape.Foreign.ImgHeight.Value = shapeHeight;
// trim page size
srcPage.PageSheet.PageProps.PageWidth.Value = shapeWidth;
srcPage.PageSheet.PageProps.PageHeight.Value = shapeHeight;
// specify saving options
Aspose.Diagram.Saving.ImageSaveOptions opts = new Aspose.Diagram.Saving.ImageSaveOptions(SaveFileFormat.PNG);
// set page count to save
opts.PageCount = 1;
// set starting index of the page
opts.PageIndex = 0;
// save it
stencil.Save(tempfile, opts);
}
catch (Exception e)
{
[//sMessageBox.Show](https://smessagebox.show/)("Exception: " + e.Message);
continue;
}
}
return 1;
}

private void FitToBox(double width, double height, double maxWidth, double maxHeight, ref double outWidth, ref double outHeight)
{
double widthRatio, heightRatio, multiplier;
if(maxWidth == -1) {
widthRatio = 1;
} else {
widthRatio = (1.0 * maxWidth) / (1.0 * width);
}
if(maxHeight == -1) {
heightRatio = 1;
} else {
heightRatio = (1.0 * maxHeight) / (1.0 * height);
}
if(widthRatio < heightRatio) {
multiplier = widthRatio;
} else {
multiplier = heightRatio;
}
double newWidth = width;
double newHeight = height;
if(multiplier < 1) {
newWidth = multiplier * width;
newHeight = multiplier * height;
}
outWidth = newWidth;
outHeight = newHeight;
}

Hi Per,


Thank you for sending stencil files. We are testing all your stencil files and shall get back to you soon. Please spare us a little time.

Hi Per,

Thank you for being patient. We have logged tickets in our bug tracking system as below:

File Name: FPVALV_M.vssx
DIAGRAMNET-51208: Incomplete rendering of icons from a VSSX Stencil
DIAGRAMNET-51209: An error occurred on saving a drawing in PNG

File Name: Gridstore.vss
DIAGRAMNET-51210: An error occurred on saving a drawing in PNG
DIAGRAMNET-51211: Incomplete rendering of icons from a VSS Stencil

File Name: VEHICL_VISIO2013_M.vssx
DIAGRAMNET-51212: Incomplete rendering of icons from a VSSX Stencil

In reference to the Visio drawing "Generic-Title-Blocks.vss", Aspose.Diagram for .NET API supports 2003 or higher versions of Visio. Please save your file in 2003 or higher VSS format, and then you will be able to import your stencil into Aspose.Diagram API.

Hi Per,


Thank you for being patient. We have a good news for you that the ticket ID DIAGRAMNET-51210 has been resolved. If there is no issue in the quality assurance phase, then this fix will be included in the next version 17.4.0 of Aspose.Diagram for .NET API. We shall inform you via this forum thread as soon as the new release is published.

Thanks for fixing that issue. Of the remaining issues, below is my prioritized list in order of priority. All except 51160 are important to me. The top group is something I need for a customer as soon as possible. I know there’s a lot here, but do you have an idea of which of these, if any, I might expect fixed in 17.4.0?


DIAGRAMNET-51182: Missing shapes on converting a VSD to PDF
DIAGRAMNET-51183: Displaced shapes on converting a VSD to PDF
DIAGRAMNET-51185: Displaced shapes on converting a VSD to PDF
DIAGRAMNET-51186: Incorrect layout of the meta type shapes on converting a VSD to PDF

DIAGRAMNET-51171: Incorrect rendering of VSD to PDF (stencils output)
DIAGRAMNET-51184: Incomplete boundary of the meta type shapes on converting a VSD to PDF

DIAGRAMNET-51208: Incomplete rendering of icons from a VSSX Stencil
DIAGRAMNET-51209: An error occurred on saving a drawing in PNG
DIAGRAMNET-51211: Incomplete rendering of icons from a VSS Stencil
DIAGRAMNET-51212: Incomplete rendering of icons from a VSSX Stencil

DIAGRAMNET-51160: Icons with wrong color on PNG export

Hi Per,


Thank you for the inquiry. All the listed ticket IDs have just been identified. Our product team is analyzing the root cause of each problem. The preparation of next version 17.4.0 is also in-progress which is expected to be released in the next couple of weeks. It is difficult for us to incorporate any other fix in the upcoming release. However, we are in communication with our product team. We shall let you know if they can include any other fix.

Hi Per,


Thank you for being patient. We have resolved the ticket ID DIAGRAMNET-51209, after the quality assurance phase, it will be included in the next version 17.4.0 of Aspose.Diagram for .NET API. Our product team has plans to include the fixes of ticket IDs DIAGRAMNET-51182 and DIAGRAMNET-51184 in the next version 17.4.0, however, these two tickets are not resolved yet. We shall let you know once a significant progress has been made in this regard.

The issues you have found earlier (filed as DIAGRAMNET-51209;DIAGRAMNET-51210) have been fixed in Aspose.Diagram for .NET 17.4.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.