Quantcast
Channel: Getting Started with Advanced Calculations Archives - Plugin Republic
Viewing all articles
Browse latest Browse all 4

How to retrieve the page count of an uploaded PDF

$
0
0

You can now access the page count for a PDF upload in your calculations by using this tag: {field_xxx_pdf_count}

Note that you will need the Pro version of Add-Ons Ultimate and the Advanced Uploads extension to retrieve an uploaded PDF’s page count.

The first step is to enable the feature by going to WooCommerce > Settings > Product Add-Ons > Uploads. Enable these settings and click ‘Save changes’.

  • Enable PDF uploads
  • Enable PDF page count

Then, create the following fields.

An Upload field which now accepts a PDF file. You will need to disable ‘Allow multiple uploads’ as the calculation will only read 1 file.

Upload field settings

Create a Calculation field that will reference the Upload field. When a PDF file is uploaded, the calculation will retrieve the number of pages.

Calculation field setting

The post How to retrieve the page count of an uploaded PDF appeared first on Plugin Republic.


Viewing all articles
Browse latest Browse all 4