free software to convert almost 50000 text fles to a single PDF file

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 448
    Windows 10
    Thread Starter
       #11

    Bree said:
    That will print each text file to a separate .pdf (I've just tried it). You would need to combine the 50000 files into a single text file first if you want one .pdf.

    One way to do that would be from a command prompt. Make a new sub-folder to hold the output file, then type all the files and pipe them to the single output file. Something like this:

    Code:
    mkdir TEMP
    for %F in (*.txt) do type "%F" >> TEMP\out.txt
    The sub-folder is necessary, otherwise 'out.txt' will be copied to itself. You need it to be in a different directory.

    Then print out.txt to the Microsoft PDF printer.
    I am not competent enough for cmd. Can you please attach screenshot of cmd commands.
      My Computer


  2. Posts : 15,480
    Windows10
       #12

    Drag all text files to one directory eg c:\text

    Open command prompt

    cd \text

    copy *.txt text.dat
    exit

    Then load text.dat into notepad or word etc. and print file to pdf.
      My Computer


  3. Posts : 448
    Windows 10
    Thread Starter
       #13

    Bree said:
    That will print each text file to a separate .pdf (I've just tried it). You would need to combine the 50000 files into a single text file first if you want one .pdf.

    One way to do that would be from a command prompt. Make a new sub-folder to hold the output file, then type all the files and pipe them to the single output file. Something like this:

    Code:
    mkdir TEMP
    for %F in (*.txt) do type "%F" >> TEMP\out.txt
    The sub-folder is necessary, otherwise 'out.txt' will be copied to itself. You need it to be in a different directory.

    Then print out.txt to the Microsoft PDF printer.
    I am not competent enough to understand the codes but somewhere I think you want me to first combine all text files into a single Text file. Sir, I already have a single Text file which I have splitted into 50000 text files because these 50000 files are one page letters which I need to print randomly as per my search criteria. In notepad I can not select and print the required letter and I have to first copy the required letter to another notepad to finally print that particular letter. In a combined pdf, I can select the page to print. Hope I am able to explain to you. Thanks
      My Computer


  4. Posts : 448
    Windows 10
    Thread Starter
       #14

    cereberus said:
    Drag all text files to one directory eg c:\text

    Open command prompt

    cd \text

    copy *.txt text.dat
    exit

    Then load text.dat into notepad or word etc. and print file to pdf.
    Thanks for the details but somewhere I think you want me to first combine all text files into a single Text file. Sir, I already have a single Text file which I have splitted into 50000 text files because these 50000 files are one page letters which I need to print randomly as per my search criteria. In notepad I can not select and print the required letter and I have to first copy the required letter to another notepad to finally print that particular letter. In a combined pdf, I can select the page to print. Hope I am able to explain to you. Thanks
      My Computer


  5. Posts : 31,630
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #15

    sam9 said:
    ...these 50000 files are one page letters which I need to print randomly as per my search criteria. In notepad I can not select and print the required letter and I have to first copy the required letter to another notepad to finally print that particular letter. In a combined pdf, I can select the page to print. Hope I am able to explain to you. Thanks
    So your problem is not really how to make a combined pdf, but how to print an individual page out of the 50000. Neither Notepad or Wordpad support page breaks, which is what you'd need to be able to have each letter on a single page. A plain text document is not really suitable for what you want to achieve.

    If you have Microsoft Word you could insert a page break between each letter. If you do not have Word, then Libre Office (or Open Office) is free and includes Writer, their equivalent of Word.
      My Computers


  6. Posts : 448
    Windows 10
    Thread Starter
       #16

    Bree said:
    So your problem is not really how to make a combined pdf, but how to print an individual page out of the 50000. Neither Notepad or Wordpad support page breaks, which is what you'd need to be able to have each letter on a single page. A plain text document is not really suitable for what you want to achieve.

    If you have Microsoft Word you could insert a page break between each letter. If you do not have Word, then Libre Office (or Open Office) is free and includes Writer, their equivalent of Word.
    Yes, you are right. I have office 2016. Can you please guide how to open this single text file of 50000 letters with MS world and insert page break between each letter. Though each letter can come on a single page but number of lines in each letter can differ. But one thing is there that all letters start with a specific world and also ends with another specific word. Thanks
      My Computer


  7. Posts : 31,630
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #17

    To open in Word, right-click on the text file and choose 'Open with..' then select Word.

    In Word, at the end of each of your letters insert a Page Break. I don't have Word 2016, but in Word 2010 it's on the 'Insert' tab. You'll then have to save it in a format that supports page breaks, .rtf, .docx .odt or even .pdf will do.
      My Computers


  8. Posts : 448
    Windows 10
    Thread Starter
       #18

    Bree said:
    To open in Word, right-click on the text file and choose 'Open with..' then select Word.

    In Word, at the end of each of your letters insert a Page Break. I don't have Word 2016, but in Word 2010 it's on the 'Insert' tab. You'll then have to save it in a format that supports page breaks, .rtf, .docx .odt or even .pdf will do.
    I have 50000 letters. It means breaking 50000 times. It is practically a huge task which is not possible for me. Any other solution.
      My Computer


  9. Posts : 31,630
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #19

    sam9 said:
    ...practically a huge task which is not possible for me. Any other solution.
    Only if each letter ends (or starts) with a unique word or phrase, such as your signature or name. Then you could use 'Replace all' in Word to replace the phrase with the same phrase, but with a manual page break added. 'Find and Replace' has a 'Special' button that allows you to put a Page Break in the replacement string.

    If there is such a word, but it occurs elsewhere too, you can still use 'Find and Replace', but you'd have to click 'Replace' for each page break you want, and 'Find next' when the word occurs in the middle of a letter.
      My Computers


  10. Posts : 448
    Windows 10
    Thread Starter
       #20

    Bree said:
    Only if each letter ends (or starts) with a unique word or phrase, such as your signature or name. Then you could use 'Replace all' in Word to replace the phrase with the same phrase, but with a manual page break added. 'Find and Replace' has a 'Special' button that allows you to put a Page Break in the replacement string.

    If there is such a word, but it occurs elsewhere too, you can still use 'Find and Replace', but you'd have to click 'Replace' for each page break you want, and 'Find next' when the word occurs in the middle of a letter.
    Thanks, I will try this and will let you know.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:37.
Find Us




Windows 10 Forums