Home > other >  About the file read and write
About the file read and write

Time:10-25

I use binary stream data read a PDF file, and then a complete write to another file, save as PDF format, then can open normally, but if I only write in another part of the data file cannot be opened, what's the problem? , actually I just want to write a simple file splitting procedure, have bosses know, give directions,

CodePudding user response:

You want to use a specific format to read the content in a new PDF

CodePudding user response:

This estimate to know about the definition in PDF format, based on binary format you read it, is not a text, want to kao is fine for a somewhere else,
PDF might be inside a check code, used to check whether the file is damaged, incomplete, such as missing a period of don't match, so can't open it

CodePudding user response:

Your request, can search search PDF read package, depends on the package support functions,
According to the first page read/character, read these things again, to create a new PDF

CodePudding user response:

reference administrator reply: 3/f
your request, you can search search PDF read package, depends on the package support functions,
/character according to the first page read, read these things again, to create a new PDF

Settled, Python has a pikepdf library, operation is simple,
  • Related