So you're saying if I get a page size that is more than 72x8.5 by 72x11
then I could be printing at a higher DPI? And you're saying the page size
that's returned may not exactly be 72x8.5 or 300x8.5? I'm guessing that
would be because of the margins and options the user chosen in the print
dialog. I'll have to check.

But that means by the time the user finally presses the print button on the
OS print dialog the DPI is set in stone. That's when we get to add and
scale the display objects we want to print. It sounds like then if I scale
the display object after getting the page size information it won't change
the DPI of the actual printout but will give me enough information to know
what it is.

The way I've been testing this is by choosing the Open as PDF option in the
print dialog but I think I'll have to do some print outs.

Do you know why certain things like Button would not look correctly in the
printout? It looks like the button was vectorized (actual graphics data or
commands were used) but not all of them. for example, the button has a
thicker border than normal and it's label is text selectable but the
button background is missing. in the PDF the button scales up as a vector
would. does ui component bitmap capture highlight have anything to do with
it?

On Wednesday, January 29, 2014, Alex Harui <[email protected]> wrote:

> I'm definitely not the expert on printing, but in my limited experience,
> after the call to flexprintjob.start() you now know the page size.  IIRC,
> the page size often has an unexpected size.  Like if you think you've used
> the PrintDialog to set up a 300 dpi print on an 8.5x11 inch page, you don't
> get a page size of (300x8.5 by 300x11). But I could be wrong about that.
>  But I don't think it is 72*8.5 by 72x11.  Or is it?
>
> IIRC, the next step is to generate a display object to pass to
> flexprintjob.  If you generate a display object that is larger than the
> page size, it will get clipped or print on multiple pages.  If you scale
> the children being put in this display object, then it should print with
> the scaled child.  What I don't know is if that scaling will do the right
> thing for a bitmap.
>
> -Alex
>
>
>
> From: jude <[email protected] <javascript:;><mailto:
> [email protected] <javascript:;>>>
> Reply-To: "[email protected] <javascript:;><mailto:
> [email protected] <javascript:;>>" <[email protected]<javascript:;>
> <mailto:[email protected] <javascript:;>>>
> Date: Wednesday, January 29, 2014 12:58 PM
> To: "[email protected] 
> <javascript:;><mailto:[email protected]<javascript:;>>"
> <[email protected] 
> <javascript:;><mailto:[email protected]<javascript:;>
> >>
> Subject: Re: Printing at a set DPI
>
> It does but I'm not sure how that would help. Also, it sends it after you
> send the job to the printer. The whole thing is somewhat confusing. In
> Photoshop you can specify the width, height and DPI of a document before
> you even start. Then later when you are ready to print the print dialog
> shows the width and height and DPI. If you change the scale or width or
> height in the print dialog the DPI also changes. For example, it scaled a
> large image to fit the page and it went from 72DPI to 176DPI.
>
> Then in the OS print dialog, nestled 3 layers deep in the menus, there's
> an option to change the print quality (DPI). There's fast draft, fast
> normal, normal, automatic, best and maximum DPI. If you dig deeper you can
> check the printer settings and it will show a DPI value for the preset.
>
> [Inline image 3]
>
>
> Here's the code I'm using:
>
> var printableObject:IUIComponent;
> var flexPrintJob:FlexPrintJob = new FlexPrintJob();
> var printJobStarted:Boolean = flexPrintJob.start();
> // after call to start you can get the pageWidth and pageHeight
> // log.info<http://log.info>("Print width and height: " +
> flexPrintJob.pageWidth + "x" + flexPrintJob.pageHeight);
> flexPrintJob.addObject(printableObject, FlexPrintJobScaleType.MATCH_WIDTH);
> flexPrintJob.send();
>
> What I want to know is if somewhere along the line I can say I'd prefer to
> print this at 300 dpi vs 72dpi (screen)? If I supply it with an object that
> is twice as large as the page size does that double the DPI? Sorry for the
> plethora of questions.
>
> On Tue, Jan 28, 2014 at 4:59 PM, Alex Harui <[email protected]<javascript:;>
> <mailto:[email protected] <javascript:;>>> wrote:
> I thought PrintJob returned information about page width/height.  And I
> thought that was controlled by the print settings in the print dialog.
>
> -Alex
>
> On 1/28/14 10:42 AM, "jude" <[email protected] <javascript:;>
> <mailto:[email protected] <javascript:;>>> wrote:
>
> >Is there a way to print something at a certain DPI with the PrintJob or
> >FlexPrintJob classes? From what I've read so far it will print at the
> >resolution of the screen. Also, when I print in vector (not printAsBitmap)
> >certain display objects lose their backgrounds. For example, if there is a
> >Spark Button, the gradient doesn't show up.
>
>
>

Reply via email to