--- a/devices/vector/gdevpdfu.c
+++ b/devices/vector/gdevpdfu.c
@@ -742,6 +742,10 @@
                 /* This should not be possible, not valid in PostScript */
                 pprintld1(s, "%%%%BeginResource: file (PDF Annotation obj_%ld)\n", id);
                 break;
+            case resourceFontFile:
+                /* This should not be possible, not valid in PostScript */
+                pprintld1(s, "%%%%BeginResource: file (PDF FontFile obj_%ld)\n", id);
+                break;
             default:
                 pprintld1(s, "%%%%BeginResource: file (PDF object obj_%ld)\n", id);
                 break;
--- a/devices/vector/gdevpdfx.h
+++ b/devices/vector/gdevpdfx.h
@@ -136,6 +136,7 @@
     resourceMetadata,
     resourceICC,
     resourceAnnotation,
+    resourceFontFile,
     resourceNone        /* Special, used when this isn't a resource at all
                          * eg when we execute a resource we've just written, such as
                          * a Pattern.
--- a/devices/vector/gdevpdtd.c
+++ b/devices/vector/gdevpdtd.c
@@ -747,9 +747,7 @@
     pfd->common.object->written = true;
     {	const cos_object_t *pco = (const cos_object_t *)pdf_get_FontFile_object(pfd->base_font);
         if (pco != NULL) {
-            if (pdev->is_ps2write)
-                pprintld1(s, "%%%%BeginResource: file (PDF FontFile obj_%ld)\n", pco->id);
-            code = COS_WRITE_OBJECT(pco, pdev, resourceNone);
+            code = COS_WRITE_OBJECT(pco, pdev, resourceFontFile);
             if (code < 0)
                 return code;
         }
