Page size etc. when rendering

Hello team,



I have converted 0_28.vsd to 0_28.pdf with Aspose.Diagram. Pease find error point with attachied files

1) “(” shows up.

2) Page size of PDF becomes A1(840 x 594mm) (In spite of Vsd’s page size is A3)





This is my code.

------------

public static MemoryStream ConvertDocumentToPdfStream(string docName, MemoryStream docStream)

{

MemoryStream pdfStream = new MemoryStream();



try

{

// Instantiate the License class

Aspose.Diagram.License license = new Aspose.Diagram.License();

license.SetLicense(“Aspose.Total.lic”);



// Convert .ppt and .pptx file to PDF.

Diagram diagram = new Diagram(docStream);

diagram.Save(pdfStream, Aspose.Diagram.Saving.SaveOptions.CreateSaveOptions(SaveFileFormat.PDF));

return pdfStream;

}

finally

{

}

}

------------

Thank you,

PFU DSOL2

Hi,


Thank you for contacting support. We managed to replicate the problem of incorrect page size. It has been logged under ticket ID DIAGRAMNET-51248 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates. We are sorry for the inconvenience caused.
PFU.DSOL2:
1) “(” shows up.
Please highlight this issue with the help of a screenshot. Your response is awaited.

Hello team,



Thank you for your support.



I have pointed with an arrow.



Thank you,

PFU DSOL2

Hi,


Thank you for contacting support. We managed to replicate the problem of an additional left parenthesis. It has been logged under the ticket ID DIAGRAMNET-51250 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates. We are sorry for the inconvenience caused.

In reference to the ticket ID DIAGRAMNET-51248, Microsoft Visio application is also saving the PDF with the same page size: 84cm * 59cm. Aspose.Diagram API mimics the behavior of Microsoft Visio application.

PS: we have closed this issue as ‘‘Won’t Fix’’.

Hi,


Thank you for being patient. We have resolved the ticket ID DIAGRAMNET-51250. If there is no issue in the quality assurance phase, then this fix will be included in the next version 17.6 of Aspose.Diagram for .NET API. We will notify you in this thread as soon as the new release is published.

Hello team,



Thank you for your support.



Regarding page size, I understand Aspose API behaves as with MS Visio when converting pdf.



I have another question.



I have attached pdf_print.png which is print setting of 0_28.pdf with Adobe reader.

You will be able to see the page size is 297.01 x 210.02 mm. It means A4 size.



I understand the page size is A4 because MS Visio also outputs the pdf the print’s page size of which is A4.



I have attached viso_print.png which is print setting of 0_28.vsd with MS Visio.

You will be able to see the page size is A3(29.7cm x 42cm).



I would like the function takes over pdf’s print page size from vsd file’s print page size.

I am happy if the page size of 0_28.pdf is A3 which takes over vsd’s print page size.

Do you have that kind of function?



Thank you,

PFU DSOL2

Hi,


Thank you for contacting support. You can modify the page size of a Visio drawing by using the following code:

[.NET, C#]
// load a drawing
Diagram diagram = new Diagram(@“C:\AD\Drawing1.vsdx”);
// get Visio page
Aspose.Diagram.Page srcPage = diagram.Pages[0];

// modify page size, in inches
srcPage.PageSheet.PageProps.PageWidth.Value = 8.5;
srcPage.PageSheet.PageProps.PageHeight.Value = 11.69;

diagram.Save(@“c:\AD\Output.pdf”, SaveFileFormat.PDF);

Hi,

Thank you for being patient. In reference to the ticket ID DIAGRAMNET-51250, please download and try this latest Hotfix version: Aspose.Diagram for .NET 17.5.1. Please also let us know how that goes on your side.

Hello Team,



Thank you for your support



Does ASPOSE API have the function to get page size of print settings of Visio.

In the case of attached file, I would like to get A3 or 29.7x42 with Aspose API.



Thank you,

PFU DSOL2

Hi,


Thank you for the inquiry. There is no way to retrieve the page size as available in the print settings. We have logged a feature request under the ticket ID DIAGRAMNET-51271 in our issue tracking system. We will let you know once a significant progress has been made in this regard. We are sorry for the inconvenience caused.

Hi,


Thank you for being patient. In reference to the ticket ID DIAGRAMNET-51271, the PaperKind property in the print properties section of the Shapesheet specifies the type of paper on which to print the page. Please use the following code:

[C#]
<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>System.Drawing.Printing.PaperKind paper = <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);”> System.Drawing.Printing.PaperKind();
<span class=“rem” style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// load a Visio 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(@“C:\Diagram\test2108\Drawing1.VSDX”);
<span style=“color: rgb(0, 128, 0); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>// retrieve the size of printing paper<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, 0);”>paper = (PaperKind)diagram.Pages.GetPage(“Page-1”).PageSheet.PrintProps.PaperKind.Value;<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;”>// display the paper size
<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>Console.WriteLine(paper.ToString());
<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
PS: we have closed this ticket (DIAGRAMNET-51271).

@PFU.DSOL2,
In reference to the ticket ID: DIAGRAMNET-51248, the page size is A3 in the Microsoft Visio 2010 ( the same is the case with 2016)
Snapshot: Screenshot by Lightshot

The page size of the output PDF from Microsoft Visio application, after selecting the actual page size option in the left pane is A1.
Snapshot: Screenshot by Lightshot

Aspose.Diagram for .NET API mimics the behavior of the Microsoft Visio application. We have come to conclusion that we will not fix it.

Best Regards,
Imran Rafique