Hello Aspose,
I am trying to convert ms Excel files to PDF on the environment Docker + Linux (Ubuntu 18.04.5 LTS).
Among the outputs, I can find at least one image in which text corruption arises.
Besides, I can find an image which has become all white.
Could you please teach me how to resolve these phenomena?
I put the script which I wrote below.
As for the input file, it takes much time to prepare for you because of a certain reason.
String filepath = args[0];
String filename = Path.GetFileName(args[0]);
// Make directories
Directory.CreateDirectory(args[1] + "/" + filename);
String txt_outpath = args[1] + "/" + filename + "/" + "txt";
String pdf_outpath = args[1] + "/" + filename + "/" + "pdf";
Directory.CreateDirectory(txt_outpath);
Directory.CreateDirectory(pdf_outpath);
// Open an Excel file
Workbook workbook = new Workbook(filepath);
// Set Fonts folder
Aspose.Cells.FontConfigs.SetFontFolder("../data/Fonts", false);
// Save the entire file as PDF
workbook.Save(args[1] + "/" + filename +"/"+ "result.pdf", Aspose.Cells.SaveFormat.Pdf);
for (int j = 0; j < workbook.Worksheets.Count; j++)
{
Worksheet ws = workbook.Worksheets[j];
// Save each sheet as PDF
workbook.Save(pdf_outpath +"/"+ ws.Name + ".pdf", Aspose.Cells.SaveFormat.Pdf);
//Text save options
TxtSaveOptions opts = new TxtSaveOptions();
opts.Separator = Convert.ToChar(" ");
workbook.Save(txt_outpath +"/"+ ws.Name + ".txt", opts);
if (j < workbook.Worksheets.Count - 1)
{
workbook.Worksheets[j + 1].IsVisible = true;
workbook.Worksheets[j].IsVisible = false;
}
}