title: Saving Excel as PDF fitting everything into one page not working
body: <p>As part of the project, I need to save some range of Excel cells as a PDF file, still making everything fit in one page. If there are more data than fit to one page, it needs to be nicely trimmed and go to the 2nd page.</p>
  <p>My code saves an Excel file as PDF, but there are 8 pages now, and the data are displayed big and there is a lot of blank spaces around each edge of the page.
  Also, not all columns are fit in one page. It is like the first page has column A through column G, and later in other pages, I see column H through column M, but this is not what I want.</p>
  <pre><code>var excelPath = &quot;My Excel file path.xlsx&quot;;    //Excel file path
  var pdfPath = &quot;My PDf file path.pdf&quot;;  //Pdf file path
  var sheetName = &quot;25. Data&quot;;  //Excel sheet name to get data from 
  var printRange = &quot;A1:M70&quot;;  //Area that needs to be included in PDF
  
  Microsoft.Office.Interop.Excel.Application app = new Microsoft.Office.Interop.Excel.Application();
  var wb = app.Workbooks.Open(excelPath);
  
  Microsoft.Office.Interop.Excel.Worksheet ws = (Microsoft.Office.Interop.Excel.Worksheet)wb.Worksheets[sheetName];
  ws.PageSetup.Orientation = xlPageOrientation.xlLandscape;
  ws.PageSetup.PrintArea = printRange;
  ws.PageSetup.FitToPagesWide = 1;
  ws.PageSetup.FitToPagesTall = false;
  wb.ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, pdfPath);
  </code></pre>
  <p>Can someone tell me what is wrong with this code??</p>