News for hackers. Stuff that matters.

Ask HN: The P in pdf is a lie?

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?

( 4 comments | 3 points | on HN )
Re:Ask HN: The P in pdf is a lie? by stefanos82 on Thursday August 01, 2024 @05:05AM (#41127306)
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!
Re:Ask HN: The P in pdf is a lie? by fuzzfactor on Thursday August 01, 2024 @04:50AM (#41127263)
I thought P stood for "proprietary". Isn't that Adobe?
Re:Ask HN: The P in pdf is a lie? by mtmail on Thursday August 01, 2024 @05:58AM (#41127561)
It's a ISO standard since 2008. There are other standards that started from one company. For example https://en.wikipedia.org/wiki/GTFS used to be "Google Transit Feed Specification" and it became "General Transit Feed Specification".
Re:Ask HN: The P in pdf is a lie? by gettalong on Thursday August 01, 2024 @06:31PM (#41134313)
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!"