t.clarke | 4 May 2012 15:47
Picon

'padding' a print-file with extra lines

Hi

Does anyone know of a utility that will convert a print-file containing
form-feeds such that the converted output has no form-feeds but instead
has added blank lines to effectively 'pad' to N lines per 'page'.

This may seem an odd request,  but I need to take bog-standard print-files
with variable lines per page (delimited by form-feeds at arbitrary points)
and convert to files that are a multiple of N lines, such that when run through
a txt2pdf converter the resultant pdf pages align with the original source.
Hope that makes sense.......

Tim

--------------------------------------------------------------------------------
This E-Mail (and any files transmitted with it) is intended solely for the use
of the individual or entity to whom it is addressed. If you have received it in
error please notify the sender and delete the message.

Seacon Terminals Ltd, Company No. 1547396, registered in England and Wales
Registered Office:  Tower Wharf, Northfleet, Kent, DA11 9BD, England

--
Gllug mailing list  -  Gllug <at> gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug

Andy McGarty | 4 May 2012 16:14
Favicon

Re: 'padding' a print-file with extra lines

On 04/05/12 14:47, t.clarke wrote:
Hi Does anyone know of a utility that will convert a print-file containing form-feeds such that the converted output has no form-feeds but instead has added blank lines to effectively 'pad' to N lines per 'page'. This may seem an odd request, but I need to take bog-standard print-files with variable lines per page (delimited by form-feeds at arbitrary points) and convert to files that are a multiple of N lines, such that when run through a txt2pdf converter the resultant pdf pages align with the original source. Hope that makes sense....... Tim -
Have you looked at htmldoc?  I use it to create customer bills with page breaks.

Not sure how it would handle just text with no html.  Might have to replace \n with <br> first?
oh and the form feed with <!-- NEW PAGE -->



--
Gllug mailing list  -  Gllug <at> gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
Fred Youhanaie | 4 May 2012 16:44
Picon
Favicon

Re: 'padding' a print-file with extra lines


On 04/05/12 14:47, t.clarke wrote:
> Hi
>
> Does anyone know of a utility that will convert a print-file containing
> form-feeds such that the converted output has no form-feeds but instead
> has added blank lines to effectively 'pad' to N lines per 'page'.
>
> This may seem an odd request,  but I need to take bog-standard print-files
> with variable lines per page (delimited by form-feeds at arbitrary points)
> and convert to files that are a multiple of N lines, such that when run through
> a txt2pdf converter the resultant pdf pages align with the original source.
> Hope that makes sense.......
>
> Tim
>
> --------------------------------------------------------------------------------
> This E-Mail (and any files transmitted with it) is intended solely for the use
> of the individual or entity to whom it is addressed. If you have received it in
> error please notify the sender and delete the message.
>
> Seacon Terminals Ltd, Company No. 1547396, registered in England and Wales
> Registered Office:  Tower Wharf, Northfleet, Kent, DA11 9BD, England
>
> --
> Gllug mailing list  -  Gllug <at> gllug.org.uk
> http://lists.gllug.org.uk/mailman/listinfo/gllug
>

The first utility that comes to my mind is "pr", but you will end up with a 3 line header on each page that you
will then need to filter out before converting to pdf.

HTH

Fred
--
Gllug mailing list  -  Gllug <at> gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug

t.clarke | 5 May 2012 09:31
Picon

Re: 'padding' a print-file with extra lines

Good spot  - thanks !
ps with the -t option works nicely, although the reports we produce contain
an initial form-feed character (historical) which results in an initial blank
'page' of 66 lines.  However, we already use a print-filter which removes the
initial form-feed on printing (called 'print' below), so that:
print report | pr -t - > output-file
appears to work very nicely

Tim
--
Gllug mailing list  -  Gllug <at> gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


Gmane