PDFium newest document

418 views
Skip to first unread message

Yuzhao Hong

unread,
Mar 25, 2022, 3:50:55 PM3/25/22
to pdfium
Hi, I'm trying to use PDFium to implement some features. But I couldn't find the newest document.
I visited PDFium Document by Foxit, and there lack some methods, for example:
```
FPDFFont_GetAscent
```
Any help is much appreciated. Thanks.
WX20220324-153926@2x.png

Lei Zhang

unread,
Mar 28, 2022, 6:38:11 PM3/28/22
to Yuzhao Hong, pdfium
The link you mentioned is maintained by FoxIt and not by the PDFium
project. You'll have to contact FoxIt about updating that.

PDFium's public APIs are simply documented in the header files. e.g.
https://pdfium.googlesource.com/pdfium.git/+/e1215fc4ed/public/fpdf_edit.h#1276
> --
> You received this message because you are subscribed to the Google Groups "pdfium" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pdfium+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pdfium/471567fe-f7c8-4f9b-8e0d-e8577d71a8adn%40googlegroups.com.

Yuzhao Hong

unread,
Apr 1, 2022, 11:38:25 PM4/1/22
to Lei Zhang, pdfium
Thanks, I'll check it out. 
--
Yuzhao

geisserml

unread,
Apr 11, 2022, 2:51:35 PM4/11/22
to pdfium
Hello,
I also see the problem that the documentation at Foxit and the PDFium codebase are diverging more and more. Of course, we can look at the inline documentation in the source code, but that is a bit tedious, especially for newer users.
Are there any motions to host recent documentation independently on a PDFium webpage? Or can you provide guidelines on how to build the documentation locally using Doxygen?
Kind regards

Lei Zhang

unread,
Apr 12, 2022, 4:56:53 PM4/12/22
to geisserml, pdfium
This sounds like a great opportunity for a community-contributed project.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pdfium/f41bf41e-6bc6-4c01-aa7c-5e7300564208n%40googlegroups.com.

geisserml

unread,
Apr 12, 2022, 5:02:37 PM4/12/22
to pdfium
Yes, hosting the documentation could certainly done by a community member. Nevertheless, some guidance would be required on how to actually build it, especially considering that there currently is no Doxyfile in the PDFium repository.

Lei Zhang

unread,
Jun 10, 2022, 6:55:56 PM6/10/22
to geisserml, pdfium
If there is some open-source documentation tool that works well, and
that tool needs some extra files to be checked into PDFium, we can
probably do that assuming it's not too much trouble.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pdfium/f9114996-0195-4bbd-ba2f-382d313426c5n%40googlegroups.com.

geisserml

unread,
Jun 11, 2022, 8:38:32 AM6/11/22
to pdfium
By the looks of it, Foxit are using Doxygen. However, as far as I can see, PDFium's doc syntax is not compatible with it.
Either the syntax has been changed, or Foxit possess a custom fork of Doxygen.
For instance, most comment blocks currently use `//`, but Doxygen needs one of the indicators listed in [1].

Lei Zhang

unread,
Aug 26, 2022, 9:15:22 PM8/26/22
to geisserml, pdfium
I've not used Doxygen much, so I don't have a strong opinion on it.
If anyone does, either for or against, please chime in.

I see Crashpad [2] using it, so I'm ok with having some consistency
between Chromium-related projects. Given they somehow got their
documentation hosted on crashpad.chromium.org, I can look into if
PDFium can similarly host it on pdfium.org.

[2] https://crashpad.chromium.org/doxygen/index.html
> To view this discussion on the web visit https://groups.google.com/d/msgid/pdfium/4b59676e-ac82-47c2-ab6f-42e1254b4a76n%40googlegroups.com.

geisserml

unread,
Aug 27, 2022, 6:55:39 AM8/27/22
to pdfium
I wonder if there is a formal definition of PDFium's docstring format, or a documentation builder that supports it by default?
That said, using Sphinx [1] might be another option. Hosting is easy thanks to ReadTheDocs. [2]
Sphinx provides the opportunity to plug in a custom docstring parser extension, [3] which could be used to avoid changes to PDFium's codebase.
However, I'm not sure what is more work: writing such a parser, or just changing PDFium's docstrings to comply with some supported standard.

[1]: https://www.sphinx-doc.org/en/master/
[2]: https://readthedocs.org/
[3]: e. g. https://github.com/sphinx-doc/sphinx/blob/5.x/sphinx/ext/napoleon/docstring.py

Lei Zhang

unread,
Aug 30, 2022, 12:52:28 PM8/30/22
to geisserml, pdfium
I think it's easier to just change PDFium's API comments and
standardize them. There are already 2 styles of comments, though they
are not too different. One is the style in fpdfview.h, and the other
is the style in fpdf_ppo.h. There's also room for improvement to
clarify the documentation and fix typos.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pdfium/c1772c98-13ec-4f84-8554-ee43c0a256ddn%40googlegroups.com.

Miklos Vajna

unread,
Aug 31, 2022, 3:58:43 AM8/31/22
to Lei Zhang, geisserml, pdfium
Hi,

On Fri, Aug 26, 2022 at 06:15:09PM -0700, Lei Zhang <the...@chromium.org> wrote:
> I've not used Doxygen much, so I don't have a strong opinion on it.
> If anyone does, either for or against, please chime in.

We use doxygen at libreoffice (and we like it), although for us the
primary benefit is class hierarchy of internal C++ API, like
<https://docs.libreoffice.org/sw/html/classSwAnchoredObject.html>.

Regards,

Miklos
Reply all
Reply to author
Forward
0 new messages