First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

I have a PDF file broken up and extracted in many different packets how can I reassemble and restore the file?

  • retag add tags

There are ~900 packets when I go to export objects through HTTP, I can download but they cannot be viewed and I am unsure how to reassemble the file to its proper state.

snap's avatar
1
snap
asked 2023-04-14 23:23:44 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

As the "splittig" procedure does not add extra characters nor remove any of them, to reassemble the packets is sufficient to join the packets in the original order, and I assume they have been numbered sequentially.
To do that, any method capable of joining packets is good.
You can use a Ms-Dos command (copy /b file1+file2+.....+fileN Output.pdf), or a public domain tool like WGet (wget -i list.txt -O output.pdf), where in list.txt you put the names of all the files to assemble, just use the straight slash, or even an Excel Vba program, as in the following example:
const prefix="seg-"
const suffix=".ts"
const fileout="output.pdf"
dim i as integer
dim s as string
open fileout for binary as 1
for i=1 to 900
open prefix & i & suffix for binary as 2
s = Input(LOF(2), 2)
put 1,,s
close 2
next
close #1
Obviously, you have to fine tune the names to your situation, specially to account for the numeric part of the packet name, if it is fixed length or variable length.
I hope this helps.

pippuzzo's avatar
1
pippuzzo
answered 2023-04-20 07:41:04 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer