Skip to content

Conversation

@TriptiMirani
Copy link

This pull request introduces functionality for exporting chat history as a PDF file, allowing users to print, open, and share their conversation records on clicking the download button on the top-right corner of chat_page. The key features include:

  • Chat Retrieval & Decryption: Fetches chat history from the SQLite database and decrypts messages using RSA for better readability.
  • PDF Generation: Formats chat messages into a structured PDF layout, including timestamps and message types (text, file, voice).
  • Print Support: Enables direct printing of the generated PDF using the printing package.
  • Open PDF: Opens the generated PDF using the default file viewer.
  • Share PDF: Allows users to share chat history via external apps (e.g., WhatsApp, Gmail) using share_plus.
  • Error Handling & UI Integration: Displays appropriate messages for failures and integrates buttons in ChatExportScreen for user interaction.

This enhancement improves accessibility and usability, enabling users to securely store and share their chat history. 🚀

Here is an example of conversation between Jake Peralta and Amy Santiago.

Screenshot from Jake's end:

PDF Generated on Jake's end:
chat_history_1740073806094.pdf

Screenshot from Amy's end:

PDF generated on Amy's end:
chat_history_1740074296098.pdf

Note:

  1. We can't see emojis in the pdf as the PDF library doesn't handle emoji characters well.
  2. We can't see the image being sent through the chat, which is a bug that needs to be addressed.

…hat_page which then prompts the user to view the pdf from any app we want or share it through any medium we want
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant