Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

error stating .OnLoad failed in loadNamespace() for pdftools

Alteryx Alumni (Retired)


When running a workflow that contains a tool that makes use of the pdftools package, it throws up the onLoad failed error.
Error: .onLoad failed in loadNamespace() for 'pdftools', details:


Environment Details

  • Alteryx Designer (All)
  • Alteryx Predictive Tools



There are multiple issues that can cause this, some of which are as follows:

  • A mismatch between Designer and Predictive tools version.
  • Missing pdftools package in the required R Library folder
  • Issues with the Rcpp Installation


Please ensure that you have the correct predictive version installed for your Designer especially if you had this error after upgrading Designer. To get the right Predictive Tools, please click here .

Click on your installed Designer Version, then select the right predictive tools to install based on your Designer(Admin or Non-Admin version). Below is a screenshot showing links from the 2021.3 Designer page.


Once this is taken care of, please follow the steps in the solution below


  1. Find your R Tools Folder
  • Non-Admin:%LOCALAPPDATA%\Alteryx\R-{VERSION}\
  • Admin: C:\Program Files\Alteryx\R-{VERSION}\
  1. Make a backup and delete the Pdftools and Rcpp folders if they exist  
  • Non-Admin:%LOCALAPPDATA%\Alteryx\R-{VERSION}\library\Rcpp
  • Admin: C:\Program Files\Alteryx\R-{VERSION}\library\Rcpp
  • Non-Admin:%LOCALAPPDATA%\Alteryx\R-{VERSION}\library\pdftools
  • Admin: C:\Program Files\Alteryx\R-{VERSION}\library\pdftools
  1. Run the R terminal as an Administrator:
  • Non-Admin:%LOCALAPPDATA%\Alteryx\R-{VERSION}\bin\x64\Rterm.exe
  • Admin: C:\Program Files\Alteryx\R-{VERSION}\bin\x64\Rterm.exe
  1. Reinstall the Rcpp package with the following command:
  • install.packages("Rcpp", type="binary", lib="The_Location_of_package_folder_deleted above")
  • for example install.packages("Rcpp", type="binary",lib="c:\\Program Files\\Alteryx\\R-3.6.3\\library")
  1. Reinstall the pdftools package with the following command:
  • install.packages("pdftools", lib="The_Location_of_package_folder_deleted above")
  1. Restart Designer and run your workflow again

Additional Resources

5 - Atom

Thank you, it worked!


Leandro C.