 |
|
|
|
| Author |
Message |
Rick Raisley
Joined: 04 Oct 2007 Posts: 159
|
Posted: Mon Feb 18, 2008 8:20 pm Post subject: VB6 PDF Writer |
|
|
I've done some searching for a PDF OCX control I can use to write PDFs from
my program with varying results. In fact, I bought one (Image Viewer CP Pro)
that makes PDFs, but it involves printing to a PictureBox, copying the image
to an ImageViewer control, then saving as a PDF - with the result that
everything is converted to (unclear) text.
It would be much better to have a control that would act like a standard
printer, use all the normal printer commands, so that the same code could be
used to 1) Preview the printout in a PictureBox, 2) Print to a standard
Windows printer, or 3) Print to a PDF file. All the PDF-makers I've seen
have their own, special print commands, meaning a completely separate
routine to print complex printouts, which I really need to avoid.
Anyone have experience with such a control?
--
Regards,
Rick Raisley
Archived from group: microsoft>public>vb>general>discussion |
|
| Back to top |
|
 |
Rick Raisley
Joined: 04 Oct 2007 Posts: 159
|
Posted: Mon Feb 18, 2008 8:24 pm Post subject: Re: VB6 PDF Writer |
|
|
I realize that I should have also posted this to vb.controls, but wanted to
post here because of the much higher usage. Is there a PC way of re-posting
this on vb.controls, or has that ship sailed?
--
Regards,
Rick Raisley
"Rick Raisley" wrote in message
news:%23huIIvmcIHA.2268@TK2MSFTNGP02.phx.gbl...
> I've done some searching for a PDF OCX control I can use to write PDFs
from
> my program with varying results. In fact, I bought one (Image Viewer CP
Pro)
> that makes PDFs, but it involves printing to a PictureBox, copying the
image
> to an ImageViewer control, then saving as a PDF - with the result that
> everything is converted to (unclear) text.
>
> It would be much better to have a control that would act like a standard
> printer, use all the normal printer commands, so that the same code could
be
> used to 1) Preview the printout in a PictureBox, 2) Print to a standard
> Windows printer, or 3) Print to a PDF file. All the PDF-makers I've seen
> have their own, special print commands, meaning a completely separate
> routine to print complex printouts, which I really need to avoid.
>
> Anyone have experience with such a control?
>
> --
> Regards,
>
> Rick Raisley
>
> |
|
| Back to top |
|
 |
Saga
Joined: 04 Oct 2007 Posts: 809
|
Posted: Mon Feb 18, 2008 7:45 pm Post subject: Re: VB6 PDF Writer |
|
|
PDF995
PrimoPDF
These are two of many PDF printers that install as a printer driver.
PDF995 is $10 (at least the last time I checked), but you can use it freely
as long as you tolerate a nag screen. PrimoPDF is just free. Using Google
will provide you with an ample list of free and not-free options. Just search
using these phrases:
pdf printer
pdf print driver
Good luck!
Saga
--
"Rick Raisley" wrote in message
news:%23huIIvmcIHA.2268@TK2MSFTNGP02.phx.gbl...
> I've done some searching for a PDF OCX control I can use to write PDFs from
> my program with varying results. In fact, I bought one (Image Viewer CP Pro)
> that makes PDFs, but it involves printing to a PictureBox, copying the image
> to an ImageViewer control, then saving as a PDF - with the result that
> everything is converted to (unclear) text.
>
> It would be much better to have a control that would act like a standard
> printer, use all the normal printer commands, so that the same code could be
> used to 1) Preview the printout in a PictureBox, 2) Print to a standard
> Windows printer, or 3) Print to a PDF file. All the PDF-makers I've seen
> have their own, special print commands, meaning a completely separate
> routine to print complex printouts, which I really need to avoid.
>
> Anyone have experience with such a control?
>
> --
> Regards,
>
> Rick Raisley
>
> |
|
| Back to top |
|
 |
Rick Raisley
Joined: 04 Oct 2007 Posts: 159
|
Posted: Mon Feb 18, 2008 9:06 pm Post subject: Re: VB6 PDF Writer |
|
|
I'm aware of the PDF "printers", that a user has to install and print to.
I'm interested in an OCX or other control so that my program can "print"
PDFs directly, without the user having to download and install them.
--
Regards,
Rick Raisley
"Saga" wrote in message@TK2MSFTNGP02.phx.gbl...
>
> PDF995
> PrimoPDF
>
> These are two of many PDF printers that install as a printer driver.
>
> PDF995 is $10 (at least the last time I checked), but you can use it
freely
> as long as you tolerate a nag screen. PrimoPDF is just free. Using Google
> will provide you with an ample list of free and not-free options. Just
search
> using these phrases:
>
> pdf printer
> pdf print driver
>
> Good luck!
> Saga
> --
>
> "Rick Raisley" wrote in message
> news:%23huIIvmcIHA.2268@TK2MSFTNGP02.phx.gbl...
> > I've done some searching for a PDF OCX control I can use to write PDFs
from
> > my program with varying results. In fact, I bought one (Image Viewer CP
Pro)
> > that makes PDFs, but it involves printing to a PictureBox, copying the
image
> > to an ImageViewer control, then saving as a PDF - with the result that
> > everything is converted to (unclear) text.
> >
> > It would be much better to have a control that would act like a standard
> > printer, use all the normal printer commands, so that the same code
could be
> > used to 1) Preview the printout in a PictureBox, 2) Print to a standard
> > Windows printer, or 3) Print to a PDF file. All the PDF-makers I've seen
> > have their own, special print commands, meaning a completely separate
> > routine to print complex printouts, which I really need to avoid.
> >
> > Anyone have experience with such a control?
> >
> > --
> > Regards,
> >
> > Rick Raisley
> >
> >
>
> |
|
| Back to top |
|
 |
H-Man
Joined: 04 Oct 2007 Posts: 23
|
Posted: Mon Feb 18, 2008 9:01 pm Post subject: Re: VB6 PDF Writer |
|
|
On Mon, 18 Feb 2008 14:45:12 -0600, Saga wrote:
> PDF995
> PrimoPDF
>
> These are two of many PDF printers that install as a printer driver.
>
> PDF995 is $10 (at least the last time I checked), but you can use it freely
> as long as you tolerate a nag screen. PrimoPDF is just free. Using Google
> will provide you with an ample list of free and not-free options. Just search
> using these phrases:
>
> pdf printer
> pdf print driver
>
> Good luck!
> Saga
I don't think the OP wants to have to install an actual PDF printer but
wants an OCX that acts like one. You know, write to a PDF object just like
you write to the printer object.
Purebasic has a library based on a port of the FPDF PHP Class
http://www.fpdf.org/
I haven't used it a lot, but in playing around it looks promising.
In PB it works pretty well. Maybe you can port it to VB. The complete PB
source code for the library is available for download. It looks like you
should be able to define the properties such that it'll work really close
to the printer object.
--
HK |
|
| Back to top |
|
 |
Steve Barnett
Joined: 04 Oct 2007 Posts: 204
|
Posted: Tue Feb 19, 2008 1:22 pm Post subject: Re: VB6 PDF Writer |
|
|
It costs money (sorry), but I've used this without problems:
http://www.componentsource.com/products/componentone-vsview-reporting/index-gbp.html
You treat it just like a normal printer in your app to give you a preview
window, which you can then save as a PDF. The output is proper text and
graphics, not an "image" of a page, so the quality is good.
Steve
"Rick Raisley" wrote in message
news:%23huIIvmcIHA.2268@TK2MSFTNGP02.phx.gbl...
> I've done some searching for a PDF OCX control I can use to write PDFs
> from
> my program with varying results. In fact, I bought one (Image Viewer CP
> Pro)
> that makes PDFs, but it involves printing to a PictureBox, copying the
> image
> to an ImageViewer control, then saving as a PDF - with the result that
> everything is converted to (unclear) text.
>
> It would be much better to have a control that would act like a standard
> printer, use all the normal printer commands, so that the same code could
> be
> used to 1) Preview the printout in a PictureBox, 2) Print to a standard
> Windows printer, or 3) Print to a PDF file. All the PDF-makers I've seen
> have their own, special print commands, meaning a completely separate
> routine to print complex printouts, which I really need to avoid.
>
> Anyone have experience with such a control?
>
> --
> Regards,
>
> Rick Raisley
>
> |
|
| Back to top |
|
 |
Rick Raisley
Joined: 04 Oct 2007 Posts: 159
|
Posted: Tue Feb 19, 2008 1:38 pm Post subject: Re: VB6 PDF Writer |
|
|
"Steve Barnett" wrote in message@TK2MSFTNGP06.phx.gbl...
> It costs money (sorry), but I've used this without problems:
>
http://www.componentsource.com/products/componentone-vsview-reporting/index-gbp.html
>
> You treat it just like a normal printer in your app to give you a preview
> window, which you can then save as a PDF. The output is proper text and
> graphics, not an "image" of a page, so the quality is good.
>
I actually own VSVIEW, and really don't care for it. The preview (in fact,
the control) has been problematic, sometimes just not showing anything at
all. I've found it difficult to print exactly where I want to, as VSVIEW
wants to "help" control locations, but mostly, it does not use all the
standard drawing commands, so you're limited to using only its commands to
draw, and that code is not then usable for other controls (printing,
PictureBox, etc.), although I realize it includes those functions. I used
VSVIEW on the 4th of my 6 programs, and then went back to standard printing
commands (to either a Printer or PictureBox) for the rest.
--
Regards,
Rick Raisley |
|
| Back to top |
|
 |
Steve Barnett
Joined: 04 Oct 2007 Posts: 204
|
Posted: Tue Feb 19, 2008 8:57 pm Post subject: Re: VB6 PDF Writer |
|
|
"Rick Raisley" wrote in message @TK2MSFTNGP03.phx.gbl...
> "Steve Barnett" wrote in message
> @TK2MSFTNGP06.phx.gbl...
>> It costs money (sorry), but I've used this without problems:
>>
> http://www.componentsource.com/products/componentone-vsview-reporting/index-gbp.html
>>
>> You treat it just like a normal printer in your app to give you a preview
>> window, which you can then save as a PDF. The output is proper text and
>> graphics, not an "image" of a page, so the quality is good.
>>
>
>
> I actually own VSVIEW, and really don't care for it. The preview (in fact,
> the control) has been problematic, sometimes just not showing anything at
> all. I've found it difficult to print exactly where I want to, as VSVIEW
> wants to "help" control locations, but mostly, it does not use all the
> standard drawing commands, so you're limited to using only its commands to
> draw, and that code is not then usable for other controls (printing,
> PictureBox, etc.), although I realize it includes those functions. I used
> VSVIEW on the 4th of my 6 programs, and then went back to standard
> printing
> commands (to either a Printer or PictureBox) for the rest.
>
> --
> Regards,
>
> Rick Raisley
>
>
I'm surprised about that.
When I want previewed output, I set the PrintPreview property to true and
run through the printing code. If I want printed output without the preview,
I set the PrintPreview property to false and run through the same code. I
don't need to maintain two sets of code depending on the need for print
preview. Likewise, when I want to save a PDF file rather than print or
preview, I just tell the preview window to save the PDF once printing is
finished... it's all the same code regardless of what I need to output.
Ok, they have their own drawing commands, so I needed to use functions such
as DrawBox, but that's no big deal and it made the code much easier to
decode as it's obvious you're drawing a box.
I have some sympathy with the positioning of text, but I just make good use
of the CurrentX and CurrentY properties to put text where I want it (as I
would have had to do with the printer object) and I keep track of where the
bottom of the page is so I can force a page break at the right place.
Still, I guess it's not your solution in this case.
Steve |
|
| Back to top |
|
 |
Rick Raisley
Joined: 04 Oct 2007 Posts: 159
|
Posted: Tue Feb 19, 2008 4:29 pm Post subject: Re: VB6 PDF Writer |
|
|
"Steve Barnett" wrote in message@TK2MSFTNGP06.phx.gbl...
>
> "Rick Raisley" wrote in message
> @TK2MSFTNGP03.phx.gbl...
> > "Steve Barnett" wrote in message
> > @TK2MSFTNGP06.phx.gbl...
> >> It costs money (sorry), but I've used this without problems:
> >>
> >
http://www.componentsource.com/products/componentone-vsview-reporting/index-gbp.html
> >>
> >> You treat it just like a normal printer in your app to give you a
preview
> >> window, which you can then save as a PDF. The output is proper text and
> >> graphics, not an "image" of a page, so the quality is good.
> >>
> >
> >
> > I actually own VSVIEW, and really don't care for it. The preview (in
fact,
> > the control) has been problematic, sometimes just not showing anything
at
> > all. I've found it difficult to print exactly where I want to, as VSVIEW
> > wants to "help" control locations, but mostly, it does not use all the
> > standard drawing commands, so you're limited to using only its commands
to
> > draw, and that code is not then usable for other controls (printing,
> > PictureBox, etc.), although I realize it includes those functions. I
used
> > VSVIEW on the 4th of my 6 programs, and then went back to standard
> > printing
> > commands (to either a Printer or PictureBox) for the rest.
> >
> > --
> > Regards,
> >
> > Rick Raisley
> >
> >
>
> I'm surprised about that.
>
> When I want previewed output, I set the PrintPreview property to true and
> run through the printing code. If I want printed output without the
preview,
> I set the PrintPreview property to false and run through the same code. I
> don't need to maintain two sets of code depending on the need for print
> preview. Likewise, when I want to save a PDF file rather than print or
> preview, I just tell the preview window to save the PDF once printing is
> finished... it's all the same code regardless of what I need to output.
>
> Ok, they have their own drawing commands, so I needed to use functions
such
> as DrawBox, but that's no big deal and it made the code much easier to
> decode as it's obvious you're drawing a box.
>
> I have some sympathy with the positioning of text, but I just make good
use
> of the CurrentX and CurrentY properties to put text where I want it (as I
> would have had to do with the printer object) and I keep track of where
the
> bottom of the page is so I can force a page break at the right place.
>
> Still, I guess it's not your solution in this case.
>
As I said, the main problem for me was the fact that sometimes it just
wouldn't work. It became a tech support nightmare. Now, after installing,
unless a reboot was done, it would /never/ display anything. Just be blank.
Usually afterwards, it would work okay. But I'd have maybe 5% of my
customers complain that it was empty, despite a reboot. Sometimes
reinstalling helped, sometimes it didn't. But as I couldn't reproduce it, I
couldn't fix it. Then it started happening on my PC. A program that had been
there for year or more suddenly no longer displayed the preview (or printed
it). Could find no reason why. At that point I kind of gave up on the
control, and resolved not to use it again.
--
Regards,
Rick Raisley |
|
| Back to top |
|
 |
Stefan Berglund
Joined: 04 Oct 2007 Posts: 636
|
Posted: Tue Feb 19, 2008 6:47 pm Post subject: Re: VB6 PDF Writer |
|
|
On Tue, 19 Feb 2008 11:29:43 -0500, "Rick Raisley"
wrote:
in
>As I said, the main problem for me was the fact that sometimes it just
>wouldn't work. It became a tech support nightmare. Now, after installing,
>unless a reboot was done, it would /never/ display anything. Just be blank.
>Usually afterwards, it would work okay. But I'd have maybe 5% of my
>customers complain that it was empty, despite a reboot. Sometimes
>reinstalling helped, sometimes it didn't. But as I couldn't reproduce it, I
>couldn't fix it. Then it started happening on my PC. A program that had been
>there for year or more suddenly no longer displayed the preview (or printed
>it). Could find no reason why. At that point I kind of gave up on the
>control, and resolved not to use it again.
Sounds like a really sophisticated nag methodology.
---
Stefan Berglund |
|
| Back to top |
|
 |
DutchMaster11
Joined: 04 Oct 2007 Posts: 34
|
Posted: Wed Feb 20, 2008 2:05 pm Post subject: Re: VB6 PDF Writer |
|
|
On Feb 18, 3:20 pm, "Rick Raisley"
net> wrote:
> I've done some searching for a PDF OCX control I can use to write PDFs from
> my program with varying results. In fact, I bought one (Image Viewer CP Pro)
> that makes PDFs, but it involves printing to a PictureBox, copying the image
> to an ImageViewer control, then saving as a PDF - with the result that
> everything is converted to (unclear) text.
>
> It would be much better to have a control that would act like a standard
> printer, use all the normal printer commands, so that the same code could be
> used to 1) Preview the printout in a PictureBox, 2) Print to a standard
> Windows printer, or 3) Print to a PDF file. All the PDF-makers I've seen
> have their own, special print commands, meaning a completely separate
> routine to print complex printouts, which I really need to avoid.
>
> Anyone have experience with such a control?
>
> --
> Regards,
>
> Rick Raisley
I just use CutePDF Writer (free). Why would you want an ocx that you
can treat like a printer, when you can simply set the printer object
to the PDF printer... and go on as planned.
This is an ideal situation for me, because as we print hard copies of
something.... we also archive a PDF copy of it. This way we just use
the *same* print routine and just change the printer object. |
|
| Back to top |
|
 |
"Jan Hyde
Joined: 04 Oct 2007 Posts: 466
|
Posted: Wed Feb 20, 2008 10:24 pm Post subject: Re: VB6 PDF Writer |
|
|
DutchMaster11 's wild thoughts were
released on Wed, 20 Feb 2008 09:05:45 -0800 (PST) bearing
the following fruit:
>On Feb 18, 3:20 pm, "Rick Raisley"
>net> wrote:
>> I've done some searching for a PDF OCX control I can use to write PDFs from
>> my program with varying results. In fact, I bought one (Image Viewer CP Pro)
>> that makes PDFs, but it involves printing to a PictureBox, copying the image
>> to an ImageViewer control, then saving as a PDF - with the result that
>> everything is converted to (unclear) text.
>>
>> It would be much better to have a control that would act like a standard
>> printer, use all the normal printer commands, so that the same code could be
>> used to 1) Preview the printout in a PictureBox, 2) Print to a standard
>> Windows printer, or 3) Print to a PDF file. All the PDF-makers I've seen
>> have their own, special print commands, meaning a completely separate
>> routine to print complex printouts, which I really need to avoid.
>>
>> Anyone have experience with such a control?
>>
>> --
>> Regards,
>>
>> Rick Raisley
>
>I just use CutePDF Writer (free). Why would you want an ocx that you
>can treat like a printer, when you can simply set the printer object
>to the PDF printer... and go on as planned.
So you can choose where the output goes, what it's called,
know when the conversion is complete, get the number of
pages etc etc.
J
>This is an ideal situation for me, because as we print hard copies of
>something.... we also archive a PDF copy of it. This way we just use
>the *same* print routine and just change the printer object.
--
Jan Hyde
https://mvp.support.microsoft.com/profile/Jan.Hyde |
|
| Back to top |
|
 |
Stefan Berglund
Joined: 04 Oct 2007 Posts: 636
|
Posted: Wed Feb 20, 2008 6:42 pm Post subject: Re: VB6 PDF Writer |
|
|
On Wed, 20 Feb 2008 17:24:33 +0000, "Jan Hyde (VB MVP)"
wrote:
in
>>I just use CutePDF Writer (free). Why would you want an ocx that you
>>can treat like a printer, when you can simply set the printer object
>>to the PDF printer... and go on as planned.
>
>So you can choose where the output goes, what it's called,
>know when the conversion is complete, get the number of
>pages etc etc.
I use PDF995 and its INI file allows me to specify the output folder,
and file name. My software knows how many pages it printed but the
knowing when the conversion is complete is a bit tricky but still
infinitely doable.
---
Stefan Berglund |
|
| Back to top |
|
 |
joel paula
Joined: 25 Feb 2008 Posts: 1
|
Posted: Mon Feb 25, 2008 5:44 pm Post subject: Re: VB6 PDF Writer |
|
|
Use PDF Creator.
http://sourceforge.net/projects/pdfcreator/
Its not one OCX. It is a PDF printer but it has an ActiveX interface
that enables you to control it. So, it is a printer, but you can use
it as a print preview or a "Send Document by email" thing.
HTH
Joel
On Feb 18, 8:20 pm, "Rick Raisley"
net> wrote:
> I've done some searching for a PDF OCX control I can use to write PDFs from
> my program with varying results. In fact, I bought one (Image Viewer CP Pro)
> that makes PDFs, but it involves printing to a PictureBox, copying the image
> to an ImageViewer control, then saving as a PDF - with the result that
> everything is converted to (unclear) text.
>
> It would be much better to have a control that would act like a standard
> printer, use all the normal printer commands, so that the same code could be
> used to 1) Preview the printout in a PictureBox, 2) Print to a standard
> Windows printer, or 3) Print to a PDF file. All the PDF-makers I've seen
> have their own, special print commands, meaning a completely separate
> routine to print complex printouts, which I really need to avoid.
>
> Anyone have experience with such a control?
>
> --
> Regards,
>
> Rick Raisley
|
|
| Back to top |
|
 |
|
|
| Related Topics: | Problems with PDF Writer Software.... Hi All, I recently added PDF creation capability to my application using some code I found on the net. It seems pretty using a Class Module, and apparently having no dependancy on an actual Adobe PDF Writer installed. The problem is that
using printer.print with image writer as default printer If the default printer is image writer or pdf writer, the following line will open the save as dialog window. If the user select cancel I used to get an error 482 for the image writer and no error with the adobe pdf writer. Printer.Print "" I don't get t
Distingush CD Drive and CD Writer I have created app run from CD based. To check and access CD drive i had used File System Object. I had prob now. When user have both cd-drive and cd-writer my application don't work properly, Is there any API or snippet that can distingush CD-DRIVE and
Rectangle color?? Hi all, The following snippet should draw a rectangle in darkgray, but the rectangle is drawn in black: lPen = 1, If lPen <> 0 Then lOldPen = lPen) Rectangle mlhDC, 3, 3, UserControl.
how to find out the execution directory? Hi, I'm having a problem sourcing a data file during execution. I'm counting on the fact that it will be stored with the executable but I can't count on where the exe will be stored. I've tried capturing the value of CurDir() at the start of execution |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|