[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

mm

12/23/2010 5:45:00 AM

Hi everyone,

I'm looking for a class to print to PDF files, but I would like to have
one that fully emulate the VB Printer object (with the same properties),
so I don't need to make any modifications to the printing routines of my
program (I don't use Cristal Reports or any other reporting system, I
just use the VB Printer object).

I found this to print to PDF files:
http://www.vb6.us/source-code/create-pdf-vb-s...
But it has different properties.

So, the question is: do you know one?
Thanks.
6 Answers

Dee Earley

12/23/2010 8:47:00 AM

0

On 23/12/2010 05:45, Eduardo wrote:
> Hi everyone,
>
> I'm looking for a class to print to PDF files, but I would like to have
> one that fully emulate the VB Printer object (with the same properties),
> so I don't need to make any modifications to the printing routines of my
> program (I don't use Cristal Reports or any other reporting system, I
> just use the VB Printer object).
>
> I found this to print to PDF files:
> http://www.vb6.us/source-code/create-pdf-vb-s...
> But it has different properties.
>
> So, the question is: do you know one?

If you don't want to modify your app, why not use a PDF printer?
Most PDF apps will install one alongside the main app now.

--
Dee Earley (dee.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)

mm

12/23/2010 5:08:00 PM

0

El 23/12/2010 05:47 a.m., Dee Earley escribió:

> If you don't want to modify your app, why not use a PDF printer?
> Most PDF apps will install one alongside the main app now.

I'll have to modify the App, I will have to replace Printer by
PrinterObject and send it (the PrinterObject) as a parameter to the
procedures that performs the printing, but I could do that in a few
minutes if I had a class that fully emulate the interface of the VB
Printer object.

To install a PDF printer driver on the system is not what I'm looking
for. The users could do that now already if they want, but what I want
is to provide the functionality of "printing" to a PDF file without the
need of installing an external software.

I could install the driver with the installer of my program, but I see
that as something a program shouldn't do (to install a virtual printer
on the whole system).

Thanks.

Schmidt

12/23/2010 5:33:00 PM

0


"Eduardo" <mm@mm.com> schrieb im Newsbeitrag
news:ievvm3$s26$1@speranza.aioe.org...

[PDF-Printing]
> I'll have to modify the App, I will have to replace Printer
> by PrinterObject and send it (the PrinterObject) as a
> parameter to the procedures that performs the printing,
> but I could do that in a few minutes if I had a class that
> fully emulate the interface of the VB Printer object.

What methods/properties of the VB.Printer-Object
are you using currently?
Are there 5, 10 15? In either case you would need
to write your own Printer-Object-wrapping class
to achieve your goal (since there's no such thing
out there "ready to be thrown in" AFAIK).

In case we're talking about 10 different methods
and properties - it cannot really be *that* much more,
since what you're using is perhaps ScaleMode, ScaleWidth,
ScaleHeight, PaintPicture, Line, and TextOut (Print-)
methods - then that seems like a task, which is doable
(given the PDF-helper-class you're mapping to, is
at least capable, to draw lines, images and has a TextOut-
method).

Not in a few minutes of course, but also not that
long as you may think (a few days I'd say, including
testing - and slight adaptions per Search/Replace in
your Printer-DrawingCode, sinceVBs Line-Statement
is a bit "out of line" with regards to adequate method-
encapsulation in your new written wrapperClass).

Olaf


mm

12/24/2010 5:00:00 PM

0

El 23/12/2010 02:32 p.m., Schmidt escribió:
> "Eduardo"<mm@mm.com> schrieb im Newsbeitrag
> news:ievvm3$s26$1@speranza.aioe.org...
>
> [PDF-Printing]
>> I'll have to modify the App, I will have to replace Printer
>> by PrinterObject and send it (the PrinterObject) as a
>> parameter to the procedures that performs the printing,
>> but I could do that in a few minutes if I had a class that
>> fully emulate the interface of the VB Printer object.
>
> What methods/properties of the VB.Printer-Object
> are you using currently?
> Are there 5, 10 15? In either case you would need
> to write your own Printer-Object-wrapping class
> to achieve your goal (since there's no such thing
> out there "ready to be thrown in" AFAIK).
>
> In case we're talking about 10 different methods
> and properties - it cannot really be *that* much more,
> since what you're using is perhaps ScaleMode, ScaleWidth,
> ScaleHeight, PaintPicture, Line, and TextOut (Print-)
> methods - then that seems like a task, which is doable
> (given the PDF-helper-class you're mapping to, is
> at least capable, to draw lines, images and has a TextOut-
> method).
>
> Not in a few minutes of course, but also not that
> long as you may think (a few days I'd say, including
> testing - and slight adaptions per Search/Replace in
> your Printer-DrawingCode, sinceVBs Line-Statement
> is a bit "out of line" with regards to adequate method-
> encapsulation in your new written wrapperClass).
>
> Olaf

Yes Olaf, I have to check, but yes, mat be 10 or so.

All Scale*, CurrentX/Y, Print, Line, Font*, ForeColor, NewPage, EndDoc,
Page...

Yes, I can modify that class that I found or wrap it into another class,
but I thought that probably someone else already did it and may be
available somewhere (it seems that it isn't).

(nobody)

12/24/2010 6:17:00 PM

0

"Eduardo" <mm@mm.com> wrote in message
news:if2jhv$75t$1@speranza.aioe.org...
> Yes Olaf, I have to check, but yes, mat be 10 or so.
>
> All Scale*, CurrentX/Y, Print, Line, Font*, ForeColor, NewPage, EndDoc,
> Page...
>
> Yes, I can modify that class that I found or wrap it into another class,
> but I thought that probably someone else already did it and may be
> available somewhere (it seems that it isn't).

Some links:

http://en.wikipedia.org/wiki/G...

PDF Printer Class:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=61936&am...

vbPDF, clsPDFCreator:
http://www.luigimicco.altervista.or...



mm

1/3/2011 7:00:00 AM

0

"Nobody" <nobody@nobody.com> escribió en el mensaje

> Some links:
>
> http://en.wikipedia.org/wiki/G...
>
> PDF Printer Class:
> http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=61936&am...
>
> vbPDF, clsPDFCreator:
> http://www.luigimicco.altervista.or...
>

Thanks