Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Under review by Community Managers

Under review

Thank you for your post! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

PDF Empty

Posted on by

Hi all

I'm trying to upload a PDF, it seems after I use the base64 Converter the data generated is an empty pdf.

Can it be that the Base64Convert.FromBase64 does not work properly ?

If yes, is there a workaround ?

Code:

//Get Base64 string
                httpResponse.Content.ReadAs(Success);
                FinalString := Base64Convert.FromBase64(Success);
                tempBlob.CreateOutStream(FinalOStream, TextEncoding::UTF8);
                FinalOStream.WriteText(FinalString);
                tempBlob.CreateInStream(FinalInstream);
Success = Base64 string - works fine
FinaleString example - when saved as PDF the PDF shows two empty pages
%PDF-1.7
%����
5 0 obj
<</Filter/FlateDecode/Length 2473>>stream
X �[ko�6�^ ��_����X���M7������ز=]�L33n�E�J�D�3 �ĎB�sxy��%E?��3Q�jA���J����Ib��F���Od�ʹ�VXb��RK�<e�O��[�X��o$��{O����wDA�Ud�]n'�1K��dqC���~��������,�J^/�|�1�re��B��Pi���%��S�hG4�Ġk��c6^]�cf��xE9+�_��j��;�Xwbl

�n���j��^����:x��#Ֆ�5V�)�:����
dw��~{�_nփ �#ˠ{B�巯�V���*m��t�h1��R�y�@E��a�1!=�����#�9������)� ������%�i?�:�]����1ҖgT07�4y8*�#������q�gO G1WMR��6i��7生����TK�����g�z.���#VzN ���`*��q e� 쇀+!Mm ��v{�f�]]�zX9���H��H]/w��*�g�xO'Яc��0T^.Ag�fT���n���n���d)�d389C9�[���l����
"����2{X����r���xO�PK�L��r5�@���H�kb3A���S��RbZs�P
�p�=��W�
�c�KD���*�w�_7˦�N���U�P{�9b£��R��oO|t��4C��P�%E"� p�E��Q[ U�8����k%z�VVC+�����dl��� *�O�s1/��ޫlw�]�j��AU
ӑ���&�
8�hU�u�hu�k��KM����ѓ��W��[1HOb�R�*�!s��ӓʇz�A��rO~�.[I�f�L�"�0�J�Hb��F����x��c��M�꣦$�2�U��S�pSҕ�
r���� r�$�z��V fdE�6�E�^�*�YU�OOKd-���6��}w�`#"���^�Au(҃"�L����G?l7?g���6�נ�m���ݣV�ED�R3/������N���f����G�r�T������(�{T!�4@�;@;T��"Ğ3�����l��^T�va��]��PQ{D�����f��ݣP����n��v��+.��CvaX�jti�� �� E��g�K����.�>}�h�!⊒��+�xX$���S�V��2���A�^5�j���1�9�RT��(�5�2S�7=�����֟%��)#YW':v���K��*N�NPq ;Q��0�U
BΠ�sP�%�#���X�Np3�Xb;�<?Gđ�d�D�&�8�;.�v���q��.�sH�q��������lz�'���J��PoMT���?P��#��/T
���G2�ɖ?;|�������>�b�坚�8��O<y̏Z_`K�͖��w���U�A8��$&lT#����}��e&*Q�g���H��D%��L��]��7���* ՘g�!��ٹѨ�P 8CJ �P�8! )��d�+�jfIA�p��RPj�ȫ�W�e�V4e0�<�=�p��N*Yq(|�(�Hw7���20�1�����7�#�)��5 "�D�7948�cj�P��3�b9�q�Pd���-ᔑ/�����nO�W���r�����u�;������u�o��u:����uB9����h�=I�P��
/���~h�]��h���ON�sح&4�PIۑ�Ҫ �'# Ն"���"!��
�*��%T����sz�#� �X�d��y�ETi5�}gn
U�@�7�(r/?�����r�yܓ��9��6T[s�>U�N
Categories:

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,552 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,552 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans