Include page name when saving to PDF

How do I include the name of each page in the Visio diagram when saving to PDF? The pages are all rendered to the PDF but the names shown on each tab of the viewer are not included in the PDF anywhere.


Thank you.

Hi Jeff,


Thank you for contacting support. Please note that Aspose.Diagram API mimics the behavior of Microsoft Office Visio. Could you please clarify where we could notice Visio page tab names in the PDF document when we convert through the Microsoft Office Visio? Please highlight it with the help of a screenshot.

We’re looking forward to help you.

Attaching screenshot showing how scripting value “&n” can be added to header/footer to show the page name. When I add a headerleft value of “&n” using Aspose it appears in the properties of the Diagram but does not appear in the PDF. If I use Visio to do this and [Save as] PDF the page name appears in the header of each PDF page.


Dim license As Aspose.Diagram.License = New Aspose.Diagram.License
license.SetLicense(“Aspose.Total.lic”)
Dim options As New Aspose.Diagram.LoadOptions()
[Enum].TryParse(Of Aspose.Diagram.LoadFileFormat)(inpath.Substring(inpath.LastIndexOf(".") + 1), True, options.LoadFormat)
Dim diagram As New Diagram
Try
diagram = New Diagram(inpath, options)
Catch ex As Exception
If ex.Message.ToLower().Contains(“not supported”) Then
Throw ex
End If
End Try
Using pdfStream As New MemoryStream()
Dim saveoptions As Aspose.Diagram.Saving.SaveOptions = Aspose.Diagram.Saving.SaveOptions.CreateSaveOptions(SaveFileFormat.PDF)
diagram.HeaderFooter.HeaderLeft() = "&n " & diagram.HeaderFooter.FooterLeft()
diagram.Save(pdfStream, saveoptions)
Using pdfFileStream As New FileStream(outpath, FileMode.Create, FileAccess.Write)
pdfStream.WriteTo(pdfFileStream)
pdfFileStream.Close()
End Using
pdfStream.Close()
End Using

Hi Jeff,


Thank you for contacting support. We managed to replicate this issue and have logged under ticket id DIAGRAMNET-50372 in our issue tracking system. It appears a generic issue. However, we recommend to provide your problematic Visio diagram in this forum thread. It will be confirmation purposes. We have linked you post and will keep your informed regarding any available updates. We’re sorry for the inconvenience caused.

Yes, I agree this is a generic issue not specific to a particular file. I have attached the document I cited in the screenshot example.


You may want to expand your allowed file types to include .vsd. I put it in a .zip file so I could upload it. Trying to attach a Visio file I get this message:

Only files with the following extensions are allowed: zip,cab,jpg,gif,png,mpg,mpeg,avi,wmv,wma,mp3,ra,rar,rm,sql,txt,xls,doc,pdf,rdl,ppt,docx,xlsx,pptx,xlsm,tif,rtf,dot,xml,odt,odp,jrprint,ods,csv,xsn,xps,7z,XPS,OXPS. Please select a valid file.

Thank you,
Jeff

Hi Jeff,


Thank you for providing the source Visio diagram. We have logged it against the ticket id DIAGRAMNET-50372. We already know these attachment limitations, it is due the security perspectives. However, we’ll let you know once a significant progress has been made regarding ticket id DIAGRAMNET-50372.

Hi Jeff,

Thank you for being patient. We have a good news for you that the issue id DIAGRAMNET-50372 has now been resolved. If there is no issue in the QA phase, then this fix will be included in the next version of Aspose.Diagram for .NET 5.1.0. We'll inform you via this forum thread as soon as the new release is published.

The issues you have found earlier (filed as DIAGRAMNET-50372) have been fixed in this update.


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

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan