[Freeswitch-users] Fax document number of pages

Steve Underwood steveu at coppice.org
Wed Feb 27 04:00:50 MSK 2013


On 02/27/2013 08:34 AM, Tihomir Culjaga wrote:
>
>
> On Wed, Feb 27, 2013 at 1:17 AM, Steve Underwood <steveu at coppice.org 
> <mailto:steveu at coppice.org>> wrote:
>
>     Hi Tihomir,
>
>     On 02/26/2013 11:42 PM, Tihomir Culjaga wrote:
>     > hello,
>     >  i know its stupid, but please, is there a way to somehow print the
>     > number of pages on a document in a <pages>/<total_pages> format
>     > instead of p.<pages>  ?
>     >
>     > i cannot find this in mod_spandsp so i assume its somewhere in
>     spandsp
>     > library... any idea where ?
>     >
>     >
>     > regards,
>     > Tihomir.
>     >
>     Spandsp just follows the practice in most FAX machines, and puts
>     p.<number> in the page headers. Spandsp doesn't actually know the
>     total
>     number of pages when it sends the first page, as it allows additional
>     TIFF files to be added to the transmission while a call is in
>     progress.
>     <page>/<total> could be set up for the simple case of one call == one
>     TIFF file, but that's not in the code right now.
>
> Hi Steve, thanks for the prompt answer.
>
> yeah, i was afraid so... just for curiosity, where is the code that 
> puts p.<number> in the page header ?
>
> also, how do you send multiple tiff files during one call session ... 
> something like txfax('file1','file2','file3'....) ?
>
> Regards,
> Tihomir.
>
A quick grep of the source shows it is in t4_tx.c. If you want to change 
it, be careful not to make your new string longer, or it won't fit.

If the variable tiff.pages_in_file in the T.4 structure is > 0 it should 
contain the number of pages in the current TIFF file. However, that does 
not allow for the start_page and stop_page limitations, which are in the 
T.30 structure, and not directly available to the code in t4_tx.c.

Steve




Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list