MS edge doesn't render my pdf file

Wojciech Sobiesiak 101 Reputation points
2023-08-18T15:39:34.41+00:00

Hello

I have some problem.

I'm creating an web page that is creating a pdf file, from text I write its content in html element. After that I'm adding header, content from another html elements and all sends throuh MS outlook mail.

Everything looks nice when using firefox, when MS edge, my beutiful pdf file is not rendered.

The file is ok, because, as I mentioned, firefox handles it with smile on its face.

pdf file conent is

%PDF-1.7 %âãÏÓ 
1 0 obj <<   /Type /Catalog   /Pages 2 0 R >> endobj  

2 0 obj <<   /Type /Pages   /Kids [3 0 R]   /Count 3 >> endobj  

3 0 obj <<   /Type /Page   /Parent 2 0 R   /MediaBox [0 0 612 792]   /Resources << /Font << /F1 4 0 R >> >>   /Contents 4 0 R >> endobj  

4 0 obj <<  
 /Length 7517 >> stream BT /F1 12 Tf 72 720 Td (      asasa                                                                                                                                               ) Tj 0 -20 Td (                                                                                                                                                     ) Tj 0 -20 Td (                                                                                                                                                     ) Tj 0 -20 Td (                                               aaaasasa                                                                                                      ) Tj 0 -20 Td (                                                                                                                                                     ) Tj 0 -20 Td (                                                                                                                                                     ) Tj 0 -20 Td (  asas                                                                                                                                                   ) Tj 0 -20 Td (                                                                                                                                                     ) Tj 0 -20 Td (                                                                                                                                                     ) Tj 0 -20 Td (                                                                                                                                                                                                                                                                                          ) Tj 0 -20 Td (                                                                                                                                                     ) Tj 0 -20 Td () Tj ET endstream endobj  

5 0 obj <<   /Type /Font   /Subtype /Type1   /BaseFont /Helvetica   /Encoding /WinAnsiEncoding >> endobj  

xref 0 7 0000000000 65535 f 0000000015 000000 n 0000000062 000000 n 0000000119 000000 n 0000000256 000000 n 0000008565 000000 n 0000008674 000000 n  trailer <<   /Size 7   /Root 1 0 R >> startxref 8661 
Microsoft Edge | Microsoft Edge development
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Anonymous
    2023-08-21T02:58:07.7166667+00:00

    Hi @Wojciech Sobiesiak,

    Everything looks nice when using firefox, when MS edge, my beutiful pdf file is not rendered.

    I tested with the PDF content you provided, in Edge, Chrome, Adobe Acrobat they all show a white background, only in Firefox is a black background, I guess this is the rendering problem you mentioned, right?

    I tried to make a simple modification in the file (drawing a simple pattern with a brush), save it and open the file again. You'll notice that in Firefox, its background color changes from black to white. You can also see in the print preview that the background color is white instead of black. So I think this rendering is correct in Microsoft Edge.

    Based on the above, I'm guessing it might instead be a problem with rendering in Firefox.

    Best regards,

    Xudong Peng


    If the answer is the right solution, please click "Accept Answer" and kindly upvote. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Wojciech Sobiesiak 101 Reputation points
    2023-08-21T14:36:17.8833333+00:00

    Hi XuDong Peng

    You saw it doesn't work with MSedge

    Please take a look a it

    https://www.youtube.com/watch?v=zYIyW6JvCgI


  3. Wojciech Sobiesiak 101 Reputation points
    2023-08-22T16:55:25.4966667+00:00

    XuDong Peng

    Now it works, but let's not close this topic yet, I'm finishing authorization project (adding some logs) and will be making some improvements to this "pdf creator" because found it very interesting.

    I had restarted browser, maybe that helped, but I remember that I thougth "I'm lacky I used firefox because with MS Edge would see nothing and learn nothing".

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.