Results 1 to 5 of 5

Thread: Syntax Warning: May not be a PDF file (continuing anyway)

  1. #1
    Join Date
    Jan 2020
    Beans
    2

    Syntax Warning: May not be a PDF file (continuing anyway)

    Hi,

    I have this issue on my Ubuntu desktop 18.04.
    When I execute pdfinfo on a valid pdf file, I get the following result:

    ==========================================
    Syntax Warning: May not be a PDF file (continuing anyway)
    Syntax Error (2): Illegal character <68> in hex string
    Syntax Error (3): Illegal character <74> in hex string
    Syntax Error (4): Illegal character <6d> in hex string
    Syntax Error (5): Illegal character <6c> in hex string
    Syntax Error (10): Illegal character <68> in hex string
    Syntax Error (16): Illegal character <74> in hex string
    Syntax Error (17): Illegal character <69> in hex string
    Syntax Error (18): Illegal character <74> in hex string
    Syntax Error (19): Illegal character <6c> in hex string
    Syntax Error: Couldn't find trailer dictionary
    Syntax Error: Couldn't find trailer dictionary
    Syntax Error: Couldn't read xref table
    ==========================================

    However, when I run it on Ubuntu server 18.04, the following result appears:
    ==========================================
    Title:
    Subject:
    Keywords:
    Author: SeaStarNet
    Creator: WHMCS
    Producer: TCPDF 6.2.12 (http://www.tcpdf.org)
    CreationDate: Wed Apr 18 17:42:20 2018 WIB
    ModDate: Wed Apr 18 17:43:14 2018 WIB
    Tagged: no
    UserProperties: no
    Suspects: no
    Form: none
    JavaScript: no
    Pages: 1
    Encrypted: no
    Page size: 595.276 x 841.89 pts (A4)
    Page rot: 0
    File size: 16380 bytes
    Optimized: no
    PDF version: 1.7
    ==========================================

    The error message from above prevents me from performing actions to the file.
    I understand that this could be due to the file being amended by a pdf writer.
    However, such a situation cannot be avoided as it is part of our operations.
    Thus, could there be a solution to my situation?

    Thanks!

  2. #2
    Join Date
    Feb 2008
    Location
    Texas
    Beans
    27,896
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Syntax Warning: May not be a PDF file (continuing anyway)

    Thread moved to New to Ubuntu a more appropriate sub-forum.

  3. #3
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    4,924
    Distro
    Xubuntu 19.10 Eoan Ermine

    Re: Syntax Warning: May not be a PDF file (continuing anyway)

    Is the file identical? Test by calculating a hash on each computer:
    Code:
    md5sum file.pdf
    Maybe the file got corrupted during transfer to your desktop. It's either that or you somehow got a broken pdfinfo on that desktop.

  4. #4
    Join Date
    Jan 2020
    Beans
    2

    Re: Syntax Warning: May not be a PDF file (continuing anyway)

    3770d6c02352ab136db0d9449e9e85a1
    3770d6c02352ab136db0d9449e9e85a1

    They are identical. The files are not corrupted as I can read them using a pdf viewer.
    Actually, the original file is on the desktop and is copied to the server.

    I understand from my research is that this is due to the level of strictness Linux deals with pdf files.
    This issue was resolved, however, seems that I am still experiencing it on the desktop version.

  5. #5
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    4,924
    Distro
    Xubuntu 19.10 Eoan Ermine

    Re: Syntax Warning: May not be a PDF file (continuing anyway)

    If the files are identical and pdfinfo gives different output on desktop and server, pdfinfo must be different (or, more worrying, you get random bitflips). As both run Ubuntu 18.04 and therefore use the same repositories, that shouldn't happen. Can you show the output of
    Code:
    pdfinfo -v
    apt-cache policy poppler-utils
    on both computers?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •