PrintPreview Page count mismatch

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

PrintPreview Page count mismatch

Gecko Embedding
Hi,

I have embedded Gecko in my java application and Iam calling
printpreview from this application and then call
getPrintPreviewNumPages() from printEngine.

The printpreview page count when done from the browser( it is 8) and
when obtained from nsPrintEngine (count is 10) are different for the
same page.

I have ensured that

1. top, bottom, left and right margins are same in browser and my
PrintSettings.

2. ShrintToFit set to true.

Iam I missing some setting that makes the difference.

regards,
Krithika

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: PrintPreview Page count mismatch

Eli Friedman
krithika wrote:

> Hi,
>
> I have embedded Gecko in my java application and Iam calling
> printpreview from this application and then call
> getPrintPreviewNumPages() from printEngine.
>
> The printpreview page count when done from the browser( it is 8) and
> when obtained from nsPrintEngine (count is 10) are different for the
> same page.
>
> I have ensured that
>
> 1. top, bottom, left and right margins are same in browser and my
> PrintSettings.
>
> 2. ShrintToFit set to true.
>
> Iam I missing some setting that makes the difference.
>
> regards,
> Krithika
>

Given the same settings, the results should be the same.  There's a lot
of ways to end up with differences, though; off the top of my head,
there's the page size, your default font size, your default printer
(yes, this can make a difference in text measurement, although it
usually won't matter), cookies (if your loading a page from a web
server), differences in printer settings (i.e. the stuff you get to by
clicking "properties" in the print dialog on Windows), and version
differences (if you're not embedding the same version of Gecko you're
comparing to).

Are you using the global print settings?  That's a code change that
could make a difference.

-Eli
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: PrintPreview Page count mismatch

Gecko Embedding
On Apr 4, 10:15 pm, Eli Friedman <[hidden email]> wrote:

> krithika wrote:
> > Hi,
>
> > I have embedded Gecko in my java application and Iam calling
> > printpreview from this application and then call
> > getPrintPreviewNumPages() from printEngine.
>
> > The printpreview page count when done from the browser( it is 8) and
> > when obtained from nsPrintEngine (count is 10) are different for the
> > same page.
>
> > I have ensured that
>
> > 1. top, bottom, left and right margins are same in browser and my
> > PrintSettings.
>
> > 2. ShrintToFit set to true.
>
> > Iam I missing some setting that makes the difference.
>
> > regards,
> > Krithika
>
> Given the same settings, the results should be the same.  There's a lot
> of ways to end up with differences, though; off the top of my head,
> there's the page size, your default font size, your default printer
> (yes, this can make a difference in text measurement, although it
> usually won't matter), cookies (if your loading a page from a web
> server), differences in printer settings (i.e. the stuff you get to by
> clicking "properties" in the print dialog on Windows), and version
> differences (if you're not embedding the same version of Gecko you're
> comparing to).
>
> Are you using the global print settings?  That's a code change that
> could make a difference.
>
> -Eli


I am using global printer setting.The gecko versions are the same , I
have ensured that.

Regarding font settings , How to find out what is set by the browser
and How do I set it to my print Settings?.

regards,
Krithika


_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: PrintPreview Page count mismatch

Eli Friedman
krithika wrote:

> On Apr 4, 10:15 pm, Eli Friedman <[hidden email]> wrote:
>> krithika wrote:
>>> Hi,
>>> I have embedded Gecko in my java application and Iam calling
>>> printpreview from this application and then call
>>> getPrintPreviewNumPages() from printEngine.
>>> The printpreview page count when done from the browser( it is 8) and
>>> when obtained from nsPrintEngine (count is 10) are different for the
>>> same page.
>>> I have ensured that
>>> 1. top, bottom, left and right margins are same in browser and my
>>> PrintSettings.
>>> 2. ShrintToFit set to true.
>>> Iam I missing some setting that makes the difference.
>>> regards,
>>> Krithika
>> Given the same settings, the results should be the same.  There's a lot
>> of ways to end up with differences, though; off the top of my head,
>> there's the page size, your default font size, your default printer
>> (yes, this can make a difference in text measurement, although it
>> usually won't matter), cookies (if your loading a page from a web
>> server), differences in printer settings (i.e. the stuff you get to by
>> clicking "properties" in the print dialog on Windows), and version
>> differences (if you're not embedding the same version of Gecko you're
>> comparing to).
>>
>> Are you using the global print settings?  That's a code change that
>> could make a difference.
>>
>> -Eli
>
>
> I am using global printer setting.The gecko versions are the same , I
> have ensured that.
>
> Regarding font settings , How to find out what is set by the browser
> and How do I set it to my print Settings?.
>
> regards,
> Krithika
>
>

It's controlled by the font.size.* preferences; there isn't any way to
control it in the print settings.

-Eli
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: PrintPreview Page count mismatch

Gecko Embedding
On Apr 6, 1:02 am, Eli Friedman <[hidden email]> wrote:

> krithika wrote:
> > On Apr 4, 10:15 pm, Eli Friedman <[hidden email]> wrote:
> >> krithika wrote:
> >>> Hi,
> >>> I have embedded Gecko in my java application and Iam calling
> >>> printpreview from this application and then call
> >>> getPrintPreviewNumPages() from printEngine.
> >>> The printpreview page count when done from the browser( it is 8) and
> >>> when obtained from nsPrintEngine (count is 10) are different for the
> >>> same page.
> >>> I have ensured that
> >>> 1. top, bottom, left and right margins are same in browser and my
> >>> PrintSettings.
> >>> 2. ShrintToFit set to true.
> >>> Iam I missing some setting that makes the difference.
> >>> regards,
> >>> Krithika
> >> Given the same settings, the results should be the same.  There's a lot
> >> of ways to end up with differences, though; off the top of my head,
> >> there's the page size, your default font size, your default printer
> >> (yes, this can make a difference in text measurement, although it
> >> usually won't matter), cookies (if your loading a page from a web
> >> server), differences in printer settings (i.e. the stuff you get to by
> >> clicking "properties" in the print dialog on Windows), and version
> >> differences (if you're not embedding the same version of Gecko you're
> >> comparing to).
>
> >> Are you using the global print settings?  That's a code change that
> >> could make a difference.
>
> >> -Eli
>
> > I am using global printer setting.The gecko versions are the same , I
> > have ensured that.
>
> > Regarding font settings , How to find out what is set by the browser
> > and How do I set it to my print Settings?.
>
> > regards,
> > Krithika
>
> It's controlled by the font.size.* preferences; there isn't any way to
> control it in the print settings.
>
> -Eli

I change the font name and size using setFontNamePointSize method in
nsPrintOptions. In nsPrintEngine StartPrint method I get what I
set.But the number of pages does not vary based my font settings.But
when I change from browser->Preferences it changes.

What am I missing?

Iam calling printPreview programatically.

Thanks in Advance,
Krithika

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout