from Hacker News

Ask HN: The P in pdf is a lie?

by xiwenc on 8/1/24, 8:43 AM with 4 comments

Yesterday I received a form from a third party in .docx format. They probably use MS Windows and MS word to create it.

I am on a mac. So I opened the file in Pages.app and export it to pdf. I then proceed to complete the form with Preview.app. After that i saved my pdf and emailed it back to third party.

Today third party replied: the pdf file is corrupted. Can you please send .docx file?

Did I do something very stupid or indeed Portable Document Format is a big lie?

  • by gettalong on 8/1/24, 10:31 PM

    Many PDF viewers and library do not fully follow the PDF standard or have subtle bugs. This leads to problems later on.

    My guess is this all started many years ago when Adobe Reader was the standard PDF reader and it was (and still is) very lenient when it comes to PDFs that aren't exactly following the specification.

    So what did everyone else? They followed Adobe's lead because "But, but, ... it works in Adobe Reader!"

  • by stefanos82 on 8/1/24, 9:05 AM

    Open your .docx file, save it as .odt, make sure the layout matches that of .docx, and THEN export it as PDF; Microsoft stuff, don't ask!
  • by fuzzfactor on 8/1/24, 8:50 AM

    I thought P stood for "proprietary". Isn't that Adobe?