QPDF is needed (error package)

Hello,

I'm currently creating a package on rstudio for a shiny project.
When I launch the "check" button to do a check, an error still remains:

"qpdf is needed for checks on size reduction of pdfs"

However I don't have a .pdf file in my package, the "qpdf" package is present and active when I launch my check. I was advised to download "qpdf" on sourceforge and to place it in my documents but it doesn't change anything... my error is still present and keeps me from sharing my package.
I noticed that "qpdf" is linked to the "rcpp" package and I already had a problem with it (rcpp). Indeed, I had to take a previous version to the update because another of my projects didn't work anymore with the "rcpp" update.

Do you know how to fix this error which doesn't go away and prevents me from sharing my package which is the finality of my project ?

I thank you.

4 Likes

Hello,
did you find the solution to your problem ?
I meet the same problem, not creating any PDF docs...
It didn't happen as I was working on R 3.6, on Ubuntu 18.04
Last week, I changed to R 4.0 on Ubuntu 20.04, and the problem has appeared !
And for my colleage, who is working on Windows, with both versions of R, has the warning with the 2 versions...
And I haven't found the reason yet ...
If you have and information, I'm interested in.
Thanks in advance
Thierry

I can confirm that I see this warning when I check a package with R 4.0.2 on Windows 10:

* checking for unstated dependencies in examples ... OK
WARNING
'qpdf' is needed for checks on size reduction of PDFs         

However, note that this a warning, not an error. You can ignore this warning. It shouldn't affect your ability to share your project.

I think this is due to the following update noted in the release notes for R 4.0:

R CMD check --as-cran now runs \donttest examples (which are run by example() ) instead of instructing the tester to do so. This can be temporarily circumvented during development by setting environment variable _R_CHECK_DONTTEST_EXAMPLES_ to a false value.

So you have multiple options:

  • Ignore the warning (recommended)
  • Create an .Renviron file and add _R_CHECK_DONTTEST_EXAMPLES_=FALSE
  • Don't use the --as-cran flag when running R CMD check. This is unnecessary if you aren't planning on submitting to CRAN. If you do want to submit to CRAN, check your package on the CRAN Windows server with devtools::check_win_release() to confirm the warning does not appear.
2 Likes

I hope the solution underneath can help you!

Oh okay I understand...

Thank you very much that helped me a lot!
I take note of what you told me for the continuation of my project.

I hope this solution will help other people!!

1 Like

Thank you for your answer.
I had tested another solution, by installing qpdf.exe in a shared folder (ie. \rtools40), on Windows.
But, your solution is easier, and more comfortable
Thanks

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.