Find the good PaperId...

Hi!

I have to print with a special photo printer, which allows only a
piece of paper formats:
9*13; 10*15, 13*18 , 15*20 , 15*21 and 15*23 (in cm)
(and my current paper is for 13*18 only)

I need to set the good paperId otherwise the printer will not print.

How can I get it?

I tryed to get the paperId after selecting it in the printDialog, but
I didn't manage to find how to get this information...

I hope someone has a solution!
Thanks!

-joora

I thought I remembered a way to get the appropriate paper ID from the size of the paper, but I can't seem to find it right now. But perhaps just setting the paper size in the wx.PrintData (with the SetPaperSize(wx.Size) method, passing size in mm) object will do the right thing.

···

On 1/21/11 1:11 PM, joora wrote:

Hi!

I have to print with a special photo printer, which allows only a
piece of paper formats:
9*13; 10*15, 13*18 , 15*20 , 15*21 and 15*23 (in cm)
(and my current paper is for 13*18 only)

I need to set the good paperId otherwise the printer will not print.

How can I get it?

I tryed to get the paperId after selecting it in the printDialog, but
I didn't manage to find how to get this information...

I hope someone has a solution!

--
Robin Dunn
Software Craftsman

Hi!

I tried with SetPaperSize(wx.Size) but it doesn’t work either.

I did not found any solution :frowning:

Help me please!

joora

···

Robin Dunn

2011-01-22 20:18:22

wxpython-users

Re: [wxPython-users] Find the good PaperId…

On 1/21/11 1:11 PM, joora wrote:

Hi!

I have to print with a special photo printer, which allows only a

piece of paper formats:

913; 1015, 1318 , 1520 , 1521 and 1523 (in cm)

(and my current paper is for 13*18 only)

I need to set the good paperId otherwise the printer will not print.

How can I get it?

I tryed to get the paperId after selecting it in the printDialog, but

I didn’t manage to find how to get this information…

I hope someone has a solution!

I thought I remembered a way to get the appropriate paper ID from the

size of the paper, but I can’t seem to find it right now. But perhaps

just setting the paper size in the wx.PrintData (with the

SetPaperSize(wx.Size) method, passing size in mm) object will do the

right thing.

Robin Dunn

Software Craftsman

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

Sorry, I don't know either. Try asking about it on the wx-users list.

···

On 1/29/11 4:52 AM, joora wrote:

Hi!
I tried with SetPaperSize(wx.Size) but it doesn't work either.
I did not found any solution :frowning:
Help me please!

--
Robin Dunn
Software Craftsman

Have you tried using wx.SetPaperSize(wx.Size()) after using
wx.SetPaperId(wxPAPER_NONE)? From the wx documents

wxPrintData::SetPaperId

void SetPaperId(wxPaperSize paperId)

  Sets the paper id. This indicates the type of paper to be used.

For a mapping between paper id, paper size and string name, see
wxPrintPaperDatabase in paper.h (not yet documented).

paperId can be one of:

wxPAPER_NONE, // Use specific dimensions
  and

wxPageSetupDialogData::SetPaperSize

void SetPaperSize(const wxSize& size)

  Sets the paper size in millimetres. If a corresponding paper id

is found, it will be set in the internal wxPrintData object,
otherwise the paper size overrides the paper id.

Gadget/Steve

···

On 29/01/2011 7:50 PM, Robin Dunn wrote:

  On

1/29/11 4:52 AM, joora wrote:

    Hi!


    I tried with SetPaperSize(wx.Size) but it doesn't work either.


    I did not found any solution :(


    Help me please!
  Sorry, I don't know either.  Try asking about it on the wx-users

list.

Hi!
Quote: " Have you tried using wx.SetPaperSize(wx.Size()) after using
wx.SetPaperId(wxPAPER_NONE)? "

Answer:
Yes I have tried this
pd.SetPaperId(wxPAPER_NONE)
pd.SetPaperSize(wxSize(127, 178))
but same problem again, "paper size doesn't fit", I can't print...

···

___
Re: [wxPython-users] Find the good PaperId...

On 29/01/2011 7:50 PM, Robin Dunn wrote:

On 1/29/11 4:52 AM, joora wrote:

Hi!
I tried with SetPaperSize(wx.Size) but it doesn't work either.
I did not found any solution :frowning:
Help me please!

Sorry, I don't know either. Try asking about it on the wx-users list.

Have you tried using wx.SetPaperSize(wx.Size()) after using
wx.SetPaperId(wxPAPER_NONE)? From the wx documents

      wxPrintData::SetPaperId

*void* *SetPaperId*(*wxPaperSize*/paperId/)

Sets the paper id. This indicates the type of paper to be used. For a
mapping between paper id, paper size and string name, see
wxPrintPaperDatabase in paper.h (not yet documented).

/paperId/ can be one of:

    wxPAPER_NONE, // Use specific dimensions

and

      wxPageSetupDialogData::SetPaperSize

*void* *SetPaperSize*(*const wxSize& */size/)

Sets the paper size in millimetres. If a corresponding paper id is
found, it will be set in the internal wxPrintData object, otherwise the
paper size overrides the paper id.

Gadget/Steve

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Please ask about this on wx-users and/or create a ticket about it at trac.wxwidgets.org.

···

On 2/2/11 12:03 PM, joora wrote:

Hi!
Quote: " Have you tried using wx.SetPaperSize(wx.Size()) after using
wx.SetPaperId(wxPAPER_NONE)? "

Answer:
Yes I have tried this
pd.SetPaperId(wxPAPER_NONE)
pd.SetPaperSize(wxSize(127, 178))
but same problem again, "paper size doesn't fit", I can't print...

--
Robin Dunn
Software Craftsman