packages.flutter icon indicating copy to clipboard operation
packages.flutter copied to clipboard

[native_pdf_renderer] Desktop Support

Open kechankrisna opened this issue 4 years ago • 11 comments

As flutter just release v2 of flutter in stable channel with hotfix, do you have any plan to implement native_pdf_renderer for deskop support? please

kechankrisna avatar Mar 04 '21 12:03 kechankrisna

  • [x] Web: already supported
  • [x] MacOS: already supported
  • [x] Windows: already supported
  • [ ] Linux: #125

About Linux I do not know C / C++ ¯_(ツ)_/¯ About Windows thanks @Jon-Salmon

I would be grateful for any help in this direction

SergeShkurko avatar Mar 04 '21 12:03 SergeShkurko

that is great bro

kechankrisna avatar Mar 04 '21 14:03 kechankrisna

[native_pdf_renderer] v3.1.0 & [native_pdf_view] v4.1.0 with Windows support published

https://pub.dev/packages/native_pdf_renderer/versions/3.1.0 https://pub.dev/packages/native_pdf_view/versions/4.1.0

SergeShkurko avatar Jun 24 '21 06:06 SergeShkurko

Thanks for your work on the project!

Really cool to see PDFs working on Windows but in my tests it seems they appear lower quality than on other platforms, any ideas to improve it?

hillelcoren avatar Sep 05 '21 09:09 hillelcoren

[native_pdf_renderer] v3.1.0 & [native_pdf_view] v4.1.0 with Windows support published

https://pub.dev/packages/native_pdf_renderer/versions/3.1.0 https://pub.dev/packages/native_pdf_view/versions/4.1.0

Building a Windows native app using native_pdf_view: ^5.0.0 with Flutter version

> flutter --version

Flutter 2.10.0 * channel stable * https://github.com/flutter/flutter.git
Framework * revision 5f105a6ca7 (6 days ago) * 2022-02-01 14:15:42 -0800

Engine * revision 776efd2034

Tools * Dart 2.16.0 * DevTools 2.9.2

causes building to fail with

> flutter run -d windows

Launching lib\main.dart on Windows in debug mode...


CMake Error at flutter/ephemeral/.plugin_symlinks/native_pdf_renderer/windows/DownloadProject.cmake:179 (message):

    Build step for pdfium failed: 1


Call Stack (most recent call first):


    flutter/ephemeral/.plugin_symlinks/native_pdf_renderer/windows/CMakeLists.txt:16 (download_project)





    


Building Windows application...



Exception: Unable to generate build files

cdhermann avatar Feb 07 '22 17:02 cdhermann

@cdhermann You will need to add a line to your CMakeLists.txt file as mentioned here: https://github.com/rbcprolabs/packages.flutter/pull/233#issuecomment-970246427

I opened a pull request to fix this in November but it is still waiting to merge

Jon-Salmon avatar Feb 07 '22 19:02 Jon-Salmon

@Jon-Salmon thank you for your quick reply but unfortunately adding set(PDFIUM_VERSION "4634" CACHE STRING "") to .\windows\CMakeLists.txt doesn't change anything; no matter if I insert the line at the beginning or at the end of the file. Running flutter clean and building again doesn't change the behavior.

cdhermann avatar Feb 08 '22 07:02 cdhermann

After compiling it separately with the help of Visual Studio Code I could also use it in my Flutter app

cdhermann avatar Feb 08 '22 07:02 cdhermann

@cdhermann I would advise running flutter build with the --verbose flag so that you can see exactly what is failing as it sounds like it could be something specific to your setup.

Jon-Salmon avatar Feb 09 '22 00:02 Jon-Salmon

After compiling it separately with the help of Visual Studio Code I could also use it in my Flutter app

I also ran into the same problem, how do you end up compiling with vs

fengJCgithub avatar Mar 11 '22 06:03 fengJCgithub

@fengJCgithub, I followed the proposals of Visual Studio Code regarding extensions to install when opening the CMakeLists.txt. Before, I put the lines suggested by @Jon-Salmon at the top of the file.

After that I could follow the instructions given at #233

Since then I haven't tried again because #252 was a show stopper for my project.

cdhermann avatar Mar 11 '22 06:03 cdhermann