On 2/12/2009 6:55 AM, Frank Cox wrote:
> On Tue, 2009-12-01 at 19:04 +0000, lrspares45 wrote:
>
>    
>>> Is there a way to make PDF the default instead?  Or just remove the
>>> Postscript
>>> entry from that drop-down menu completely?
>>>
>>>        
>> I found this too when upgrading to 1.18. Luckily the solution is simple
>> - go to the PDF templates and a few lines down there is a right and left
>> margin setting. I'm at home now so don't have it in front of me, but
>> alter the right margin to get it to fit (I seem to remember changing
>> 1.00 to 2.00 cm or something like that). You have to do it for each
>> template, but once done make back-ups they don't get overwritten if you
>> re-install.
>>      
> Thanks for your reply.
>
> The PDF invoice works fine as it is.
>
> Is there a way to make PDF the default instead of Postscript?  Or is
> there a way to remove the Postscript entry from that drop-down menu
> completely?
>
>    
Try this Frank

locate the file io.pl
on my Ubuntu system it is in /usr/share/ledgersmb/bin
copy it to the bin/custom directory
cd /usr/share/ledgersmb/bin
cp io.pl custom/
open custom/io.pl in a text editor (vi, nano, gedit, emacs)

find the line that says
$format =~ s/(<option value="\Q$form->{format}\E")/$1 selected/;
and change it to
$format =~ s/(<option value="pdf")/$1 selected/;

then find the line that says
$media =~ s/(<option value="\Q$form->{media}\E")/$1 selected/;
and change it to
$media =~ s/(<option value="screen")/$1 selected/;

I had difficulty figuring where $form->{format} was initialized so I'm 
not sure if this change will have detrimental effects and I have not 
tested this in production but I think it does as you require.



------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Ledger-smb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users

Reply via email to