Convertion of .txt to .pdf is deleting part of the content.

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
claudiogc
Posts: 1
Joined: 2014-08-18T06:57:41-07:00
Authentication code: 6789

Convertion of .txt to .pdf is deleting part of the content.

Post by claudiogc »

Hello, guys!

I'm using "convert" to convert a .txt file to .pdf, but the problem is this conversion is cutting part of the lines. All lines that exceed the margin are deleted. I don't know how explain better so, take a look in these two pictures. My text editor is Sublime Text 2, and i'm using Debian Wheezy 7 with ImageMagick 6.7.7-10 2014-03-08 Q16. The scroll bar at the bottom does not appear, so he is really deleting part of the content.

I pasted a text from bbc.com just to show a test. I'm using the following command to do that convertion. I'm using these args because i want the best quality to my .pdf file.

Code: Select all

convert -geometry 1600x1600 -density 200x200 -quality 100 test.txt test.pdf
If i enter with the following command my .pdf gets very ugly! Looks like they are in bold or, i don't know, blurry.

Code: Select all

convert test.txt test.pdf
Picture 1: http://postimg.org/image/6xuw30ao3/

Picture 2: http://postimg.org/image/wluqhxoet/

How can i fix this problem?
Thank you!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convertion of .txt to .pdf is deleting part of the conte

Post by snibgo »

I wouldn't use ImageMagick for this. IM converts the text into pixels, then stores these pixels in the PDF.

But a PDF can store text directly. Then you can search the PDF files, change the font size, and so on.
snibgo's IM pages: im.snibgo.com
Post Reply