hello,
I have one issue when convert excel to pdf file on .net platform,
as my excel file is on one sheet, but in generated pdf files, which are four pages, and syle is in confusion, attachments is my related files.
I want to know that if you can tell me what I should set some attribute in order to fix style issue.
The following is my code:
class Program
{
static void Main(string[] args)
{
Workbook workbook = new Workbook(@“D:\Log\input.xlsx”);
//Save the document in Pdf format
workbook.Save(@“D:\Log\Output.pdf”, SaveFormat.Pdf);
}
}
Best wishes,
Wei
files.zip (659.7 KB)
This Topic is created by Amjad_Sahi using the Email to Topic plugin.
@mouweixingxiang,
Thanks for the template file and output PDF file.
I did test your issue a bit and it looks like missing fonts issue. Could you please provide us font files used in the workbook, you may zip all the fonts files (.ttf) and attach the zip file, we will check it soon.
@david_mou,
The forums allow that the attached file should not be greater than 3MB. If individual font files’ size (zipped) is less than 3 MB, you may attach it here (you should also attach multiple zip files though). Alternatively, zip all the font files in one file and upload to some file sharing service (e.g Dropbox, Google drive, etc.) and share the Download link here.
hi, Amjad_Sahi
I have already fix the issue, and set some fields about PageSetup, following is my code:
Workbook workbook = new Workbook(@“D:\Log\E-Learning Platform.xls”);
Worksheet worksheet = workbook.Worksheets[0];
worksheet.PageSetup.PaperSize = PaperSizeType.PaperA2;
worksheet.PageSetup.Orientation = PageOrientationType.Landscape;
worksheet.PageSetup.Zoom = 100;
//Save the document in Pdf format
workbook.Save(@"D:\Log\Output.pdf", SaveFormat.Pdf);
Thanks for your attention:slight_smile:
@david_mou,
Good to know that your have sorted it out. Feel free to write us back if you have further comments or questions, we will be happy to assist you soon.