简体   繁体   中英

Decoded a pdf stream to render pdf

I am trying to render a pdf source stream to a visual pdf in HTML. I have the stream source data but I not sure how to decoded/render this to a visual pdf. Code looks something like this.

    %PDF-1.3
    %����
    1 0 obj 
    <<
    /Pages 2 0 R
    /Type /Catalog
    >>
    endobj 
    2 0 obj 
    <<
    /Kids [3 0 R]
    /Count 1
    /Type /Pages
    >>
    endobj 
    3 0 obj 
    ...
    
stream
��E�+&z5�C8̔Ec8�<�3��~<�Ǚ�(R�HBSfq�n!����Q�gf@B����#��8�r8)��>ϳ8�RC8)">�>�UL&�P�P�T��aSp�S
��MR��i����%�:�Qѝ�����fv����i�3;Tgw3�9tgk3���*3�Y�Fv����Q��ׯ4���9��� �9���y�9�l�G��N�����D~��O�S����{���o��>���=#��x��g�<q��<�a)��D�����?'�"?�8��   �q����?���>�����=�����x�����]qǒ���H��r����sۂ#�48H�憍F{��y���k���C�g�^]v���Z�=(��a~����}U\�$*���Ǵq��?�"{b�K�q�>>?��D�b��^5�׸���ǯ�-y����;]�G����=�~?�0?������D`������oI�"?Y��a�<?������,]*_�O��?����g��ǧ�����g��c��
-�9����C�K���/��������^z}z��]}}z�9�Z��g?��W�����j�Q������1����������ӵ/U�n��]�y��"�ϵ�SJ�5�v��f3��k�t�joJ����+�����+b�����A�S60A��
�b�-o��Aȷc�ȰW��`�b�A��8��lr,ȹ������au���l�)�i��������?��k�
    
    <<
    /Info 9 0 R
    /Root 1 0 R
    /Size 10
    >>
    startxref
    43084
    %%EOF

Any ideas?

so it turns out that if I save that file as ext.pdf. any browser, pdf reader will be able to read it. No need to created your own render engine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM