Forum


Replies: 1   Views: 1313
How do i avoid generating pdf files with the /f1, /f2.. tags. external service rejects them
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by Dokumenter.dk  · 28-04-2021 - 09:11

Hi

So at the moment, we are trying to achieve an integration with the Danish service NETS. That allows danish citizens to sign documents using our national identification service NemID.

Basically, we just want to convert a .docx -> .pdf, and then send that to the official NETS Signing Service.

Our problem though, is that Nets has a very strict whitelist of tags that the PDF's are allowed to include.

We have gotten our documents to follow all these guidelines. Except the tags /F1, /F2 etc.

So far, we have identified, that the /F* tags seem to be connected to embedded fonts in the document.

The NETS service claims to support embedded fonts. So I am unsure wether PHPDOCX's font embed, uses a different approach to embed the fonts, or we have missed something entirely, that would make those /F* tags go away.

 

Do you know any way to either avoid embedding fonts and the /F* tags alltogether in the PDF? - or a way to embed them with a different approach, that would not include those tags?

Posted by admin  · 28-04-2021 - 11:10

Hello,

There's no option to remove /F1, /F2, /F3 elements from the conversion. These elements are needed to work with fonts (not just embedded fonts but also to set sizes and other styles) and they are included in the PDF specification (https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/pdf_reference_archives/PDFReference.pdf), for example:

BT% Begin text object
  /F1   1  Tf% Set text font and size64
  0  0  64  7.1771  2.4414  Tm% Set text matrix

Maybe the service you are using requires using PDF/A-2b (ISO 19005)? Although we recommend you to contact them to know why that service doesn't accept PDF documents that use F* elements that are included in the PDF specification. If you are using the conversion plugin based on LibreOffice you could try generating a PDF manually testing the included options in the Export dialog (PDF/A-2b, Tagged, XObjects...) to check if enabling any that service accepts the PDF.

Regards.