Page 1 of 1
Printing problems
Posted: Thu Sep 20, 2018 6:02 pm
by Da_Elf
Im printing the content on a card which is a barcode made up of 95 two pixel wide rectangles. When i print them they show up as skinny lines and not 2 pixels wide. When i export a png it all looks fine. So i figure i should calculate the barcode with my generator. then copy the png data to clipboard, paste it over everything then print that. but im having trouble figuring out the copy to clipboard then insert as image over everything part
from the dictionary i can find this
export image 1 to myVariable as png with standard palette
how do i get it back into an image again
Re: Printing problems
Posted: Thu Sep 20, 2018 6:14 pm
by Klaus
Hi Da_Elf,
you can export directly to another image:
Code: Select all
export image 1 to image "the one to be printed" as png with standard palette
Or if you want to use your variable:
Code: Select all
export image 1 to myVariable as png with standard palette
...
set the text of img "another image for printing" to myVariable
## or
## put myVariable into img "another image for printing"
Hope that helps!
Best
Klaus
Re: Printing problems
Posted: Thu Sep 20, 2018 9:41 pm
by Da_Elf
That was sooo much help. this is weird. this is the code im using with your new suggestion.
Code: Select all
put the short name of this stack into stackit
--export snapshot from this card to file "File1.png" as PNG
export snapshot from this card to image "standby" as png with standard palette
set the layer of img "standby" to top
set visible of img "standby" to true
set the formatForPrinting of stack stackit to false
set the printerName to deprinterR
set the printPaperOrientation to "portrait"
set the printMargins to 0,0,0,0
set the printPaperSize to 612,792
put (612/(the width of stack stackit)) into prntScl
set the printScale to prntScl
print stack stackit
set the formatForPrinting of stack stackit to true
set visible of img "standby" to false
here are my results. without the export fix i printed to printer and pdf and got the same skinny lines. When i used the commented out export it looked good. So now im exporting to an image which i overlay everything and then print to pdf and it all looks good now.
Re: Printing problems
Posted: Thu Sep 20, 2018 9:57 pm
by Klaus
Hi Da_Elf,
glad I could help!
Quick and very wild guess:
Were the many rectangle graphics, that did not want to print out correctly, anti-aliased?
If yes, try without and vice versa.
Best
Klaus
Re: Printing problems
Posted: Thu Sep 20, 2018 10:39 pm
by Da_Elf
great minds think alike. yes they were and i turned it off to the same result. When the codes were done larger they printed fine. its when i redesigned them smaller to fit on a 3x10 sticker sheet that i got the problems.
I started to think what if its when my card is resized during printing since the card is 1020 x 1320 and is shrunk down to 612 x 792 so i upped the print size but no good since that is what livecode says a piece of letter paper is in pixel size at 72DPI (screen res). There doesnt seem to be enough options on resolution during printing
Re: Printing problems
Posted: Fri Sep 21, 2018 4:48 pm
by jacque
I think you've got it right, the scaling will reduce everything on the page. If you know you will be reducing the size for printing then the fix is to double the height and width of the lines so that they are proportional when reduced. If you do that then you probably won't need the image.
Another way to fix it would be to reduce the stack size so that the lines are proportional to that and then use the "into rect" printing option to scale the page up on the printer.