How to set margins PDF

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
Hedgehoguse
Posts: 4
Joined: 2012-02-05T20:15:31-07:00
Authentication code: 8675308

How to set margins PDF

Post by Hedgehoguse »

Hello!

Convert TXT to PDF, I need to do a multi-PDF, as TXT file size is not known precisely in advance. There is a problem - the margins are zero, or rather, the text goes beyond the page. I'm trying:

Code: Select all

convert -gravity NorthWest -quality 100 -density 600 -background "#ffffff" -font "c:\Windows\Fonts\courbd.ttf" -pointsize 10 -fill "#000000" tmp.txt tmp.pdf
How to place the converted TXT on the page? Will the use-geometry? Or is this setting for other purposes?

Thanks.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: How to set margins PDF

Post by anthony »

IM can only generate Rasterised PDF. That is PDF with a pixmap. The text is not included in the PDF as text!

See A word about Vector Image formats
http://www.imagemagick.org/Usage/formats/#vector

You may need to look at some other tool for generating vector PDF's from test files. There are lots of text to PDF tools out their that does not rasterize the text.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply