<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pdf-tools.git/server/epdfinfo.c, branch feature/emacs-26.3</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/'/>
<entry>
<title>Revert "Adds translattion of highlight annotations"</title>
<updated>2022-10-04T06:02:41+00:00</updated>
<author>
<name>Vedang Manerikar</name>
<email>ved.manerikar@gmail.com</email>
</author>
<published>2022-10-04T06:02:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=a4905d8352437905e6ba1d923cd24ad260c92030'/>
<id>a4905d8352437905e6ba1d923cd24ad260c92030</id>
<content type='text'>
This reverts commit 0107f80dcf268d08ac075b01729820062c0fbd67

The reason for doing this is explained by @vizs in #143, copying the
message here:

Andreas wrote the function
`annotation_translate_quadrilateral`[^1][^2] to fix misplaced
annotations due to the then bug in `glib`. This misplacement bug can
be seen in the images posted in issue politza/pdf-tools#577, along
with PDFs in which the bug can be reproduced.

This lack of translation in the `glib` backend was fixed in `poppler
0.86.0` but the workaround was still left hanging in `epdfinfo.c`
which brings us to today where this unneeded translation bites our
back. I commented out the calls to
`annotation_translate_quadrilateral` in `epdinfo.c` and to my
surprise, there were no misplaced translations in files which
displayed the misplacing behaviour and in files which did not have
this behaviour.

[1]:
https://github.com/politza/pdf-tools/commit/0107f80dcf268d08ac075b01729820062c0fbd67
[2]: politza/pdf-tools#122

Closes: #143
Closes: #146
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 0107f80dcf268d08ac075b01729820062c0fbd67

The reason for doing this is explained by @vizs in #143, copying the
message here:

Andreas wrote the function
`annotation_translate_quadrilateral`[^1][^2] to fix misplaced
annotations due to the then bug in `glib`. This misplacement bug can
be seen in the images posted in issue politza/pdf-tools#577, along
with PDFs in which the bug can be reproduced.

This lack of translation in the `glib` backend was fixed in `poppler
0.86.0` but the workaround was still left hanging in `epdfinfo.c`
which brings us to today where this unneeded translation bites our
back. I commented out the calls to
`annotation_translate_quadrilateral` in `epdinfo.c` and to my
surprise, there were no misplaced translations in files which
displayed the misplacing behaviour and in files which did not have
this behaviour.

[1]:
https://github.com/politza/pdf-tools/commit/0107f80dcf268d08ac075b01729820062c0fbd67
[2]: politza/pdf-tools#122

Closes: #143
Closes: #146
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix: remove execute permisions from temp files</title>
<updated>2022-08-22T06:35:45+00:00</updated>
<author>
<name>Zachary Newman</name>
<email>z@znewman.net</email>
</author>
<published>2022-08-21T21:44:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=6df41605cccb6f267693927dc153e7f0ae0c980d'/>
<id>6df41605cccb6f267693927dc153e7f0ae0c980d</id>
<content type='text'>
They aren't used.

Fixes #138.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They aren't used.

Fixes #138.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove usage of all private poppler headers in pdf-tools</title>
<updated>2022-05-22T00:06:15+00:00</updated>
<author>
<name>Pi-Cla</name>
<email>pirateclip@protonmail.com</email>
</author>
<published>2022-05-05T06:05:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=97a298192978788db9adbe723b1aa384e2ddf638'/>
<id>97a298192978788db9adbe723b1aa384e2ddf638</id>
<content type='text'>
This commit also removes C++ entirely, as it is not needed anymore for
correct compilation of `epdfinfo`. The following changes are made:

- Remove private headers from all the server code. This involves:
  - Replace private header functionality with the correct public
    functions provided by poppler.
  - Remove unneeded headers around date checks
  - Delete dead-code (headers, m4 macros)

- Remove C++, g++ and similar aliases from all the code. Also:
  - Remove related information from the README
  - Remove related information from CI and Dockerfiles

Work done by: @Pi-Cla
Closes: #105, #103, #109, #114
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit also removes C++ entirely, as it is not needed anymore for
correct compilation of `epdfinfo`. The following changes are made:

- Remove private headers from all the server code. This involves:
  - Replace private header functionality with the correct public
    functions provided by poppler.
  - Remove unneeded headers around date checks
  - Delete dead-code (headers, m4 macros)

- Remove C++, g++ and similar aliases from all the code. Also:
  - Remove related information from the README
  - Remove related information from CI and Dockerfiles

Work done by: @Pi-Cla
Closes: #105, #103, #109, #114
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Use mkstemp instead of tempnam"</title>
<updated>2022-05-12T01:45:21+00:00</updated>
<author>
<name>Vedang Manerikar</name>
<email>ved.manerikar@gmail.com</email>
</author>
<published>2022-05-12T01:45:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=fedd930a09a497c03df3ce5204ccbd80da724662'/>
<id>fedd930a09a497c03df3ce5204ccbd80da724662</id>
<content type='text'>
This reverts commit 37bbe861755bc60c7cc333359fee3e2a5d919c77.

As explained by @ShuguangSun (re: testing the change on Windows) on

&gt; Sorry. It is my fault. The issue is still there. The different is
&gt; that the temp dir is created now. However, it reports "Unable to
&gt; create temporary file".

Reopens: #110
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 37bbe861755bc60c7cc333359fee3e2a5d919c77.

As explained by @ShuguangSun (re: testing the change on Windows) on

&gt; Sorry. It is my fault. The issue is still there. The different is
&gt; that the temp dir is created now. However, it reports "Unable to
&gt; create temporary file".

Reopens: #110
</pre>
</div>
</content>
</entry>
<entry>
<title>Use mkstemp instead of tempnam</title>
<updated>2022-05-11T19:45:47+00:00</updated>
<author>
<name>Vedang Manerikar</name>
<email>ved.manerikar@gmail.com</email>
</author>
<published>2022-05-11T19:39:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=37bbe861755bc60c7cc333359fee3e2a5d919c77'/>
<id>37bbe861755bc60c7cc333359fee3e2a5d919c77</id>
<content type='text'>
This reverts commit 8ee31220a6ae3e41549bfffca7a89c481d270004 and
brings in @JunyuanChen's change once again.

We modify the commit to fix the problem on Windows by changing the
code as follows:

--- a/server/epdfinfo.c
+++ b/server/epdfinfo.c
@@ -347,6 +347,6 @@
 static char*
 mktempfile()
 {
-  char template[] = "/tmp/epdfinfoXXXXXX";
+  char template[] = P_tmpdir "/epdfinfoXXXXXX";
   char *filename = malloc(sizeof(template));
   memcpy(filename, template, sizeof(template));

This works correctly for Windows (as confirmed by @ShuguangSun),
Mac (tested by @vedang) and Linux (tested by @Junyuanchen)

Relates to: #101, #94
Closes: #110
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 8ee31220a6ae3e41549bfffca7a89c481d270004 and
brings in @JunyuanChen's change once again.

We modify the commit to fix the problem on Windows by changing the
code as follows:

--- a/server/epdfinfo.c
+++ b/server/epdfinfo.c
@@ -347,6 +347,6 @@
 static char*
 mktempfile()
 {
-  char template[] = "/tmp/epdfinfoXXXXXX";
+  char template[] = P_tmpdir "/epdfinfoXXXXXX";
   char *filename = malloc(sizeof(template));
   memcpy(filename, template, sizeof(template));

This works correctly for Windows (as confirmed by @ShuguangSun),
Mac (tested by @vedang) and Linux (tested by @Junyuanchen)

Relates to: #101, #94
Closes: #110
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Use mkstemp instead of tempnam"</title>
<updated>2022-05-10T01:10:06+00:00</updated>
<author>
<name>Vedang Manerikar</name>
<email>ved.manerikar@gmail.com</email>
</author>
<published>2022-05-10T01:10:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=8ee31220a6ae3e41549bfffca7a89c481d270004'/>
<id>8ee31220a6ae3e41549bfffca7a89c481d270004</id>
<content type='text'>
This reverts commit d63a1e7d87f9b0a19209f2eeb170bcf64612aa2f.

In d63a1e7, @JunyuanChen fixed a long standing compilation warning by
replacing `tempnam` with `mkstemp` in `epdfinfo`. However, the
`mkstemp` implementation does not work correctly on MS
Windows (probably because the path template is "wrong" for Windows).

I am reverting the commit and opening a new issue #110 to track the
correct implementation of `mkstemp` (or equivalent) on MS Windows.

It would also be great to add a test against Windows CI to open a PDF
and check that the operation completes successfully.

Closes: #101
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit d63a1e7d87f9b0a19209f2eeb170bcf64612aa2f.

In d63a1e7, @JunyuanChen fixed a long standing compilation warning by
replacing `tempnam` with `mkstemp` in `epdfinfo`. However, the
`mkstemp` implementation does not work correctly on MS
Windows (probably because the path template is "wrong" for Windows).

I am reverting the commit and opening a new issue #110 to track the
correct implementation of `mkstemp` (or equivalent) on MS Windows.

It would also be great to add a test against Windows CI to open a PDF
and check that the operation completes successfully.

Closes: #101
</pre>
</div>
</content>
</entry>
<entry>
<title>Use mkstemp instead of tempnam</title>
<updated>2022-04-26T01:03:09+00:00</updated>
<author>
<name>JunyuanChen</name>
<email>75352049+JunyuanChen@users.noreply.github.com</email>
</author>
<published>2022-04-21T17:02:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=d63a1e7d87f9b0a19209f2eeb170bcf64612aa2f'/>
<id>d63a1e7d87f9b0a19209f2eeb170bcf64612aa2f</id>
<content type='text'>
Removes the following warning when compiling `epdfinfo`:

```
build/server/epdfinfo.c:354: warning: the use of `tempnam' is
dangerous, better use `mkstemp'
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removes the following warning when compiling `epdfinfo`:

```
build/server/epdfinfo.c:354: warning: the use of `tempnam' is
dangerous, better use `mkstemp'
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Minor language correction: it's -&gt; its</title>
<updated>2022-01-03T02:34:05+00:00</updated>
<author>
<name>Vedang Manerikar</name>
<email>ved.manerikar@gmail.com</email>
</author>
<published>2022-01-03T02:34:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=5a3a14470db4ab4d7310d7d7a647c9764c48d700'/>
<id>5a3a14470db4ab4d7310d7d7a647c9764c48d700</id>
<content type='text'>
The correct possessive with it is "its", not "it's".

Closes: politza#689
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The correct possessive with it is "its", not "it's".

Closes: politza#689
</pre>
</div>
</content>
</entry>
<entry>
<title>Adapt to changes in synctex API</title>
<updated>2019-12-28T10:05:12+00:00</updated>
<author>
<name>Andreas Politz</name>
<email>politza@hochschule-trier.de</email>
</author>
<published>2019-12-09T06:05:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=cc29d4c9c2d81fcb1255f7172fd5b9b7851d656c'/>
<id>cc29d4c9c2d81fcb1255f7172fd5b9b7851d656c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typos</title>
<updated>2019-11-26T20:11:52+00:00</updated>
<author>
<name>Damien Cassou</name>
<email>damien@cassou.me</email>
</author>
<published>2019-11-26T20:11:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/pdf-tools.git/commit/?id=725daa8863255a91be1b36af3f050b1767ea879a'/>
<id>725daa8863255a91be1b36af3f050b1767ea879a</id>
<content type='text'>
Typos found with codespell.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Typos found with codespell.
</pre>
</div>
</content>
</entry>
</feed>
