How to print silently on a specific printer using PXCV_
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 25
- Joined: Tue Dec 30, 2008 9:59 am
How to print silently on a specific printer using PXCV_
Hello,
I know that it is possible to use the ActiveX control for printing silently ( you have already posted a reply to another user with the same problem ).
What I would like to ask is instead a sample showing how to print silently to a specific printer, with specific parameters, but using only the "C" kernel PXCV_...
Basically, what I need is something similar to the function pxcview36_sample_app.cpp::void PrintPdfFile(HWND hParentWnd), but without any printer dialog popping up, so a similar function like:
void PrintPdfFile( char *pdfFileName, char *printerName, <printer parameters>, ... )
Do you have something ready for this ?
Thanks,
Ciro Ettorre
MechWorks
I know that it is possible to use the ActiveX control for printing silently ( you have already posted a reply to another user with the same problem ).
What I would like to ask is instead a sample showing how to print silently to a specific printer, with specific parameters, but using only the "C" kernel PXCV_...
Basically, what I need is something similar to the function pxcview36_sample_app.cpp::void PrintPdfFile(HWND hParentWnd), but without any printer dialog popping up, so a similar function like:
void PrintPdfFile( char *pdfFileName, char *printerName, <printer parameters>, ... )
Do you have something ready for this ?
Thanks,
Ciro Ettorre
MechWorks
-
- Site Admin
- Posts: 2449
- Joined: Thu Jun 30, 2005 4:11 pm
Re: How to print silently on a specific printer using PXCV_
Please see PDF-XChange Viewer ActiveX SDK Help, section <How to Use\How to Print a Document?> for example.
Also you can setup more printing parameters before printing (see section <Reference\Named Items\Named Objects\Print>).
Also you can setup more printing parameters before printing (see section <Reference\Named Items\Named Objects\Print>).
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 25
- Joined: Tue Dec 30, 2008 9:59 am
Re: How to print silently on a specific printer using PXCV_
Hello,
may be I was'nt sufficiently clear.
What I asked is to print silently WITHOUT using the ActiveX, so using ONLY the "c" library set of functions PXCV_...
Ciro
may be I was'nt sufficiently clear.
What I asked is to print silently WITHOUT using the ActiveX, so using ONLY the "c" library set of functions PXCV_...
Ciro
-
- Site Admin
- Posts: 3586
- Joined: Thu Jul 08, 2004 10:36 pm
Re: How to print silently on a specific printer using PXCV_
To do this you need
1. Open PDF document (using PXCV_ functions PXCV_Init, PXCV_ReadDocumentW, etc)
2. Setup and get DC of required printer (very depends from programming language and used API/Frameworks)
3. For each page (or for required subset) call PXCV_DrawPageToDC function with your printer DC, page number, and filled LPPXV_CommonRenderParameters structure.
1. Open PDF document (using PXCV_ functions PXCV_Init, PXCV_ReadDocumentW, etc)
2. Setup and get DC of required printer (very depends from programming language and used API/Frameworks)
3. For each page (or for required subset) call PXCV_DrawPageToDC function with your printer DC, page number, and filled LPPXV_CommonRenderParameters structure.
PDF-XChange Co Ltd. (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.
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.
-
- User
- Posts: 25
- Joined: Tue Dec 30, 2008 9:59 am
Re: How to print silently on a specific printer using PXCV_
I knew this. The example supplied with the default installation of PXCV already shows this.
The question was if YOU HAVE ANY EXAMPLE about it, but it looks like if you dont have
The question was if YOU HAVE ANY EXAMPLE about it, but it looks like if you dont have
-
- Site Admin
- Posts: 3586
- Joined: Thu Jul 08, 2004 10:36 pm
Re: How to print silently on a specific printer using PXCV_
You are saying
But immediately into next line:The example supplied with the default installation of PXCV already shows this.
I cannot understand what you need -- complete solution which can just copy/paste ?The question was if YOU HAVE ANY EXAMPLE about it, but it looks like if you dont have
PDF-XChange Co Ltd. (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.
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.
-
- User
- Posts: 25
- Joined: Tue Dec 30, 2008 9:59 am
Re: How to print silently on a specific printer using PXCV_
The example delivered shows how to display a printer dialog and to make a pdf print.
There is no example on how to AVOID to display the printer dialog and to make the pdf print on a passed printer-name with passed printer parameters
There is no example on how to AVOID to display the printer dialog and to make the pdf print on a passed printer-name with passed printer parameters
-
- Site Admin
- Posts: 3586
- Joined: Thu Jul 08, 2004 10:36 pm
Re: How to print silently on a specific printer using PXCV_
Sorry, but this task has no relation to PDF-XChange at all.
PDF-XChange Co Ltd. (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.
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.
-
- User
- Posts: 25
- Joined: Tue Dec 30, 2008 9:59 am
Re: How to print silently on a specific printer using PXCV_
ok - let's say I will use the ActiveX control for such task, can you show me a two lines example of how to instantiate the ActiveX control in MFC/ATL by using the technique you describe in the PDF SDK manual:
IPDFXCview
This interface is the default interface of our ActiveX control. This interface is derived directly from
IDispatch. The interface may be obtained by calling CoCreateInstance in C/C++ or CreateObject in
VB, or by any other methods provided by particular languages.
??
I used this but it does'nt work:
#import "\Tracker Software\PDF-XChange Viewer SDK\Bin\PDFXCviewAx.dll" no_namespace, named_guids, raw_interfaces_only
...
CComPtr<IPDFXCview> spViewer;
hRes = spViewer.CoCreateInstance(__uuidof(IPDFXCview), NULL, CLSCTX_INPROC_SERVER );
...
Thanks,
Ciro
IPDFXCview
This interface is the default interface of our ActiveX control. This interface is derived directly from
IDispatch. The interface may be obtained by calling CoCreateInstance in C/C++ or CreateObject in
VB, or by any other methods provided by particular languages.
??
I used this but it does'nt work:
#import "\Tracker Software\PDF-XChange Viewer SDK\Bin\PDFXCviewAx.dll" no_namespace, named_guids, raw_interfaces_only
...
CComPtr<IPDFXCview> spViewer;
hRes = spViewer.CoCreateInstance(__uuidof(IPDFXCview), NULL, CLSCTX_INPROC_SERVER );
...
Thanks,
Ciro
-
- Site Admin
- Posts: 3586
- Joined: Thu Jul 08, 2004 10:36 pm
Re: How to print silently on a specific printer using PXCV_
Sorry, it is mistake into our documentation: CoCreateInstance isn't enough to instantiate ActiveX control.
See attched examples how to do this.
See attched examples how to do this.
You do not have the required permissions to view the files attached to this post.
PDF-XChange Co Ltd. (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.
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.
-
- User
- Posts: 25
- Joined: Tue Dec 30, 2008 9:59 am
Re: How to print silently on a specific printer using PXCV_
Thanks for the examples, but I was looking for something where NO WINDOWS were created - I have to create a process that must run in a batch way, so it is not granted that a window could be created ... can the windows created in any of the three examples be hidden ?
Do you have any example where NO window is involved ?
Do you have any example where NO window is involved ?
-
- Site Admin
- Posts: 2449
- Joined: Thu Jun 30, 2005 4:11 pm
Re: How to print silently on a specific printer using PXCV_
Sorry, but it is impossible in the current realization, our Viewer ActiveX is ActiveX-Control (as defined by Microsoft ActiveX Control technology). It cannot work without a window.
If you have a need for Viewing without the ned for a window then you can use Simple DL Viewer SDK also available from us.
Hope that helps
If you have a need for Viewing without the ned for a window then you can use Simple DL Viewer SDK also available from us.
Hope that helps
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.