wxpdfdoc

Hi all,

Somebody gave me a link on wxpdfdoc : http://wxforum.shadonet.com/viewtopic.php?t=25820&sid=bee21490a546c570ba14f9a947483e6b
May I use it under wxPython ?

Cheers.

···

--

Hugues JEAN-BAPTISTE (hjb@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)

I don't believe it's been wrapped yet

...what are you trying to do?

- Michael

···

On Oct 20, 5:33 am, Hugues JEAN-BAPTISTE <h...@agorinfo.fr> wrote:

Hi all,

Somebody gave me a link on wxpdfdoc :http://wxforum.shadonet.com/viewtopic.php?t=25820&sid=bee21490a546c57
May I use it under wxPython ?

Cheers.

--

Hugues JEAN-BAPTISTE (h...@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)

michael h a écrit :

I don't believe it's been wrapped yet

...what are you trying to do?

- Michael
  

The aim is to write pdf files.

I have many programs which print forms with wx.html.HtmlPrintout and all works fine, except I am limited to 999 pages !...
I don't imagine to rewrite all the programs with another solution.

I want to find an easy solution in *wxPython* to create pdf files. Somme users are under Linux and others under MSW.

If in a first step I create a PostScript file, I can ask to the Linux servers to create pdf files (Samba, cron and ps2pdf).
I have tried to print in a pseudo printer which create a Postscript file, but for 200 forms (Invoices), 200 times a window is open by the OS :frowning:
In this moment, I try to join wx.html.HtmlPrintout and wx.PostScriptDC, but nothing works.

So, all other ideas are welcome.
Possible wxpdfdoc would be a solution, if it is wrapped, I don't know ?

···

--

Hugues JEAN-BAPTISTE (hjb@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)

Hi,

···

On Oct 20, 7:47 am, Hugues JEAN-BAPTISTE <h...@agorinfo.fr> wrote:

michael h a écrit :> I don't believe it's been wrapped yet

> ...what are you trying to do?

> - Michael

The aim is to write pdf files.

I have many programs which print forms with wx.html.HtmlPrintout and all
works fine, except I am limited to 999 pages !...
I don't imagine to rewrite all the programs with another solution.

I want to find an easy solution in *wxPython* to create pdf files. Somme
users are under Linux and others under MSW.

If in a first step I create a PostScript file, I can ask to the Linux
servers to create pdf files (Samba, cron and ps2pdf).
I have tried to print in a pseudo printer which create a Postscript
file, but for 200 forms (Invoices), 200 times a window is open by the OS
:frowning:
In this moment, I try to join wx.html.HtmlPrintout and wx.PostScriptDC,
but nothing works.

So, all other ideas are welcome.
Possible wxpdfdoc would be a solution, if it is wrapped, I don't know ?

--

Hugues JEAN-BAPTISTE (h...@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)

I use reportlab to generate PDFs and I sometimes use Geraldo for
reports:

http://www.reportlab.org/
http://geraldo.sourceforge.net/

You might give them a whirl.

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

Mike Driscoll a écrit :

Hi,

michael h a écrit :> I don't believe it's been wrapped yet

...what are you trying to do?
      - Michael
      

The aim is to write pdf files.

I have many programs which print forms with wx.html.HtmlPrintout and all
works fine, except I am limited to 999 pages !...
I don't imagine to rewrite all the programs with another solution.

I want to find an easy solution in *wxPython* to create pdf files. Somme
users are under Linux and others under MSW.

If in a first step I create a PostScript file, I can ask to the Linux
servers to create pdf files (Samba, cron and ps2pdf).
I have tried to print in a pseudo printer which create a Postscript
file, but for 200 forms (Invoices), 200 times a window is open by the OS
:frowning:
In this moment, I try to join wx.html.HtmlPrintout and wx.PostScriptDC,
but nothing works.

So, all other ideas are welcome.
Possible wxpdfdoc would be a solution, if it is wrapped, I don't know ?

--

Hugues JEAN-BAPTISTE (h...@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)
    
I use reportlab to generate PDFs and I sometimes use Geraldo for
reports:

http://www.reportlab.org/
http://geraldo.sourceforge.net/

You might give them a whirl.

-------------------
Mike Driscoll

Yes, very interesting, but need to rewrite all the printing functions.

If I don't find other solution, I will look further in these tools ...

Thanks for your help.

···

On Oct 20, 7:47 am, Hugues JEAN-BAPTISTE <h...@agorinfo.fr> wrote:

--

Hugues JEAN-BAPTISTE (hjb@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)

Where is the info you are printing coming from?

When you say you are limited to 999 pages can't you just split the
printing into multiple jobs if the is the case?

···

On Oct 21, 10:41 am, Hugues JEAN-BAPTISTE <h...@agorinfo.fr> wrote:

Mike Driscoll a écrit :

> Hi,

> On Oct 20, 7:47 am, Hugues JEAN-BAPTISTE <h...@agorinfo.fr> wrote:

>> michael h a écrit :> I don't believe it's been wrapped yet

>>> ...what are you trying to do?

>>> - Michael

>> The aim is to write pdf files.

>> I have many programs which print forms with wx.html.HtmlPrintout and all
>> works fine, except I am limited to 999 pages !...
>> I don't imagine to rewrite all the programs with another solution.

>> I want to find an easy solution in *wxPython* to create pdf files. Somme
>> users are under Linux and others under MSW.

>> If in a first step I create a PostScript file, I can ask to the Linux
>> servers to create pdf files (Samba, cron and ps2pdf).
>> I have tried to print in a pseudo printer which create a Postscript
>> file, but for 200 forms (Invoices), 200 times a window is open by the OS
>> :frowning:
>> In this moment, I try to join wx.html.HtmlPrintout and wx.PostScriptDC,
>> but nothing works.

>> So, all other ideas are welcome.
>> Possible wxpdfdoc would be a solution, if it is wrapped, I don't know ?

>> --

>> Hugues JEAN-BAPTISTE (h...@agorinfo.fr)
>> AGORINFO S.A.S. (http://www.agorinfo.fr)

> I use reportlab to generate PDFs and I sometimes use Geraldo for
> reports:

>http://www.reportlab.org/
>http://geraldo.sourceforge.net/

> You might give them a whirl.

> -------------------
> Mike Driscoll

Yes, very interesting, but need to rewrite all the printing functions.

If I don't find other solution, I will look further in these tools ...

Thanks for your help.

--

Hugues JEAN-BAPTISTE (h...@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)

michael h a écrit :

Where is the info you are printing coming from?

When you say you are limited to 999 pages can't you just split the
printing into multiple jobs if the is the case?

For printing :

- I draw a one page html form with "seamonkey"
- In the program, I read the html file
- I read records in the mysql or other database (select ...)
- I put several of them (replace parameters) in one page an so on
- I give the result to wx.html.HtmlPrintout and I have a beautiful document with many pages

Yes I can split in severals jobs, but in particular situations I absolutely need to print on each page : "Page 1/1254", "Page 2/1254", ...
And if I split, the user need to validate the printer 2 times.
This user can think the second time : "What is it ? I have already validated the printing and I don't want another time the same part or another, I don't know, so I cancel".
The user call me back and explain me, he has lost 254 pages and my program is not secure and not good and so on ...
The users are very horrible, isn't it ? :slight_smile:

···

--

Hugues JEAN-BAPTISTE (hjb@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)

You can in fact reuse the page setup data and skip the print dialog,
read here:

Also,
I use pyodbc and objectlistview + listctrlprinter for printing list
style reports from sql sources...

OLV makes this very easy as it can create listitems directly from the
row objects...i don't know if it fits with any of your other
requirements but it's pretty handy.

http://objectlistview.sourceforge.net/python/

Also I saw the post from last year when mr dunn suggested using IE+COM
to do the actual printing,

Did that work out at all? I believe using other means to print your
html would be the easiest way to go. Maybe just have the html file
generated and saved, and then open it in the user's browser?

I wish there was an easy solution for the pagecount problem as I
believe that is the only thing preventing your current setup from
working as you want it to

I feel mighty sorry for whoever is collating 1200 pages

- michael

···

On Oct 21, 12:25 pm, Hugues JEAN-BAPTISTE <h...@agorinfo.fr> wrote:

michael h a écrit :> Where is the info you are printing coming from?

> When you say you are limited to 999 pages can't you just split the
> printing into multiple jobs if the is the case?

For printing :

- I draw a one page html form with "seamonkey"
- In the program, I read the html file
- I read records in the mysql or other database (select ...)
- I put several of them (replace parameters) in one page an so on
- I give the result to wx.html.HtmlPrintout and I have a beautiful
document with many pages

Yes I can split in severals jobs, but in particular situations I
absolutely need to print on each page : "Page 1/1254", "Page 2/1254", ...
And if I split, the user need to validate the printer 2 times.
This user can think the second time : "What is it ? I have already
validated the printing and I don't want another time the same part or
another, I don't know, so I cancel".
The user call me back and explain me, he has lost 254 pages and my
program is not secure and not good and so on ...
The users are very horrible, isn't it ? :slight_smile:

--

Hugues JEAN-BAPTISTE (h...@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)

Hugues,

Hugues JEAN-BAPTISTE wrote:

michael h a écrit :
  

Where is the info you are printing coming from?

When you say you are limited to 999 pages can't you just split the
printing into multiple jobs if the is the case?

For printing :

- I draw a one page html form with "seamonkey"
- In the program, I read the html file
- I read records in the mysql or other database (select ...)
- I put several of them (replace parameters) in one page an so on
- I give the result to wx.html.HtmlPrintout and I have a beautiful document with many pages

Yes I can split in severals jobs, but in particular situations I absolutely need to print on each page : "Page 1/1254", "Page 2/1254", ...
And if I split, the user need to validate the printer 2 times.
This user can think the second time : "What is it ? I have already validated the printing and I don't want another time the same part or another, I don't know, so I cancel".
The user call me back and explain me, he has lost 254 pages and my program is not secure and not good and so on ...
The users are very horrible, isn't it ? :slight_smile:

Especially the French ones :wink: .

Seriously, have you considered using a report generator?

I use ReportManager (http://reportman.sourceforge.net/) which is callable from wxPython and shows a preview (optional) and can generate a PDF. There is also a web engine available but haven't used it.

There is also the reporting tool the Dabo project has done, I believe they use ReportLab.

Werner

Also take a look at geraldo, it's PIL/reportlab based

···

On Oct 22, 4:10 am, werner <wbru...@free.fr> wrote:

Hugues,

Hugues JEAN-BAPTISTE wrote:
> michael h a écrit :

>> Where is the info you are printing coming from?

>> When you say you are limited to 999 pages can't you just split the
>> printing into multiple jobs if the is the case?

> For printing :

> - I draw a one page html form with "seamonkey"
> - In the program, I read the html file
> - I read records in the mysql or other database (select ...)
> - I put several of them (replace parameters) in one page an so on
> - I give the result to wx.html.HtmlPrintout and I have a beautiful
> document with many pages

> Yes I can split in severals jobs, but in particular situations I
> absolutely need to print on each page : "Page 1/1254", "Page 2/1254", ...
> And if I split, the user need to validate the printer 2 times.
> This user can think the second time : "What is it ? I have already
> validated the printing and I don't want another time the same part or
> another, I don't know, so I cancel".
> The user call me back and explain me, he has lost 254 pages and my
> program is not secure and not good and so on ...
> The users are very horrible, isn't it ? :slight_smile:

Especially the French ones :wink: .

Seriously, have you considered using a report generator?

I use ReportManager (http://reportman.sourceforge.net/) which is
callable from wxPython and shows a preview (optional) and can generate a
PDF. There is also a web engine available but haven't used it.

There is also the reporting tool the Dabo project has done, I believe
they use ReportLab.

Werner

I've used this to convert HTML to PDF before, works pretty well. It also has the advantage of supporting more of HTML than HtmlPrintout does, and CSS too.

···

On 10/20/09 5:47 AM, Hugues JEAN-BAPTISTE wrote:

michael h a écrit :

I don't believe it's been wrapped yet

...what are you trying to do?

- Michael

The aim is to write pdf files.

I have many programs which print forms with wx.html.HtmlPrintout and all
works fine, except I am limited to 999 pages !...
I don't imagine to rewrite all the programs with another solution.

I want to find an easy solution in *wxPython* to create pdf files. Somme
users are under Linux and others under MSW.

If in a first step I create a PostScript file, I can ask to the Linux
servers to create pdf files (Samba, cron and ps2pdf).
I have tried to print in a pseudo printer which create a Postscript
file, but for 200 forms (Invoices), 200 times a window is open by the OS
:frowning:
In this moment, I try to join wx.html.HtmlPrintout and wx.PostScriptDC,
but nothing works.

So, all other ideas are welcome.
Possible wxpdfdoc would be a solution, if it is wrapped, I don't know ?

--
Robin Dunn
Software Craftsman