Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

style: Run pre-commit --all-files to fix formatting

Louisf89d497fd147
diff --git a/browser_use/filesystem/file_system.py b/browser_use/filesystem/file_system.py
index 3a62e13cb..c0cb7eaa7 100644
--- a/browser_use/filesystem/file_system.py
+++ b/browser_use/filesystem/file_system.py
@@ -126,12 +126,12 @@ class PdfFile(BaseFile):
doc = SimpleDocTemplate(str(file_path), pagesize=letter)
styles = getSampleStyleSheet()
story = []
-
+
# Convert markdown content to simple text and add to PDF
# For basic implementation, we'll treat content as plain text
# This avoids the AGPL license issue while maintaining functionality
content_lines = self.content.split('\n')
-
+
for line in content_lines:
if line.strip():
# Handle basic markdown headers
@@ -146,7 +146,7 @@ class PdfFile(BaseFile):
story.append(para)
else:
story.append(Spacer(1, 6))
-
+
doc.build(story)
except Exception as e:
raise FileSystemError(f"Error: Could not write to file '{self.full_name}'. {str(e)}")