OP-TED / eForms-SDK

eForms is the notification standard for public procurement procedures in the EU. The eForms SDK is a collection of resources providing the foundation for building eForms applications.
Creative Commons Attribution 4.0 International
59 stars 30 forks source link

missing publication information in pdf render API #931

Closed OliverStingl closed 5 months ago

OliverStingl commented 6 months ago

After publishing, information under "Publication information" is still missing in the PDF rendered by API call to "https://viewer.ted.europa.eu/api/v2/notices/render", the heading itself is present. In the PDF downloaded via direct links on ted.europa.eu ("https://ted.europa.eu/en/notice/[publication-id]/pdf") publication information is present: image

POST-data for curl is as following (PHP Curl): [ 'file' => base64_encode($xml), 'language' => 'de', 'format' => 'PDF', 'textToHighlight' => 'string', 'summary' => false, ];

pdonohoe commented 6 months ago

Dear @OliverStingl , I cannot replicate the error you see. I have called the live render API https://viewer.ted.europa.eu/api/v2/notices/render with the notice XML, and the returned PDF includes the publication information, see attached PDF. 2024-OJS077-00230964-live.pdf

OliverStingl commented 5 months ago

We are sending the notice-xml to the render api and we still receive the PDF without any publication information. Is the notice XML altered on the TED-portal after publication? We're sending the exact XML we're sending for publishing.

bertrand-lorentz commented 5 months ago

The publication information (OJ S issue number, Notice publication number and publication date) is added in the notice XML as part of the publication process. You can see this information in the XML available on the TED website.

The service at "https://viewer.ted.europa.eu/api/v2/notices/render" only converts the provided XML notice to HTML or PDF, it does not fetch the publication information to add it to the output.

I guess @pdonohoe used the XML notice retrieved from the TED website, so the publication information was reflected in the PDF.

If you want to get the notice in PDF "as published", I would recommend to download it directly from the TED website.

(Moving this to a discussion, as it is not an issue in the SDK)