Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
docs for text2pdf
#1
I want to covert some (very simple) text files to pdf. To that end, I imported the text2pdf module. However, I cannot find any documentation on the usage. So I tried things like:

pdf = text2pdf.pdf(file)
pdf = text2pdf.write(file)
pdf = text2pdf.convert(file)

Can anyone point me at documentation for text2pdf.

The reason for this is, I want to use python to print the textfiles. I imported cups and printed a text file:

Quote:conn.printFile('EPSON-L350-Series', '/home/pedro/getEmailtexts/stragglers/17BElate.pdf', 'test', {})

This works great, but there is no kind of formatting. The text is written right along the top edge of the page and very close to the right hand edge.

I tried to print the text as a Libre Office .odt file or a .docx file, but cups can't handle that. When I save the text file as pdf, cups prints it nicely.

Therefore, I would like to batch convert 300+ text files to pdf.
Reply


Messages In This Thread
docs for text2pdf - by Pedroski55 - Dec-16-2018, 07:57 AM
RE: docs for text2pdf - by Gribouillis - Dec-16-2018, 11:54 AM
RE: docs for text2pdf - by Pedroski55 - Dec-16-2018, 11:57 AM
RE: docs for text2pdf - by snippsat - Dec-16-2018, 12:24 PM
RE: docs for text2pdf - by snippsat - Dec-16-2018, 03:20 PM
RE: docs for text2pdf - by Larz60+ - Dec-16-2018, 06:43 PM
RE: docs for text2pdf - by Pedroski55 - Dec-21-2018, 01:38 AM
RE: docs for text2pdf - by snippsat - Dec-21-2018, 06:19 PM
RE: docs for text2pdf - by Pedroski55 - Dec-22-2018, 10:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is 2 a prime number? for loop & range fuction in python docs says yes, mine says no. allusernametaken 4 2,990 Nov-17-2019, 02:56 AM
Last Post: allusernametaken
  pickle docs say bytes in one place, strings in another Skaperen 2 2,200 Jul-29-2019, 05:13 PM
Last Post: Skaperen
  [split] Using this Python version of text2pdf jonsnow1221 1 2,167 May-07-2019, 07:48 PM
Last Post: micseydel
  Using this Python version of text2pdf Pedroski55 1 2,387 Apr-15-2019, 08:12 AM
Last Post: Pedroski55

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020