New: PDF/A-3b conversion with a compliance report included.See Docs

Save an Excel Worksheet as a One-Page PDF Using PDF.co

10 Minutes Read

Use PDF.co’s API Tester to convert an Excel worksheet into a single-page PDF.

Step 1: Prepare the Worksheet

Open your workbook in desktop Excel and select the worksheet you want to convert.

Under Page Layout, open Page Setup and configure:

  • Paper size: Choose your preferred size, such as A4.
  • Orientation: Choose Portrait or Landscape.
  • Scaling: Select Fit to and set 1 page wide by 1 page tall.

Check the print preview, then save the workbook as an XLSX file. These settings scale the worksheet to one page. See Microsoft’s fit-to-one-page instructions.

Step 2: Open the API Tester

Sign in to your PDF.co account, then open the Excel to PDF API Tester.

Select Try it and provide your PDF.co API key in the x-api-key authorization field when prompted.

The endpoint is:

POST https://api.pdf.co/v1/xls/convert/to/pdf

Step 3: Configure the Conversion

Provide an accessible URL for your saved workbook. You can also upload the workbook to PDF.co’s file storage and use its file link.

Configure the request:

{
  "url": "YOUR_EXCEL_FILE_URL",
  "worksheetindex": "1",
  "name": "worksheet-one-page.pdf",
  "autosize": false,
  "async": false
}

Replace YOUR_EXCEL_FILE_URL with your workbook’s link.

The worksheetindex value selects one worksheet; numbering starts at 1. Setting autosize to false uses the worksheet’s saved page setup rather than automatically adjusting the PDF page dimensions. The API Tester describes these settings.

Step 4: Run and Download

Submit the request and open the url returned in the response.

Confirm that the PDF contains one page and that the text remains readable. Download the file before its temporary output link expires.

In this tutorial, you learned how to save an Excel file as a PDF on one page using PDF.co Web API.

Related Tutorials

See Related Tutorials