Flutter: MissingPluginException(No implementation found for method printPdf on channel net.nfet.printing)

2.3k Views Asked by At

guys! I am developing a desktop POS application for a shop. The application should have a feature to print some docs and barcodes. I have used pdf package to generate pdfs, but I am having a trouble with installing and using the priting package on Windows.

The main problem is with isntallation. In the docs, it says you should add the following lines in

CMakeLists.txt

file:

...
set(PDFIUM_VERSION "4929" CACHE STRING "" FORCE)
set(PDFIUM_ARCH "x64" CACHE STRING "" FORCE)
...
  1. I am very confused in which CMakeLists.txt I shall put, because flutter's windows folder includes multiple files with the same name and extension. (windows\CMakeLists.txt, windows\runner\CMakeLists.txt, windows\flutter\CMakeLists.txt)
  2. I have put the same piece of code into these different files, but none of them worked.
  3. It always gives some errors like below: errors

The thing I wanted to accomplish is to just print a generated PDF: code

2

There are 2 best solutions below

0
myturmudi On

I'm having the same issue

What I do is

  • Flutter clean
  • Flutter pub get
  • Uninstall the previous application
  • Run the app again

And it worked

1
DMBikash On

go to your terminal and type the following commands.

  1. Flutter clean
  2. Flutter pub get
  3. now close the app
  4. build the app again hope this works for you. thanks.