Skip to main content
Question

Using BOX-SDK - Unable to preview the PDF file, the ext. was changed from .txt to .pdf during Upload

  • May 21, 2025
  • 3 replies
  • 39 views

Forum|alt.badge.img

I am Uploading a "abc.txt" file using the box-sdk upload method.

During upload I am changing the file name to "xyz.pdf".

And If I preview the file in my box account, it is not showing the content and shows the below message. If i download also it is not showing up.

"We're sorry, the preview didn't load. This document may be protected."

 

Do i need to do some stuff instead of changing the filename directly with .pdf extension. if so? what should be done?

3 replies

Forum|alt.badge.img

 To open a txt file as a PDF in Box, you would need to convert the contents of the txt file to the PDF format before uploading the file to Box. You can convert a txt file to the PDF format by opening the txt file in Word or Google Docs, and exporting the file as a PDF. 


Forum|alt.badge.img

Thanks for Reply .

I will try to convert the txt file to PDF using JAVA and try uploading to Box.


Forum|alt.badge.img

Hi ,

 

Am uploading a pdf without password protected, by when i try to download it saying it is password protected.

Did box will protect all pdf with password protected. if so how can i know the password