tct2k / wxpdfview Goto Github PK
View Code? Open in Web Editor NEWwxWidgets components to display PDF content with the PDFium library
License: Other
wxWidgets components to display PDF content with the PDFium library
License: Other
I can't make cmake find either wxWidgets or pdfium. Which conditions must be met so that cmake finds them?
I already built both wxWidgets and pdfium successfully,
I tried setting the environment variables "PDFIUM_ROOT_DIR" and "wxWidgets_ROOT_DIR", but that didn't change anything.
I think you do a great job, but I would like to know whether you have a demo like this but based on MFC. MFC is short for Microsoft Foundation Classes. I am not good at C++, which means I need a demo to learn something about C++. I expect your help.
Thanks for taking time to make this library. My question is, can I do direct printing of opened document?
Thanks
I found a PDF that leads to a crash somewhere deep in the PDFium code.
http://www.ams.org/notices/200904/tx090400460p.pdf
If it's inside PDFium, there is probably nothing you can do about it, but i'd be interested if it crashes for other people, too or if it could be related to my build
I built PDFium (today's trunk) and wxPDFView with VS2013 under Windows 7/64,
I tried compiling this project with my own makefile and got most of the cpps compiled except for one, This cpp produces the following errors
//------------------------------------ERRORS------------------------------------------//
g++ -g -Wall -I"C:\DevLibs\wxWidgets\include\wx-3.1" -I"C:\DevLibs\wxWidgets\lib\wx\include\msw-unicode-static-3.1" -I"Include" -I"C:\DevLibs\pdfium-windows-x64-v8\include" -c -o obj/PDFViewImpl.o src/PDFViewImpl.cpp
In file included from C:\DevLibs\pdfium-windows-x64-v8\include/fpdf_dataavail.h:13,
from Include/private/PDFViewImpl.h:20,
from src/PDFViewImpl.cpp:10:
C:\DevLibs\pdfium-windows-x64-v8\include/fpdfview.h:803:32: error: variable or field 'FPDF_RenderPage' declared void
803 | FPDF_EXPORT void FPDF_CALLCONV FPDF_RenderPage(HDC dc,
| ^~~~~~~~~~~~~~~
C:\DevLibs\pdfium-windows-x64-v8\include/fpdfview.h:803:48: error: 'HDC' was not declared in this scope
803 | FPDF_EXPORT void FPDF_CALLCONV FPDF_RenderPage(HDC dc,
| ^~~
C:\DevLibs\pdfium-windows-x64-v8\include/fpdfview.h:804:58: error: expected primary-expression before 'page'
804 | FPDF_PAGE page,
| ^~~~
C:\DevLibs\pdfium-windows-x64-v8\include/fpdfview.h:805:48: error: expected primary-expression before 'int'
805 | int start_x,
| ^~~
C:\DevLibs\pdfium-windows-x64-v8\include/fpdfview.h:806:48: error: expected primary-expression before 'int'
806 | int start_y,
| ^~~
C:\DevLibs\pdfium-windows-x64-v8\include/fpdfview.h:807:48: error: expected primary-expression before 'int'
807 | int size_x,
| ^~~
C:\DevLibs\pdfium-windows-x64-v8\include/fpdfview.h:808:48: error: expected primary-expression before 'int'
808 | int size_y,
| ^~~
C:\DevLibs\pdfium-windows-x64-v8\include/fpdfview.h:809:48: error: expected primary-expression before 'int'
809 | int rotate,
| ^~~
C:\DevLibs\pdfium-windows-x64-v8\include/fpdfview.h:810:48: error: expected primary-expression before 'int'
810 | int flags);
| ^~~
mingw32-make: *** [Makefile:48: obj/PDFViewImpl.o] Error 1
//------------------------------------ERRORS------------------------------------------//
The errors are under the pdfium header fpdfview.h. The pdfium binaries I used are the chromium/4194 version from the pdfium binaries you've linked. Any idea on what to do? happy to give more info on request
The readme says you need the pdfium binaries version 4012 or later. wxPDFView works fine with the latest versions such as v125.0.6406.0. However if so, then in PDFViewImpl.cpp, comment out this line:
#include "fpdf_libs.h"
(It looks like they removed this header file and the need for it years ago).
And this line:
FPDF_InitEmbeddedLibraries(resPathStr.c_str());
And it will work fine, including with wxWidgets library version 3.2.1.
Perhaps in PDFViewImpl.cpp above these two lines you can add a comment to say that for newer PDFium versions you can just comment them out.
Please? And thank you for this great component!
First, the location and names of some pdfium files have changed. E.g. "fpdfdoc.h" is now "fpdf_doc.h" and lies in /public/. This was something i could fix locally.
But then it creates several compiler errors with are very likely caused by changes in pdfium, which i couldn't fix by myself because they'd require internal knowledge about pdfium.
I hope you'll be able to update wxPDFView to work with the latest pdfium version, i'd really like to use it.
Hi,
does the library support loading PDFs from URL and Auto-Print them?
I have a simple app for receipts and would like to download and print it immediately without user intervention!
TIA
Hi,
I'm the creator of pdfium-binaries, which host pre-build binaries of PDFium that this project uses.
You probably noticed that the Windows packages are slightly different from the other packages because the import library is not in lib/
, but in lib/x86/
, lib/x64/
or lib/arm64/
. Similarly, the DLL is not in the bin/
but in a subfolder.
I'm currently considering removing this separation so that every package has the same layout, and I'd like to get your feedback before making the change.
I initially made this separation because it allowed me to put x86 and x64 in the same package, but I don't do that anymore, and the subfolders are causing me troubles with CMake where there is no reliable way to detect the target CPU architecture (bblanchon/pdfium-binaries#17).
Please let me know if changing the Windows packages layout is a problem for you and if you think this is going in the right direction or not.
Best regards,
Benoit
Can you please advise on how to build on Linux (ubuntu for that matter), incl PDFIUM.
cmake 3.26 +TDM GCC 9.2+ prebuilt pdfium binaries (version 113.0.5664.0)
compile terminate with following message, is there mistake in souce code?
I didnt find fpdf_libs.h in folder "include " of prebuilt pdfium binaries
[ 7%] Building CXX object CMakeFiles/wxPDFView.dir/src/PDFView.cpp.obj
[ 14%] Building CXX object CMakeFiles/wxPDFView.dir/src/PDFViewImpl.cpp.obj
D:\Coding\lib\wxPDFView\src\PDFViewImpl.cpp:21:10: fatal error: fpdf_libs.h: No such file or directory
21 | #include "fpdf_libs.h"
| ^~~~~~~~~~~~~
compilation terminated.
Hello. After making pdfium lib (see https://forums.wxwidgets.org/viewtopic.php?f=30&t=44130 )
i am truing to compile wxPDFView, but i can not.
With cmake i made makefiles in libs dir, as i explain in link above, and trying make i have problem.
There is an exact way to make lib?
Another question is if i can use source files in a project, and not need to make lib as well.
Thanks
Jim.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.