Document Download PDF Codierung

Der Download funktioniert… Leider ist das PDF über die API falsch codiert.

Method: GET, RequestUri: ‚https://meinedomain.de/api/_action/document/X49c478608dcb4bbeb9fd27743f73263c/0plIgOWM0u412OQ7r0wv6zskMdCXyKOGX?download=1‘, Version: 2.0,
Content: , Headers:
{
Authorization: Bearer eyJ… nRg

Cookie: session-=v9m9s9er7jauvt9nhcorekmo3q
}

StatusCode: 200, ReasonPhrase: ‚‘, Version: 2.0, Content: System.Net.Http.StreamContent, Headers:
{
Content-Security-Policy: object-src ‚none‘; script-src ‚none‘; base-uri ‚self‘;
Server: nginx
Strict-Transport-Security: max-age=31536000; includeSubDomains
Cache-Control: no-cache, private
Date: Fri, 30 Dec 2022 20:41:56 GMT
X-Frame-Options: deny
referrer-policy: strict-origin-when-cross-origin
Access-Control-Allow-Headers: Content-Type,Authorization,sw-context-token,sw-access-key,sw-language-id,sw-version-id,sw-inheritance,fail-on-error,indexing-behavior,single-operation,sw-include-seo-urls
Access-Control-Allow-Origin: *
X-Content-Type-Options: nosniff
Access-Control-Allow-Methods: GET,POST,PUT,PATCH,DELETE
Access-Control-Expose-Headers: Content-Type,Authorization,sw-context-token,sw-access-key,sw-language-id,sw-version-id,sw-inheritance,fail-on-error,indexing-behavior,single-operation,sw-include-seo-urls
Content-Type: application/pdf
Content-Disposition: attachment; filename=Rechnung_R4000060.pdf

Der manuelle Download und der API Download funktionieren.
Nur leider ist der API Download falsch encoded (einige Zeichen falsch in der PDF Datei.)
HTTP Tracker hilft mir nicht weiter.

Welcher Trick hilft ? Vielen Dank !

Die ersten falsch codierten Zeichen sind bei „Producer“.

%PDF-1.7
1 0 obj
<< /Type /Catalog
/Outlines 2 0 R
/Pages 3 0 R >>
endobj
2 0 obj
<< /Type /Outlines /Count 0 >>
endobj
3 0 obj
<< /Type /Pages
/Kids [6 0 R
]
/Count 1
/Resources <<
/ProcSet 4 0 R
/Font <<
/F1 8 0 R
/F2 13 0 R

/XObject <<
/I1 20 0 R
/I2 21 0 R

/ExtGState <<
/GS1 18 0 R
/GS2 19 0 R

/MediaBox [0.000 0.000 595.280 841.890]

endobj
4 0 obj
[/PDF /Text /ImageC ]
endobj
5 0 obj
<<
/Producer (��

@rainer_dsp hast du eine Lösung gefunden?

Ja… aber benutze kein Shopware mehr. Lag anm Header.