You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Excel-to-PDF-Converter-Settings.md
+84-1Lines changed: 84 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2234,4 +2234,87 @@ End Namespace
2234
2234
{% endhighlight %}
2235
2235
{% endtabs %}
2236
2236
2237
-
A complete working example to skip warning in Excel to PDF in C# is present on [this GitHub page](https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/Excel%20to%20PDF/Warnings/.NET/Warnings).
2237
+
A complete working example to skip warning in Excel to PDF in C# is present on [this GitHub page](https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/Excel%20to%20PDF/Warnings/.NET/Warnings).
2238
+
2239
+
## Show File Name with Extension in Header and Footer
2240
+
2241
+
This property allows you to display the file name along with its extension in the header and/or footer when converting an Excel document to PDF. It's default value is FALSE.
2242
+
2243
+
The following code snippet explains how to enable the <ahref="https://help.syncfusion.com/cr/document-processing/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverterSettings.html#Syncfusion_ExcelToPdfConverter_ExcelToPdfConverterSettings_ShowFileNameWithExtension">ShowFileNameWithExtension</a> property during Excel to PDF conversion.
Using excelEngine As ExcelEngine = New ExcelEngine()
2298
+
Dim application As IApplication = excelEngine.Excel
2299
+
application.DefaultVersion = ExcelVersion.Xlsx
2300
+
Dim workbook As IWorkbook = application.Workbooks.Open("InputTemplate.xlsx")
2301
+
2302
+
'Initialize ExcelToPdfConverterSettings
2303
+
Dim settings As ExcelToPdfConverterSettings = New ExcelToPdfConverterSettings()
2304
+
2305
+
'Enable ShowFileNameWithExtension property
2306
+
settings.ShowFileNameWithExtension = True
2307
+
2308
+
'Load the Excel document into ExcelToPdfConverter
2309
+
Dim converter As ExcelToPdfConverter = New ExcelToPdfConverter(workbook)
2310
+
2311
+
'Convert the Excel document to PDF with converter settings
2312
+
Dim document As PdfDocument = converter.Convert(settings)
2313
+
2314
+
'Save the PDF document
2315
+
document.Save("Output.pdf")
2316
+
End Using
2317
+
{% endhighlight %}
2318
+
{% endtabs%}
2319
+
2320
+
A complete working example demonstrating how to enable the <ahref="https://help.syncfusion.com/cr/document-processing/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverterSettings.html#Syncfusion_ExcelToPdfConverter_ExcelToPdfConverterSettings_ShowFileNameWithExtension">ShowFileNameWithExtension</a> property during Excel to PDF conversion in C# is present on <ahref="https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/Excel%20to%20PDF/Show%20file%20name%20with%20extension%20in%20PDF/.NET/ShowFileNameWithExtension">this GitHub page</a>.
0 commit comments