WEBVTT

00:00.000 --> 00:12.560
Okay. Let's go. So, this is the lining talk about popular, the PDF random library. This

00:12.560 --> 00:23.120
is me. I'm a KD veteran. I've been doing KD things since 2003. I've relevant to this talk.

00:23.120 --> 00:28.560
I started contributing in KPDF, which is now called Ocular, which is the document viewer

00:28.560 --> 00:35.200
KD, but yeah, I also do lots of other things. About popular, I started contributing

00:35.200 --> 00:44.320
to it in 2005, that's 20 years ago, and I'm the maintainer since 2008. Now, you're here,

00:44.320 --> 00:52.160
what is popular? It wasn't the title of the talk. It's a PDF random library. It's written

00:52.160 --> 00:57.280
in C++. You might like it, you might like not, but it's how it is. We're not going to

00:57.280 --> 01:05.280
change it, right? It's been there for too long. It's a fork of expedient. We would talk about what

01:05.280 --> 01:11.680
that means in the next slides, but yeah, we forked, and we forked because it's free software, right?

01:11.680 --> 01:18.160
So, being free software allows you to do forking. It's good. It's not. We will talk about it. It's

01:18.240 --> 01:26.320
GPL-2 and 3, right? It's not LGPL, so you want to link it to non-free software, don't do that.

01:29.280 --> 01:35.920
It's also hosted in pre-desktop. It's bad. I don't know, but if you go to pre-desktop,

01:35.920 --> 01:40.160
nowadays, they have a big banner setting. We're running out of servers. We need money, right?

01:40.160 --> 01:45.440
So, if you have lots of money, I think their estimate was in the tens of thousands of dollars

01:45.440 --> 01:50.320
a month, which since very high to me, but if you had that amount of money, please go to the

01:50.320 --> 01:54.480
free desktop people and tell them you have it. If you have servers, maybe that also helps.

01:56.560 --> 02:02.720
Poplar is also a weird name. I don't know if you follow food rammer or not. There is a episode

02:03.360 --> 02:08.400
in food rammer, it's called the problem of the poplar, which is these very small things.

02:10.160 --> 02:13.600
I don't remember how it goes, but I think they eat them without realizing they're actually

02:14.560 --> 02:21.040
like sentient beings or whatever. We haven't been sued by whoever holds the copyright of food

02:21.040 --> 02:33.520
rammer yet. I hope they don't do that. Yeah, anyhow. What poplar is not, right? Poplar is not

02:34.800 --> 02:40.720
editing or creation library for PDFs, right? So, if you want something that will

02:41.280 --> 02:47.440
get the input of your form and produce a PDF, that's not what you want popular for. You can

02:47.440 --> 02:54.320
probably make it do that, but it will be painful. So, don't do that. We have small,

02:54.320 --> 03:03.280
anything capabilities, you can add annotations or you can add a signature or you can add small things

03:03.280 --> 03:09.040
on top of it, the things you would do from a viewer, but not the creation part of it.

03:10.720 --> 03:16.960
It's also not a complete implementation of the PDF specifications, like standard. I don't know

03:16.960 --> 03:24.240
any of you have read it, but it's like thousands lying long and then like see or for more

03:24.240 --> 03:29.040
documents, which are also like for thousands lying long, right? Like, oh, and then there's the

03:29.040 --> 03:35.280
font part. Oh, yeah, the fonts are specified here and like, oh, right? So, we would like it to be

03:35.280 --> 03:42.400
a complete implementation of the PDF specifications. We don't have the time resources,

03:42.400 --> 03:48.640
money to do it, right? It's not that it's not on purpose, it just that it happens not to be.

03:50.640 --> 03:57.760
Okay, so why did we fork, right? Why did we fork back in 2003, right? Or five? I don't know,

03:58.560 --> 04:06.000
back then. So, Expediev is free software or open source, well, what do you want? But the development

04:06.000 --> 04:12.640
itself is not open, right? So, the person, the does the development of Expediev, does not accept

04:12.640 --> 04:19.440
patches because they also sell, sell Expediev as a part of like a commercial thingy, right? So,

04:19.440 --> 04:24.640
they want to control the whole copyright of the code so they can't sell it. So, they don't accept

04:24.640 --> 04:33.200
patches. It's, it's not a library either, right? So, it just creates binaries, like the binary

04:33.200 --> 04:41.120
for Expediev. So, it makes it hard for you to work with. Right? Back in the day with KPDF, what we used to

04:41.120 --> 04:49.600
do is that we had the whole code of Expediev copied inside KPDF, right? And with it that, and the

04:49.600 --> 04:54.080
gnome people did that, and coops did that, and everybody did that, right? And we ended up with

04:54.080 --> 05:01.120
like 10 copies of the code everywhere, and then the third point appeared, right? PDF is hard,

05:01.120 --> 05:08.800
PDF is a mess, the person that designed PDF, I did what design very long time ago, and people didn't

05:08.800 --> 05:15.200
think about people being evil, right? Like nowadays, everyone tries to break your things, right? Like

05:15.280 --> 05:20.000
things that people thought in the 30 years ago, it's like, no, people are going to be nice,

05:20.000 --> 05:24.480
so that there's no need to protect about things, right? Everything in PDF is a three.

05:25.280 --> 05:28.960
Things you can do with a three is do loops, right? So, like, yeah, you can say,

05:28.960 --> 05:33.120
these references, this and these references, this, and then suddenly your parser is like,

05:33.120 --> 05:40.880
better forever, right? So, we have lots of security issues, right? It's very easy. If you

05:40.880 --> 05:48.400
pass a popular XPdf, you will find a crash, you're on, and we're getting better at it, but

05:48.400 --> 05:56.000
it is relatively easy, and 20 years ago, it was super easy to find security problems. So, yeah,

05:56.000 --> 06:03.040
everybody had a copy of XPdf was not great, so we needed to come up with a solution.

06:03.760 --> 06:10.160
And also, XPdf, since I said, the person that develops XPdf wants to sell it, so it's

06:10.480 --> 06:17.440
unpurpose, done not to have many dependencies, so it has its own jpec, the color, it has its own

06:17.440 --> 06:24.080
PNG, the color, right? But there is this thing called the jpec and lippNG, which you can use,

06:24.080 --> 06:28.720
and they're probably better than the thing you call that on your own, right? So, in popular

06:28.720 --> 06:34.640
we decided, well, let's try to outsource as many things as we can, it will also help with the

06:34.720 --> 06:42.880
security issues, right? Those are the good parts of forking, the bad part of forking is

06:42.880 --> 06:49.760
that eventually you deburred too much, right? So, we forked at the time of XPdf 3,

06:50.640 --> 06:55.360
they are now in XPdf 4, we can't match the changes anymore, right? It's too hard, I mean, we

06:55.360 --> 07:01.760
could, but it's too hard. Anyhow, we use a popular lots of people, right? Everything on the Linux

07:01.760 --> 07:11.760
desktop, that is not Firefox or Chromium or Ghostrip and users PDFs in some way, users potter, right?

07:11.760 --> 07:16.160
So, I went to Art Linux and got to do and asked them, how many packages do you have that

07:16.160 --> 07:23.520
pen on popular? The number is around 7580, so yeah, lots of people. How to use the library?

07:23.520 --> 07:28.000
I have to run a bit fast, I thought I would be slower, hey, how to use the library? We have

07:28.960 --> 07:35.280
4, 4, 4, 3, because the queue bindings are the same, public interfaces, right? So, like those interfaces,

07:35.840 --> 07:43.520
we promise they will not change, right? So, you're, you're, you deal with, which is C days, or the

07:43.520 --> 07:49.360
queue 5, queue 6 bindings with our C++, which is huge, oriented, or the CPP1, which is more

07:49.360 --> 07:56.480
agnostic. There's also a few, you know, non official bindings for Python, go Ruby, I have no idea about those,

07:56.640 --> 08:02.080
I know they exist, people sometimes, portus bugs and they're like, well, that's not me, right?

08:02.080 --> 08:06.480
Go somewhere else. We also have private headers, you can enable them with this,

08:07.600 --> 08:14.960
C-make option called C-make unstable API, API headers, and the comment is unstable XPF headers.

08:14.960 --> 08:20.080
And this is a promise, right? We will thank you. We change these headers every least,

08:20.080 --> 08:25.840
every least that changes here. If you want to use those, you can use them, I would prefer you didn't,

08:25.920 --> 08:31.840
and you use one of the evolves, but if you want to use them, yeah, you know we will break you.

08:33.760 --> 08:40.160
Now, you can do viewer in 10 lines, that is exactly 10 lines, I'm missing the includes,

08:40.160 --> 08:44.240
so it's a bit more 10 lines, and also only renders the first page, which is not very useful.

08:46.560 --> 08:51.200
Cute, but the, the, the, the glib counterpart is very similar. You load the document,

08:51.200 --> 08:55.760
you get the first page, you render it to an image, and you paint the image, right? It's not very complicated,

08:55.840 --> 09:00.960
obviously if you want to do more things like annotations, signature, blah, blah, blah, you will need more code,

09:00.960 --> 09:09.760
but if you want to start, I think it's not super hard. Okay, the development model. We do

09:09.760 --> 09:14.240
monthly release, right? Actually, like on the first day of the month, which should be today,

09:14.240 --> 09:19.840
it's not going to happen. We will do it probably on Monday or something, following the geared year,

09:19.920 --> 09:27.840
on month, uh, release, and numbering, monthly is because as said, there's usually some kind of

09:27.840 --> 09:32.000
security issues, so we try to get it as fast as you can, right? Uh, this doesn't like that,

09:32.000 --> 09:36.560
it's like, oh no, again, you broke the API again. I'm sorry, but it's how it is.

09:38.480 --> 09:45.520
We do have CI running on, look, Android, uh, Ming, the W, or whatever, how do you call that?

09:45.600 --> 09:52.560
And then some, uh, checkers, right, plant, plant, 80, and cloudy, we also have non official CI's running

09:52.560 --> 10:01.360
on PVC, Mac, and Windows compiler. People sometimes send us patches saying, yeah, I need this

10:01.360 --> 10:09.440
small patch to make this compile in this my very, uh, obscure operating system. I usually tell them,

10:09.440 --> 10:15.040
I don't want those patches because I cannot verify, I will not break them tomorrow, right? If you give

10:15.040 --> 10:21.920
me a CI, I will accept your patch. If you don't give me a CI, you keep your patch, right? Uh, it's hard enough

10:21.920 --> 10:27.600
to make sure everything compiles in these ones, which we have CI for, uh, to worry about the others.

10:28.400 --> 10:32.640
As I said, we also have some, uh, security thing is, uh, I don't know if you know about,

10:32.640 --> 10:39.120
as fast as, uh, it's a, it's a passing, uh, service run by Google, uh, Kubernetes on our cloud, uh,

10:39.440 --> 10:47.280
similar things, there are non-free, but, yeah, I mean, you do what you can. We use GitLab for,

10:47.280 --> 10:53.840
for everything, right, for merge requests and issues. Uh, last year we had around 30

10:53.840 --> 11:00.480
commuters, and of those 36 people sent more than 10 commits, so like you would say, like those six

11:00.480 --> 11:07.600
people are, are the core, the core contributors. Uh, but yeah, I mean, I think it's not about number

11:07.600 --> 11:16.800
for how niche is large hard, doing PDF, uh, things are. So, yeah, not combining. How can you help,

11:18.320 --> 11:25.600
report good backs? Please make sure they don't exist already, right? There's the, uh, typical problem

11:25.600 --> 11:31.360
with backs, everybody creates one, one, there's two of them already for the same thing. Uh, also,

11:31.440 --> 11:38.480
usually, like, if you're, having a problem with Ocular or with Avintance, it might make sense to

11:38.480 --> 11:44.080
check if it's also happening on the common line tools we have, like PDF to Cairo or PDF to

11:44.080 --> 11:48.720
PPM or something, and then don't report the book about Ocular because the Ocular people will say,

11:48.720 --> 11:51.680
well, you know, this is actually a back in popular, or the Avint's people will say,

11:51.680 --> 11:57.200
it's like, yeah, we don't do this. So, yeah, that might help. Uh, proposed merge requests,

11:58.160 --> 12:02.000
actually the one I want more is like, if you have time review merge requests, like we have

12:03.840 --> 12:08.240
lots of lots of, lots of stale merge requests, I do my best, but I, I have the time I have.

12:09.120 --> 12:16.000
So, yeah, some of them are a bit stuck. And yeah, coming back to the money issue,

12:16.960 --> 12:21.520
if you have money for a server that would be nice, right now, I'm using, I'm doing the

12:21.520 --> 12:26.960
regression testing in this laptop, right? Uh, it takes a few hours, and I worry at some point

12:26.960 --> 12:33.760
the CPU is going to burn. So, if you have a server that can help us run the regression testing

12:34.320 --> 12:41.280
that would be super appreciated. Uh, and that's me. There is no time for questions. If you have

12:41.280 --> 12:45.600
questions, you can come here and talk to me, maybe. Uh, so thank you for listening.

