is there a way to display PDF documents or pages using wxWidgets or any 3rd party library based on wxWidgets?`
Thanks,
Hardy
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+u...@googlegroups.com
or visit http://groups.google.com/group/wx-users
wxPdfDocument is a wxWidgets based library for *creating* PDF
documents, it doesn't have support for rendering PDF documents on
screen.
>> is there a way to display PDF documents or pages using wxWidgets or any
>> 3rd party library based on wxWidgets?`
Not that I know of.
In my applications I use method GetOpenCommand of class wxFileType to
retrieve the system command for opening a PDF file and then I use
wxExecute to run this command.
In case you need for whatever reason a full fledged PDF renderer under
your own control you might consider to take a look at xpdf (http://
foolabs.com/xpdf/home.html).
Alternatively there are poppler (based on xpdf) (http://
poppler.freedesktop.org/) or MuPDF (http://www.mupdf.com/).
All 3 named libraries (xpdf, poppler, mupdf) are GPL and therefore
can't be used in commercial applications, but as far as I know
commercial licenses are provided.
Regards,
Ulrich
Gadget/Steve
wx.ActiveX_PDFWindow is platform specific as it uses ActiveX to
communicate with Acrobat Reader. It only works together with Acrobat
Reader. I don't see any real advantage to executing Acrobat Reader (or
whatever PDF viewer is installed) directly as mentioned in my first
post.
wx.PdfViewer depends on pyPDF for parsing PDF documents and therefore
can't be ported to C++ easily. Further it's not a full fledge PDF
renderer, so it might not be capable to display complex PDF documents.
Regards,
Ulrich
Gadget/Steve
Sure, but what would be the advantages im comparison to directly
invoking the system's PDF viewer?
Another alternative comes to mind. One could embed GhostScript to
render PDF. As GhostScript is a C library bundling it with and
controlling it from a wxWidgets application should be straight
forward.
> True it will not display every pdf document however if your application
> is generating or using specific pdf files then you may be able to ensure
> that they are compatible with it - a lot depends on what you are trying to do.
Well, I don't know the requirements of the original poster.
Regards,
Ulrich
There is wxPDFMediaBackend documented at:
http://docs.wxwidgets.org/2.9.2/classwx_active_x_container.html
A PDF backend for wxMediaCtrl. I have no idea if it works, but it says it
does.
Good luck.
It would be nice to know if it does work or not. Maybe it doesn't work
cross-platform.
Regards
Steve.
thanks for all the feedback.
It seems to be that I am unlucky as I need a cross-platform solution and in some kind of commercial code (though the program itself will not be sold). I had the same idea as Ulrich to use ghostscript for rendering and display afterwards the rendered image.
I have seen that there has once been a lib on the web going this path. But it seems to be that it is gone, now.
Regards,
Hardy
Could you elaborate a bit more on which requirements you have and
which goals you try to fulfill? This might help to inspire new ideas.
> I have seen that there has once been a lib on the web going this path.
> But it seems to be that it is gone, now.
There is http://wxghostscript.sourceforge.net/, but I can't tell how
usable it might be as it's development stopped 8 years ago. But it
might serve as a starting point.
Regards,
Ulrich
I am writing an App that is able to display PDF files (articles, magazines etc.) on an iPhone, iPad etc. These files are partially encrypted with a special algorithm because the users have to pay for the content. To extend the usage these PDF files (multiple pages) should also be displayable on desktop computers.
As the files are encrypted and special functionality is implemented I need my own renderer (sorry, can't be more specific). Besides that the program includes other features not available with standard PDF viewers.
Hardy
Gadget/Steve