We Want to Hear From You! What Do You Want to See on the Community? Tell us here!

Forum Discussion

Newbie8's avatar
Newbie8
New member | Level 2
3 years ago

Re: Upload PDF files/proper encoding

I need help on this too

3 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    3 years ago

    Newbie8 I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:

    • the name and version number of the platform and SDK/library you are using, if any
    • the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
    • the full text of any error or unexpected output
  • Newbie8's avatar
    Newbie8
    New member | Level 2
    3 years ago

    I am using the Dropbox API V2 SDK for Javascript:
    https://github.com/dropbox/dropbox-sdk-js/tree/4f78b01326afdba5c4198fd092cd74e3e79095f8 

    And I am using the example code they provided which is this one:
    https://github.com/dropbox/dropbox-sdk-js/blob/4f78b01326afdba5c4198fd092cd74e3e79095f8/examples/typescript/upload/upload.ts 
    It works for normal pdfs and other files however it doesn't work with pdfs with fields for user to fill in

    Example pdf file: 
    Original File: http://foersom.com/net/HowTo/data/OoPdfFormExample.pdf 

    Resulting File: 

     

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    3 years ago

    Can you elaborate on what you mean when you say "it doesn't work"? Are you referring to elements not being rendered properly as seen in that screenshot? If so, what application are you using to render that PDF? The process of uploading files to Dropbox is separate from how you then view those files.

     

    For reference, the Dropbox API will accept and commit whatever bytes you upload, e.g., using the filesUpload method, regardless of file type. It doesn't modify or re-encode the bytes you supply, so make sure you're supplying the exact unmodified bytes that you want uploaded to Dropbox. Exactly how any particular PDF data is rendered depends on the application you use to render it.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 3 days ago
411 Following

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!