Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[native_pdf_renderer] Desktop Support #167

Open
kechankrisna opened this issue Mar 4, 2021 · 11 comments
Open

[native_pdf_renderer] Desktop Support #167

kechankrisna opened this issue Mar 4, 2021 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@kechankrisna
Copy link

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 kechankrisna added the enhancement New feature or request label Mar 4, 2021
@SergeShkurko
Copy link
Member

SergeShkurko commented Mar 4, 2021

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

I would be grateful for any help in this direction

@kechankrisna
Copy link
Author

that is great bro

@SergeShkurko
Copy link
Member

[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 SergeShkurko pinned this issue Jun 24, 2021
@hillelcoren
Copy link

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?

@SergeShkurko SergeShkurko changed the title Desktop Support [native_pdf_renderer] Desktop Support Nov 4, 2021
@cdhermann
Copy link

[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

@Jon-Salmon
Copy link
Contributor

@cdhermann You will need to add a line to your CMakeLists.txt file as mentioned here: #233 (comment)

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

@cdhermann
Copy link

@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
Copy link

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

@Jon-Salmon
Copy link
Contributor

@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.

@fengJCgithub
Copy link

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

@cdhermann
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants