Bonjour,
je développe un programme qui consomme une api rest.
Cette api me renvoi un json dans lequel il y un pdf inclus.
Voici a quoi ressemble le retour en json

{"messages":[{"id":"0","type":"INFOS","messageContent":"La requête a été traitée avec succès"}],"bordereauHeader":{"bordereauNumber":31}
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <deliveryPaper>

%PDF-1.3
%????
10 0 obj
<<
/BitsPerComponent 8
/ColorSpace /DeviceRGB
/Filter [/FlateDecode /DCTDecode]
/Height 176
/Length 10041
/Name /Obj0
/Subtype /Image
/Type /XObject
/Width 675

>>
stream
x??zwTS??FT?4??H????????Pr??#E?xlHP??p$?tH?$* "R#A@z -!?$??????????o?7????d?????s~?7?Z?o??vk + @LL ??
%%EOF

Comment puis-je extraire le code du pdf pour l'inclure dans ma fonction fichier:write?
Merci par avance