简体   繁体   English

解码 pdf stream 以渲染 pdf

[英]Decoded a pdf stream to render pdf

I am trying to render a pdf source stream to a visual pdf in HTML.我正在尝试将 pdf 源 stream 渲染为 Z4C4AD5FCA2E007A3F744DBB1 中的视觉 pdf I have the stream source data but I not sure how to decoded/render this to a visual pdf.我有 stream 源数据,但我不确定如何将其解码/呈现为可视 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.所以事实证明,如果我将该文件保存为 ext.pdf。 any browser, pdf reader will be able to read it.任何浏览器,pdf 阅读器都可以阅读。 No need to created your own render engine.无需创建自己的渲染引擎。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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