Open existing PDF and send to printer

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics or PDF-XChange Viewer SDK if appropriate.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
WayneH
User
Posts: 48
Joined: Mon May 21, 2007 5:39 pm

Open existing PDF and send to printer

Post by WayneH »

Hi -

I tried searching about this issue, but every search comes back "word is too common" when I look for info about
printing a PDF to an actual printer.

So, here's my question:
I have PDFTools SDK 4 - how can I open an existing PDF file and print it to a printer?

(I'm using VB6)

Thanks.
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: Open existing PDF and send to printer

Post by John - Tracker Supp »

Hi,

You will need to use the PDF-XChange Viewer SDK - which your Tools SDK gives you limited distribution rights to use (you can create one or more applciations using this - but distribute to a combined total of 2500 user desktops without paying additional Royalties for)

See here:
https://www.pdf-xchange.com/home/de ... iewer_SDK/

You can download the Viewer SDK here :
https://www.pdf-xchange.com/downloads/dev/

And you will need to compete the Viewer SDK license acknowledging the distribution limits and return - then you will be issued an additional serial number for use with the Viewer SDK functions in your applciation code.

hope that helps
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
WayneH
User
Posts: 48
Joined: Mon May 21, 2007 5:39 pm

Re: Open existing PDF and send to printer

Post by WayneH »

Hi -

Thanks, that helps so far.

But if I only need to open a PDF and print it, can I use the "Simple" SDK ?

Also, can I assume that if I use the SImple DLL, I do not need the Distribution file?
(The ActiveX and the Distribution are a pair?)
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: Open existing PDF and send to printer

Post by John - Tracker Supp »

Hi Wayne,

yes to both :)
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
WayneH
User
Posts: 48
Joined: Mon May 21, 2007 5:39 pm

Re: Open existing PDF and send to printer

Post by WayneH »

Sorry, but I'm a bit confused.

I downloaded the Simple Viewer SDk and installed it,
but when I look at the documentation, I only see printing
in the docs for the ActiveX, not the Simple DLL.

What am I missing?
User avatar
Lzcat - Tracker Supp
Site Admin
Posts: 677
Joined: Thu Jun 28, 2007 8:42 am

Re: Open existing PDF and send to printer

Post by Lzcat - Tracker Supp »

To print using Simple SDK you will need get printer DC (Device Context) and simply draw on it using PXCV_DrawPageToDC function. You may print as image or not by adjusting Flags field in PXV_CommonRenderParameters structure (see pxvrpf_UseVectorRenderer flag).
Victor
Tracker Software
Project manager

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
WayneH
User
Posts: 48
Joined: Mon May 21, 2007 5:39 pm

Re: Open existing PDF and send to printer

Post by WayneH »

Got it - thanks.
WayneH
User
Posts: 48
Joined: Mon May 21, 2007 5:39 pm

Re: Open existing PDF and send to printer

Post by WayneH »

Sorry to add on to this post - but....

I'm curious about PrintDocument and SetProperty within the ActiveX.

It seems that without using the print dialog, the only way to set properties for printing
is by using 'verbs'.
So, I have to do something like this:
pdfx.SetProperty "Print.RangeType", "All", 0
Which means I specifically have to use text, such as "Print.RangeType" and "All", rather than something pre-defined within the ActiveX ?

Is there no Enum / Type / Object / etc pre-defined which contains these options?
(We are, after all, talking about an Object-based environment :)
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Open existing PDF and send to printer

Post by Ivan - Tracker Software »

Yes, you need to use
pdfx.SetProperty "Print.RangeType", "All", 0
to print all pages. For other type of ranges -- see documentation for AX.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
WayneH
User
Posts: 48
Joined: Mon May 21, 2007 5:39 pm

Re: Open existing PDF and send to printer

Post by WayneH »

OK, thanks.

I'd like to suggest using Enums/Types for these values in the next release
so that we can take advantage of our IDEs.
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Open existing PDF and send to printer

Post by Ivan - Tracker Software »

There are some trouble with making these values as enums into AX -- once AX interface is published it should not be changed -- main ideology of AX.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
WayneH
User
Posts: 48
Joined: Mon May 21, 2007 5:39 pm

Re: Open existing PDF and send to printer

Post by WayneH »

That's ok now.
I've gone ahead and built my own ActiveX Control.
Thanks.
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: Open existing PDF and send to printer

Post by John - Tracker Supp »

ok - thanks.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
Post Reply