Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 18 APR 2008 03:39:04PM Jim Vaughan wrote:

Will the following code print a jpg (needless to say it doesn't work on my machine), or do I need to do something else?

  JpgName="C:\jim.jpg" 
  [/color]Stat=Set_Printer([/color]"INIT"[/color])  
  Stat=Set_Printer([/color]"BMP"[/color], JpgName, [/color]0[/color]:[/color]@FM[/color]:[/color]0[/color], [/color]0[/color], [/color]1[/color])  
  Stat=Set_Printer([/color]"TERM"[/color])  
[/color][/color][/size]         
               

At 18 APR 2008 03:50PM Jim Vaughan wrote:

OK, talking to myself again…

I have that working I needed a third parameter of 1 (do not scale).

But that brings up a question is it possible to get the maximum size of the printable area for a printer so that I can get a jpg to fit as big as possible on a piece of paper?


At 18 APR 2008 08:36PM Barry Stevens wrote:

have you looked at get_printer("PAGESIZE")


At 18 APR 2008 08:59PM Jim Vaughan wrote:

… no but I will.

Thank you for the help.


At 19 APR 2008 09:50PM Richard Bright wrote:

Jim,

You may wish to look at some scaling system eg

LinePos=Get_Printer("POS")

stat=Set_Printer("CALCBMP", ImPath)

size=Get_Printer("CALCBMP") ;* get the size

bmpWidth =size ;* width

bmpHeight=size ;* height

factor=60

NoScale=False$

Repeat =False$

* Now Scale to x x y - divide all by bpwidth multipy by factor

bmpHeight=bmpHeight * factor / bmpWidth

bmpWidth =bmpWidth * factor / bmpWidth

stat=Set_Printer("BMP",ImPath,30.0:@fm:LinePos:@fm:bmpWidth:@fm:bmpHeight, NoScale, Repeat)

stat=Set_Printer("POS",0:@fm:LinePos + bmpHeight + 2)


At 20 APR 2008 01:45PM Jim Vaughan wrote:

Thanks Richard I'll take a look at that code.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/0c7513312528b4668525742f006bf297.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1