{"id":21894022,"url":"https://github.com/ayush272002/textomatic","last_synced_at":"2025-03-22T04:09:16.925Z","repository":{"id":264721895,"uuid":"894202893","full_name":"Ayush272002/Textomatic","owner":"Ayush272002","description":"Textomatic is a Java tool that converts plain text files into formatted PDFs using the iText library. It supports various text formatting options like bold, italics, font size, and indentation.","archived":false,"fork":false,"pushed_at":"2024-11-26T00:03:22.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T03:29:39.858Z","etag":null,"topics":["documentgeneration","itextpdf","java","pdf"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ayush272002.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-25T23:57:22.000Z","updated_at":"2024-11-26T00:05:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"b87a7726-012f-477c-ac0c-8db68fb21268","html_url":"https://github.com/Ayush272002/Textomatic","commit_stats":null,"previous_names":["ayush272002/textomatic"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush272002%2FTextomatic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush272002%2FTextomatic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush272002%2FTextomatic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush272002%2FTextomatic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ayush272002","download_url":"https://codeload.github.com/Ayush272002/Textomatic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244902930,"owners_count":20529115,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentgeneration","itextpdf","java","pdf"],"created_at":"2024-11-28T13:18:17.840Z","updated_at":"2025-03-22T04:09:16.913Z","avatar_url":"https://github.com/Ayush272002.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Textomatic\n\n**Textomatic** is a simple tool that converts plain text files into well-formatted PDF documents. This project allows you to format text based on commands within the input file, such as changing fonts, sizes, adding indentation, bold, italics, and more. It's built using Java and iText library to generate PDFs from text inputs.\n\n## Features\n\n- **Text Formatting:** Supports font sizes, bold, italics, and regular text formatting.\n- **Paragraph Handling:** Allows you to define paragraphs with different indentations and fill options (justified or normal).\n- **Pagination:** Automatically adds page numbers to the document.\n- **Customization:** Customize text content and formatting commands through an input text file.\n- **Multiple Pages:** Automatically handles pagination for large documents.\n\n## Commands\n\nThe input text file can include special commands to control how the text is formatted:\n\n- **.large** – Increases the font size.\n- **.normal** – Resets the font size to normal.\n- **.paragraph** – Starts a new paragraph.\n- **.bold** – Sets the font to bold.\n- **.italic** – Sets the font to italic.\n- **.regular** – Resets the font to regular.\n- **.indent \u003cnumber\u003e** – Indents the paragraph by the specified number.\n- **.fill** – Justifies the text (fills the paragraph).\n- **.nofill** – Sets the default text alignment (left-aligned).\n  \n### Example Input:\n\n```\n.large\nMy PDF Document\n.normal\n.paragraph\nThis is my first pdf document, and it is formatted well.\n.fill\nLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n.nofill\n.indent 4\nThis is a new paragraph with indentation.\n```\n\n### Example Output:\n\nThe generated PDF will include the content formatted as per the commands, with appropriate font sizes, styles, indentation, and page numbers.\n\n## Requirements\n\n- **Java 8 or higher** – Make sure you have Java 8 or later installed.\n- **iText 5.5.13** – iText is used to generate the PDF from the formatted text.\n\n## Installation\n\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/Ayush272002/Textomatic.git\n   ```\n\n2. **Navigate to the project directory:**\n   ```bash\n   cd Textomatic\n   ```\n\n3. **Compile and run the project:**\n   - If you're using **Maven**, you can compile and run the project by using the following commands:\n     ```bash\n     mvn clean install\n     mvn exec:java\n     ```\n   - Alternatively, if you're using an IDE like **IntelliJ IDEA** or **Eclipse**, you can import the project and run the `Main` class directly.\n\n4. **Input File:**\n   Place your input text file (e.g., `input.txt`) in the project directory, or specify the path to the file in the code.\n\n5. **Output File:**\n   The generated PDF file will be saved as `output.pdf` in the project directory.\n\n## Usage\n\n- The program reads the input text file line by line.\n- It parses and applies commands to format the text according to the specified rules.\n- The output is a PDF document that reflects the formatting and pagination instructions from the input file.\n\n## Example Command Line Execution:\n\n```bash\njava -jar Textomatic.jar\n```\n\nThis will take the content from `input.txt`, apply formatting based on the commands inside the file, and generate a PDF file `output.pdf` in the working directory.\n\n\n## Contributing\n\n1. Fork this repository.\n2. Create your feature branch (`git checkout -b feature-name`).\n3. Commit your changes (`git commit -am 'Add new feature'`).\n4. Push to the branch (`git push origin feature-name`).\n5. Open a pull request.\n\n## License\n\nThis project is licensed under the MIT License – see the [LICENSE.md](LICENSE.md) file for details.\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayush272002%2Ftextomatic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayush272002%2Ftextomatic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayush272002%2Ftextomatic/lists"}