ERR_URL_NOT_PDF β URL Not PDF
HTTP Status: 400 Retryable: No Automatic retry: None. The same URL will return the same non-PDF content.
What the User Sees
The URL must point to a PDF file. (ERR_URL_NOT_PDF)
What Causes This Error
The fetched URL returned content that is not a PDF. The system validates the response using three checks: the Content-Type header (must be application/pdf or application/octet-stream), the URL extension (should end in .pdf), and the PDF magic bytes (the response body must start with %PDF).
The most common cause is users providing a URL to an HTML preview page rather than a direct download link. Many file hosting services (Google Drive, Dropbox, SharePoint) show a preview/viewer page at the main share URL, with the actual file download at a different URL.
Other causes include: the file at the URL is not actually a PDF (e.g., a Word document, image, or HTML page), the URL redirected to a login page (which returns HTML), or the remote server returned an error page (HTML) instead of the file.
Resolution Steps
For Users
- Make sure the URL points directly to the PDF file, not to a preview page or download portal. The URL should typically end in
.pdf. - Right-click the download button or link on the file hosting page and select βCopy link addressβ to get the direct download URL.
- For Google Drive: Use the format
https://drive.google.com/uc?export=download&id=FILE_IDwhere FILE_ID is the ID from the sharing URL. - For Dropbox: Change
?dl=0to?dl=1at the end of the sharing URL. - For OneDrive/SharePoint: Look for a βDirect linkβ or βDownloadβ option in the sharing settings.
- If you cannot obtain a direct link, download the file manually and upload it directly.
For Administrators
- No admin action is needed β this is user-side URL handling.
- The content validation logic checks Content-Type header, URL extension, and PDF magic bytes. All three checks are in the URL fetch handler.
- Consider adding more helpful error messages that detect common URL patterns (Google Drive preview URLs, Dropbox web URLs) and suggest the correct direct download URL format.
- If the Content-Type check is too strict (e.g., some servers send
application/x-pdforbinary/octet-stream), consider expanding the allowed Content-Type values.
Related Errors
- ERR_URL_FETCH_FAILED β Remote server returned an error HTTP status