Thanks for your spec request!
Spec:
1) Your full code and input file that can reproduce your issue:
code:
- Code: Select all
/// <summary>
/// Report template
/// </summary>
/// <param name="pPath">path file</param>
/// <param name="pObjReportReq"></param>
/// <returns>true</returns>
private async Task<string> ExportPdfTemp(string pPath, ReportExportDTO pObjReportReq)
{
string strReportPath = string.Empty;
if (File.Exists(pPath))
{
_Worksheet = null;
Workbook workbook = new Workbook();
// path file: BUG-0228-02-Suginami-ku_NG.xlsx
workbook.LoadTemplateFromFile(pPath);
MemoryStream stream = new MemoryStream();
workbook.SaveToStream(stream);
workbook.Dispose();
Workbook wbExport = new Workbook();
wbExport.LoadFromStream(stream);
stream.Flush();
stream.Dispose();
// export pdf
strReportPath = $"{strPathExportPdf}/Template12_{DateTime.Now.Ticks}.pdf";
wbExport.CalculateAllValue();
wbExport.SaveToFile(strReportPath, Spire.Xls.FileFormat.PDF);
}
return strReportPath;
}
input file:
File: BUG-0228-02-Suginami-ku_NG.xlsx
(position error: AY56, BA56, BA71, BA90, BA106 orientation to vertical).
Spec:
2) Your application type, such as Console App .NET Framework 4.8:
Application type: Console Application.
Target framework: .Net Core 3.1.
Spec:
3) Your test environment, such as OS info (E.g., Windows 10 64 bit) and device’s memory:
Environment: Windows 10 64 bit, Intel(R) Core(TM) i3-9100 CPU, 16.0 GB RAM.