Open gbouget opened 3 months ago
Hey, I downloaded the "body_response_pdf_binary.log" but Firefox only shows a Blank page after renaming it to .pdf and opening it. Maybe it could be corrupt during the upload. Could you upload the file again? You can upload .pdf directly to GitHub without changing the file extension.
I've updated a lot of the code in my application and database. However, I used an online tool to convert the base 64 into a binary file (https://base64.guru/converter/decode/file). The PDF in base64 format is saved in the attribute named “content” in the body_response.json file.
Thank you, I can reproduce it with your PDF. It looks like s small style issue (Canvas is moved the to right, but Text layer not), but it could be a problem with the library.
Rendering is correct if the parent frame is not too large (01.PNG). Otherwise, there's a mitchmatch (02.PNG).
Perhaps theses styles (https://github.com/usebruno/bruno/issues/970)?
case 'preview-pdf': {
return (
<div className="preview-pdf" style={{ height: '100%', overflow: 'auto', maxHeight: 'calc(100vh - 220px)' }}>
<Document file={`data:application/pdf;base64,${dataBuffer}`} onLoadSuccess={onDocumentLoadSuccess}>
{Array.from(new Array(numPages), (el, index) => (
<Page key={`page_${index + 1}`} pageNumber={index + 1} renderAnnotationLayer={false} />
))}
</Document>
</div>
);
}
I have checked the following:
Describe the bug
There is a spacing like a "padding-left" in PDF preview. When i use others tools, the render is fine.
Version : 1.22.0
Attachment:
.bru file to reproduce the bug
No response
Screenshots/Live demo link
body_response_pdf_binary.log
body_response.json
Preview bruno:
Viewing firefox: