I consider posting some materials as .jpg file on my blog which produced from a .tex document.
This document includes lots of sections which is about 1500-2300 words. I need neither header nor page number. I can also accept the endnotes.
I want each .jpg file corresponded with just a whole section, as shown by follow images. (The images were transformed from a .pdf file.)
page i (also section 1)

page ii (also section 2)

page iii (also section 3)

But, I failed on trying to change the page's height on each page. It is seem that the entire document could set only a fixed page size. I think maybe the requirement can be implemented by
On the beginning of every section, put a
\newpagecommand.Set a sufficient page height value (as we known, the page size of a
.texfile can be several meter long).Typeset the file, record (using some technique) the total length of
vboxat the end of current page.Use the record value to set a new page height.
typeset again, but just typeset the section I needed.
Does above said describe a right way? Could someone tell me how to implement it automatically?
Or is there a more convenient way to achieve the result?
EDIT:
Hi Chris H, the preview package suppressed the setting of\lineskiplimit or/and \lineskip. Try the code below
documentclass{book}
\usepackage[
active, %if annotate the line obtain fig 1
tightpage]{preview}\setlength{\PreviewBorder}{9pt}
\begin{document}
\setlength{\lineskiplimit}{9pt}\setlength{\lineskip}{9pt}
\begin{preview}
\begin{flushleft}
\fbox{It attempt to compare nil with number}
\fbox{It attempt to compare nil with number}
\end{flushleft}
\end{preview}
\end{document}
obtain fig 2.
fig 1

fig 2

So, the substances in each section would be inappropriate.

pdfcrop(or imagemagick, which you may well be using anyway for the pdf-jpg conversion, to crop the resulting pdf). Unfortunately thestandalonedocumentclass ignores\newpage, otherwise it would be your friend here. – Chris H Nov 14 '13 at 09:39standalone? One only needs to remove the footline with the page numbers with\pagestyle{empty}and\thispagestyle{empty}on the first page (article class). Then one can usepdfcropand finallygswith itsjpegdevice (or ratherpng16mor variants for.pngimages). [only trouble will be with footnotes...] – Nov 14 '13 at 13:25preview. I hadn't considered footnotes, I must admit - I don't know if they're an issue here. One advantage ofpreviewis that it's a simpler workflow than going thorughpdfcropas well (generating the "right" pdf then converting it seems more elegant than having to optically crop it. – Chris H Nov 14 '13 at 13:28previewrequires more manual mark-up than\clearpage. (and I don't know if it acts as an environment, in that case it would create a group, which could be annoying. But I should check the doc first). – Nov 14 '13 at 13:30pdfcropon a file with\usepackage[paperheight=200cm]{geometry}, the first page with40lipsum paragraphs and a footnote, the second with only a word. And page numbers removed.pdfcrophandled that instantly. I don't know for real-life situations... and by the way,previewdoes create groups. – Nov 14 '13 at 13:42previewhas the advantages you mentioned about a faster workflow once the mark-up is done; let's see what the OP says, if he is satisfied with it, that's the answer! – Nov 14 '13 at 15:00previewpackage (the adjoining lines are too closed). Would you care for pasting your answer via "standalone" package on? – user41022 Nov 16 '13 at 13:24mpfootnoteandfootnotecounter. Even I load theendnotespackage, it will still be a problem. Could you tell me how to make thempfootnotecounter cooperated withfootnotecounter? See my another question http://tex.stackexchange.com/questions/145304/improper-symbol-mark-of-footnote-in-minipage-environment) – user41022 Nov 17 '13 at 04:55mpfootnote. I have added an answer with the workflow sketched in previous comments. It uses neitherstandalonenorpreview. – Nov 17 '13 at 09:20