Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's unclear from your post and your comments what you're really trying to accomplish. Your original question seemed to be about merging multiple PDF files into a single .dat file, which you expected to be able to open with acrobat.</p> <p>If that's what you're trying to do, then I suggest using <a href="http://pdfbox.apache.org/" rel="nofollow noreferrer">Apache PDFBox</a> and in particular the <a href="http://pdfbox.apache.org/apidocs/org/apache/pdfbox/util/PDFMergerUtility.html" rel="nofollow noreferrer">PDFMergerUtility</a> class. An outline of the code would be like this:</p> <pre><code>PDFMergerUtility merger = new PDFMergerUtility(); File[] files = folder.listFiles(); for (File file : files) { merger.addSource(file); } merger.setDestinationFileName("output.pdf"); merger.mergeDocuments(); </code></pre> <p>That should combine your source files into a single large PDF file. You could, of course, use a .dat extension on this file, but I'm not sure why you would do so. The only thing that would accomplish is to break the file extension association so double-clicking the file wouldn't open it.</p> <p>The second question you were asking was how you break the data into 200KB chunks. I'm unsure why you want do do this. If you do this, you will not (necessarily) be able to open the resulting files in Acrobat. PDF files are pretty specific about their internal format. Partial files will not open. If the goal is to have one output file for each input file, then a simple file copy would accomplish this. If the goal is to take all of these files and merge them into a single stream in 200KB chunks (again, why?), then you might want to consider using a compression library instead. In that case, <a href="https://stackoverflow.com/questions/4513305/java-split-huge-file-into-multiparts-zip-how-to">this answer</a> may get you started.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload