PDF 文件的正确 MIME 媒体类型 [英] Proper MIME media type for PDF files

查看:48
本文介绍了PDF 文件的正确 MIME 媒体类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在处理 PDF 时,我遇到过 MIME 类型 application/pdfapplication/x-pdf 等.

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?

我正在开发一个网络应用程序,它必须提供大量的 PDF,如果有的话,我想以正确的方式完成它.

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.

推荐答案

标准媒体类型(以前称为 MIME 类型)是 application/pdf.分配定义在 RFC 3778, The application/pdf Media Type,引用自 媒体类型注册表.

The standard Media Type (formerly known as MIME types) is application/pdf. The assignment is defined in RFC 3778, The application/pdf Media Type, referenced from the Media Types registry.

媒体类型由标准机构控制,互联网号码分配机构 (IANA).这是管理根名称服务器和 IP 地址空间的同一组织.

Media 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.

x-pdf 的使用早于 PDF 媒体类型的标准化.x- 命名空间中的媒体类型被视为实验性的,就像 vnd. 命名空间中的媒体类型被视为特定于供应商一样.x-pdf 可能用于兼容旧软件.

The use of x-pdf predates the standardization of the Media Type for PDF. Media 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.

这篇关于PDF 文件的正确 MIME 媒体类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆