Image print invalid

PDF-XChange Drivers API (only) V4/V5
This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - VERSION 4 & 5 - Please use the PDF-Tools SDK Forum for Library DLL assistance.

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

Post Reply
indalgds
User
Posts: 9
Joined: Fri Jul 17, 2009 7:55 am

Image print invalid

Post by indalgds »

In an application I currently working on, the PDF-XChange printer in combination with IrfanView is used to generate a pdf file for an jpg image. The application creates and configures an IPXCPrinter instances and invokes IrfanView via command line to print the jpg file to that printer. The only driver options set are of the "Save" group to autosave the print as a pdf file without showing any dialog.

The source jpg has a size of 669x91 pixel. If I open the generated pdf file (with Adobe Reader) the image is displayed much larger and streched to another aspect ratio. At display zoom 100% it looks more like 1000x1000 pixel. If I select the image in the pdf, copy it to the clipboard and then paste it to IrfanView (or Paint), it is shown in the original size.

Printing the image from IrfanView gui directly to another printer results in the corrent output. Printing the image from IrfanView gui thru the installed PDF-XChange printer using default settings results in the expected pdf file.

For me, that sounds like an invalid configuration of the created IPXCPrinter instance. I've looked thru the api docs but found no option that seems to have effect on that behavior. Any ideas?
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17948
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Image print invalid

Post by Tracker Supp-Stefan »

indalgds,

if you could provide a sample piece of code for our developers to have a look at, I think would help solve this problem faster.
As you suggested yourself the problem is most probably with some of the configurations.

If attaching files to the forum they should be in .RAR, .7z or .zip format

Regards,
Stefan
indalgds
User
Posts: 9
Joined: Fri Jul 17, 2009 7:55 am

Re: Image print invalid

Post by indalgds »

I use Java and the JaCoB COM Bridge to access the printer driver COM objects. But here is a detailed description of what I do:
1.) Create an "PXCComLib.CPXCControlEx" instance and invoke "Printer" to get an printer instance.
2.) Get the printer name thru its "Name" property.
3.) Invoke "ResetDefaults".
4.) Set the following options:
Save.SaveType = Save
Save.ShowSaveDialog = False
Save.File = C:\ablage\Test4.pdf
Save.WhenExists = Overwrite
Save.RunApp = False
Saver.ShowProgress = False
Fonts.EmbedAll = True
5.) Invoke "ApplyOptions".
6.) Execute IrfanView to print the source image:
i_view32.exe "c:\ablage\Warnhinweis Ü30.jpg" /print="docuglobe"
Where "docuglobe" is the name get from the PdfX printer instance.
7.) Wait until IrfanView exists.
8.) Release the printer and controlex instances

That's it. No other options are set.
At another location in the application the printer is configured the same way to print a word document to a pdf file and the output is exactly as expected. The only code difference is that additionally a bookmark item tree is added and word's PrintOut method is used (via COM) instead of a shell command.

The attached rar file contains the original image "Warnhinweis Ü30.jpg" and the output pdf file of the above code "Test4.pdf". Additionally it contains the pdf file "Warnhinweis Ü30.pdf" with the image printed with the IrfanView gui. For that gui-print, no options has been changed in the PdfX Printer settings dialog.
Attachments
ablage.rar
(90.72 KiB) Downloaded 163 times
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17948
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Image print invalid

Post by Tracker Supp-Stefan »

indalgds,

Can you please try to print on standard printer (and the preinstalled PDF XChange Driver) using the IrfanView command line?
So we could make sure that it's not the IrfanView command line that's causing all the trouble, or to locate the villain. :D

Regards,
Stefan
indalgds
User
Posts: 9
Joined: Fri Jul 17, 2009 7:55 am

Re: Image print invalid

Post by indalgds »

I tested printing the image using the IrfanView command line to the preinstalled "PDF-XChange 4.0" printer. The resulting pdf file is correct. It is (visually) identical to the previous attached file "Warnhinweis Ü30.pdf". So, using the (default) settings of the preinstalled driver results in the expected pdf file.

Is there are way to export the complete settings of the preinstalled pdfx printer to a human readably file with the option names of the com api and their corresponding values? If yes, I could try/check all non-default options in my application.

Regards
indalgds
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17948
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Image print invalid

Post by Tracker Supp-Stefan »

So there is something wrong with the settings in your application, as the code behind the stand alone and SDK driver is the same.

Could you please provide us with a code snippet so we could have a look. (Please make sure that your serial and Dev Codes are not visible)
Is there any way to export the complete settings of the preinstalled pdfx printer to a human readably file with the option names of the com api and their corresponding values?
None that I am aware of but will point this topic to the project manager and he may have some tools for this :)
indalgds
User
Posts: 9
Joined: Fri Jul 17, 2009 7:55 am

[solved] Image print invalid

Post by indalgds »

Problem solved, the PdfX printer driver works as designed.

While coding a little test case in vb to attach it to this thread, I noticed that the described problem could not be reproduced by that vb code. Looking closer to the code of our main application I found that it uses an IrfanView configuration from another directory than I used in my tests via command line and in the vb code. And that configuration has some strange settings causing the unexpected pdf output. Once corrected, the created pdf files are exactly as expected.

Thus it was my fault. Thanks for your fast support.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17948
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Image print invalid

Post by Tracker Supp-Stefan »

Anytime indalgds,

I am glad that the problem is solved, and that this topic helped you locate it :)

Regards,
Stefan
Post Reply