Skip to content
Fix Code Error

Proper MIME media type for PDF files

March 13, 2021 by Code Error
Posted By: friedo

When working with PDFs, I’ve run across the MIME types application/pdf and application/x-pdf among others.

Is there a difference between these two types, and if so what is it? Is one preferred over the other?

I’m working on a web app which must deliver huge amounts of PDFs and I want to do it the correct way, if there is one.

Solution

The standard MIME type is application/pdf. The assignment is defined in RFC 3778, The application/pdf Media Type, referenced from the MIME Media Types registry.

MIME types are controlled by a standards body, The Internet Assigned Numbers Authority (IANA). This is the same organization that manages the root name servers and the IP address space.

The use of x-pdf predates the standardization of the MIME type for PDF. MIME types in the x- namespace are considered experimental, just as those in the vnd. namespace are considered vendor-specific. x-pdf might be used for compatibility with old software.

Answered By: Chris Hanson

Related Articles

  • Unexpected end of JSON input while parsing
  • Problems Installing CRA & NextJS from NPM…
  • Where do I find the current C or C++ standard documents?
  • error LNK2005: ✘✘✘ already defined in…
  • Node.js Error: Cannot find module express
  • What does do?
  • Getting a problem in django url when I am at url…
  • How to solve Internal Server Error in Next.Js?
  • List of Timezone IDs for use with FindTimeZoneById() in C#?
  • How can I extract embedded fonts from a PDF as valid…
  • Use latest version of Internet Explorer in the…
  • Does moment.js allow me to derive a timezone…
  • What is The Rule of Three?
  • Multi-dimensional sorting with variable amount of…
  • Running Python on Windows for Node.js dependencies
  • Detect if Visual C++ Redistributable for Visual…
  • Extract columns from data frames in a list in a…
  • How to convert rownames to columns in a list of elements
  • How do you sign a Certificate Signing Request with…
  • Is there any difference between a GUID and a UUID?
  • How to validate an email address using a regular expression?
  • How to check file MIME type with javascript before upload?
  • What does this symbol mean in JavaScript?
  • ExpressJS How to structure an application?
  • Regex for headings and sub headings in Python to get…
  • apply gsub over a certain column in a list of data frames
  • Eclipse will not start and I haven't changed anything
  • urlencode vs rawurlencode?
  • Loop script to extract multiple PDFs to text files…
  • Reference — What does this symbol mean in PHP?
  • Why use deflate instead of gzip for text files…
  • Polymer routing: inner routes not reflecting
  • How do I style a dropdown with only CSS?
  • What is the copy-and-swap idiom?
  • React - changing an uncontrolled input
  • How do servlets work? Instantiation, sessions,…
  • What are allowed characters in cookies?
  • How can I find the product GUID of an installed MSI setup?
  • Python scrape JS data
  • Basic Ember Template Not Rendering in Rails
  • Uses of content-disposition in an HTTP response header
  • 400 vs 422 response to POST of data
  • SameSite warning Chrome 77
  • What are the undocumented features and limitations…
  • The definitive guide to form-based website authentication
  • How do SO_REUSEADDR and SO_REUSEPORT differ?
  • SecurityException: Permission denied (missing…
  • Sorting 1 million 8-decimal-digit numbers with 1 MB of RAM
  • What is a media type (AKA MIME) Template?
  • python 3.2 UnicodeEncodeError: 'charmap' codec can't…
  • Multipart File Upload Using Spring Rest Template +…
  • Masked variables when overriding service commands are empty
  • Finding all possible combinations of numbers to…
  • FPDF Getting "Incorrect output destination" but the…
  • How to get Params from url for Axios GET request?
  • What are the differences between "=" and "
  • Peak signal detection in realtime timeseries data
  • How to use grpc-web in vue?
  • Running Internet Explorer 6, Internet Explorer 7,…
  • Generating a drop down list of timezones with PHP
  • npm global path prefix
  • How to simplify sequential logic design by…
  • Using media breakpoints in Bootstrap 4-alpha
  • What are the new features in C++17?
  • Correct mime type for .mp4
  • C compile error: Id returned 1 exit status
  • What's the difference between ISO 8601 and RFC 3339…
  • How to prevent scrolling the whole page?
  • What is the maximum length of a valid email address?
  • How Spring Security Filter Chain works
  • How do I detect what .NET Framework versions and…
  • What characters are allowed in an email address?
  • Use of PUT vs PATCH methods in REST API real life scenarios
  • Django: ImproperlyConfigured: The SECRET_KEY setting…
  • Using get and set on a data property object - VueJS
  • What is the maximum length of a URL in different browsers?
  • Smart way to truncate long strings
  • flutter - add network images in a pdf while creating…
  • How to generate a random number in C++?
  • SQL query return data from multiple tables
  • After a little scroll, the sticky navbar just is not…
  • JavaScript gives NaN error on the page but variable…
  • How to set up webpack-hot-middleware in an express app?
  • Logging best practices
  • Getting the closest string match
  • Heroku "Missing required flag -a --app" error after…
  • Setting WPF image source in code
  • Neither BindingResult nor plain target object for…
  • Android Studio: Unable to start the daemon process
  • npm behind a proxy fails with status 403
  • "message failed to fetch from registry" while trying…
  • Usage of __slots__?
  • What's the difference between including files with…
  • What is the origin of foo and bar?
  • No Spring WebApplicationInitializer types detected…
  • Complex Rails Models/Associations
  • How to update Python?
  • What is the difference between .NET Core and .NET…
  • Requested bean is currently in creation: Is there an…
  • What is the difference between UTF-8 and Unicode?

Disclaimer: This content is shared under creative common license cc-by-sa 3.0. It is generated from StackExchange Website Network.

Post navigation

Previous Post:

How to deploy a war file in Tomcat 7

Next Post:

Format date and time in a Windows batch script

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

.net ajax android angular arrays aurelia backbone.js bash c++ css dataframe ember-data ember.js excel git html ios java javascript jquery json laravel linux list mysql next.js node.js pandas php polymer polymer-1.0 python python-3.x r reactjs regex sql sql-server string svelte typescript vue-component vue.js vuejs2 vuetify.js

  • you shouldn’t need to use z-index
  • No column in target database, but getting “The schema update is terminating because data loss might occur”
  • Angular – expected call-signature: ‘changePassword’ to have a typedeftslint(typedef)
  • trying to implement NativeAdFactory imports deprecated method by default in flutter java project
  • What should I use to get an attribute out of my foreign table in Laravel?
© 2022 Fix Code Error