Tests to validate PDF and catch "negative width" ?

Scott Kostyshak skostysh at lyx.org
Thu Sep 30 14:39:28 UTC 2021


I recently reported a regression that can be seen in the attached .lyx file. There is no error from LaTeX when compiling from master, it is just that the output is not as expected.

When I view the resulting PDF from master, I get "Negative width" messages in the terminal with both Okular and Evince. I'm guessing this means the messages are coming from poppler?

I wonder if we can catch potential bugs in LyX's LaTeX export by detecting "Negative width" in resulting PDFs. However, from what I understand, it seems that negative width is not an invalid PDF, so it makes it difficult to detect on the command line.

I compared the LaTeX logs from 2.3.x and master, and nothing seems to indicate a problem, so it seems we cannot just grep the LaTeX log. I also tried some commands to validate the PDF:

  https://superuser.com/questions/580887/check-if-pdf-files-are-corrupted-using-command-line-on-linux

I tried pdfinfo, pdftotext, and jhove, but the "bad" PDF passes all of them.

Any ideas on whether this could be useful in detecting bad export? I wonder if it would be worth it to make a post on tex.se to see if there is any flag to pass to a LaTeX compiler.

Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tabular-line-regression.23.lyx
Type: application/x-lyx
Size: 10600 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20210930/a9730250/attachment-0001.lyx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20210930/a9730250/attachment-0001.asc>


More information about the lyx-devel mailing list