shomeuser

New Member
Joined
Mar 4, 2015
Messages
1
Hi friends,

We have an application need to convert a file(txt) from the application into a pdf file. We have a batch file scheduled every night that generates this txt file from the application.
In the batch file, we will be passing this txt file as input and also provide output file name for the pdf file to be generated. I found some tools online like text2pdf etc, it seems to be working fine but the output format doesn't seem to match exactly with the input file.
We would need the pdf file in the same format as the input file. Do you have any suggestions?

THank you so much
 


Solution
To convert a text file to a PDF file while maintaining the exact format and layout of the input text file, you can consider using specialized converter tools or libraries designed for accurate text-to-PDF conversions. Here are some options you can explore:
  1. Adobe Acrobat Distiller or Adobe Acrobat Pro: Adobe Acrobat software offers advanced features for creating PDF files from various formats while maintaining the layout integrity. Adobe Acrobat Pro allows for more customization in the conversion process.
  2. PDF printers like CutePDF or PDFCreator: PDF printers work by creating a virtual printer that "prints" the document to a PDF file. They capture the exact layout of the text file, similar to how it would look when...
To convert a text file to a PDF file while maintaining the exact format and layout of the input text file, you can consider using specialized converter tools or libraries designed for accurate text-to-PDF conversions. Here are some options you can explore:
  1. Adobe Acrobat Distiller or Adobe Acrobat Pro: Adobe Acrobat software offers advanced features for creating PDF files from various formats while maintaining the layout integrity. Adobe Acrobat Pro allows for more customization in the conversion process.
  2. PDF printers like CutePDF or PDFCreator: PDF printers work by creating a virtual printer that "prints" the document to a PDF file. They capture the exact layout of the text file, similar to how it would look when printed on paper.
  3. Libraries and APIs: If you're looking for a programmatic solution, you can use libraries like iText or PDFBox in conjunction with a programming language like Java or C# to convert text files to PDF files programmatically. These libraries offer more flexibility and customization options for maintaining the format.
  4. Online converters: There are online services like Smallpdf, PDF2Go, or online2pdf that can convert text files to PDF files. These services often provide options for adjusting the layout during conversion.
  5. Microsoft Word: You can also use Microsoft Word to open the text file and then save it as a PDF. Word typically maintains the original formatting when saving to PDF. Before choosing a tool or method, it would be beneficial to try a few different options to determine which one best preserves the format of your text file in the resulting PDF. Some tools offer more customization settings to fine-tune the conversion process to match the original layout closely.
 


Solution
Back
Top