Skip to content

Output Format? #37

@TheBearF8

Description

@TheBearF8
    return pdftk.input('MASTER_test.pdf').fillForm(data).flatten().output(fileName);

Saves the file locally on the server with fileName
and sends back the buffer but in numerics/numbers 378068704549465410372262.....

was expecting to see something like
%PDF-1.4
%����
1 0 obj

Is the buffer formatted? how do we get from numbers to ASCII text

I tried

private bin2string(array) {
        var result = "";
        for (let idx = 0; idx < array.length; idx++) {
            result += String.fromCodePoint(array[idx]);
        }
        return result;
    }

Which is close I get
%PDF-1.4
%âãÏÓ <<-- this is wrong
1 0 obj

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions