I have the following print statment
print card 2 from the topLeft of graphic "OuterRect" on card 2 to the bottomRight of graphic "OuterRect" on card 2
and I want to create a .jpg to a file instead.
Context:-
At the moment, a series of cards (with a constant and fixed print area smaller than the actual card) are printed to paper one after another.
I now need to generate a JPEG of this printed area instead and save it to file.
How can the line of code be changed to do this?
The file name and path can be assumed to be set up already and as each card is cycled through, the file name will be incremented by the code.
How do I print a JPEG ?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: How do I print a JPEG ?
Hi Happyrever,
Best regards
Jean-Marc
You can use export snapshot like this :I now need to generate a JPEG of this printed area instead and save it to file.
Code: Select all
put the rect of graphic "OuterRect" into tRect
export snapshot from rect tRect to file MyPathFile as JPEG -- MyPathFile is a valid path
Jean-Marc
https://alternatic.ch
-
- Posts: 55
- Joined: Sat Sep 10, 2011 12:22 pm
Re: How do I print a JPEG ?
Thank you for the answer, it needed a slight modification because although the coordinates were correct, they were taken from the graphic, but used in export as screen coordinates.
the alteration was this
export snapshot from rect tRect on card 1 to file MyPathFile & ".jpg" as JPEG
The ref to the card was key to the solution, because it applied the export back to card coordinates.
The card number only relates to this specific case and is not part of the problem.
Thank you very much jmburnod for the great help.
the alteration was this
export snapshot from rect tRect on card 1 to file MyPathFile & ".jpg" as JPEG
The ref to the card was key to the solution, because it applied the export back to card coordinates.
The card number only relates to this specific case and is not part of the problem.
Thank you very much jmburnod for the great help.