images from file

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

images from file

Post by moke@napconet.com »

I am trying to load tif image file and I need a way to default the page size to that of the image being loaded... Any sugestions?
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: images from file

Post by John - Tracker Supp »

Sorry - please advise - you are trying to View a TIFF file or convert a TIFF file to PDF ?
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
moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

Re: images from file

Post by moke@napconet.com »

Ideally both but I'm trying to convert since i cannot see a way to load a tif file into the viewer programtically. I'd like to get the image in with no manipulation to the image size.
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: images from file

Post by John - Tracker Supp »

Hi,

The reason for asking about the viewing format was we only support PDF as an option in the XChange Viewer ...

I will see what can be done about posting some sample code for your required purpose as soon as possible.
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
moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

Re: images from file

Post by moke@napconet.com »

Thank you, that would be helpful
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: images from file

Post by John - Tracker Supp »

Will try and get this to you in the next 24 hours or so ...
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
moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

Re: images from file

Post by moke@napconet.com »

I should add that I would be willing to buy imagex sdk as well but I see no examples or documentation on how to get the 2 (imagex and pdfx) to work together.
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: images from file

Post by John - Tracker Supp »

To be honest PDF-Tools SDK would probably be a better proposition as many of the functions relating to image manipulation and PDF's are actually Image-XChange functions and are provided to allow developers to convert images to PDF and extract from PDF ...

There are also Delphi examples within the PDF-Tools SDK - although within referring to colleauges I cannot say if these show what you specifically require.

Will come back...
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
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: images from file

Post by Vasyl - PDF-XChange »

Hi,

In the near future(may be in the next build) you will be able to convert TIFF(s) into PDF and view/save result by our PDF-XChange Viewer ActiveX SDK.

Currently, to convert TIFF(s) into PDF, you may use the our PDF-Tools SDK(pxclib40.dll, clear API),
and for viewing PDF(s) - you may use the PDF-XChange Simple Viewer SDK (pxcview.dll, clear API) or PDF-XChange Viewer ActiveX SDK (simple ActiveX control).

You can find PDF-Tools SDK and PDF-XChange Simple Viewer SDK in the PDF-Tools 4 SDK install-package (http://www.docu-track.com/product/pdf-t ... k/download)
See examples:
1. for Images->PDF
See DelphiPXCSample.exe (with "Images and Metafiles" option)
2. for view PDF
See PXCViewDelphi.exe

The PDF-XChange Viewer ActiveX SDK you can find here:
http://www.docu-track.com/product/pdf-x ... ctivex-sdk

Source code is also available.

Note:
Unfortunately, but I found one small issue in PDF-Tools 4 SDK install-package. After installation you should unpack the attached archive into the folder:
...\Tracker Software\PDF-Tools 4 SDK\Examples\TestFiles
After this fix all examples will be work correctly. Sorry for this inconvenience. This issue will be fixed urgently.

HTH.
You do not have the required permissions to view the files attached to this post.
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.
moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

Re: images from file

Post by moke@napconet.com »

For some reason I cannot get the pxclib40.dll to load.

rnning Win XP
VB6
examples will not load
tried to register manually but regsrv32 will not find it even after copying to system32 folder.
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: images from file

Post by Vasyl - PDF-XChange »

Hi,

Please try the:
...\Bin\VB_PXCSample.exe

This example(and all other) working properly in my installed PDF Tools 4 SDK.
Do not call the regsvr32 for pxclib40.dll because it is not com-server, it is regular DLL, contains clear API.

You should copy this dll(and more other dlls which are depended with this dll) from the Bin folder to your project folder.
You can see it: all examples *.exe and *.dll are placed in the same folder.

HTH.
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.
moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

Re: images from file

Post by moke@napconet.com »

Tried running sample app, no go. Error, It is looking for pxclib30.
moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

Re: images from file

Post by moke@napconet.com »

Just to make sure...

If i could progamtically call new document from image and progmatically add the files to the list and force page size to be that of the tifs i would kind of have what i need just using active x viewer sdk

Thanks for the help.
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: images from file

Post by Vasyl - PDF-XChange »

Hi,

Please try fixed VB6-example from the attachment.
You do not have the required permissions to view the files attached to this post.
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.
moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

Re: images from file

Post by moke@napconet.com »

Still will not load. I have copied it to the lib to the folder of app but will not load.
You do not have the required permissions to view the files attached to this post.
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: images from file

Post by Vasyl - PDF-XChange »

Please read readme.txt file again from my previous attachment.
You should copy the new VB_PXCSample.exe (and overwrite the VB_PXCSample.exe) into the folder:
<YourProgramsFolder>\Tracker Software\PDF-Tools 4 SDK\Examples\Bin\
See also my screenshot in this attachment.
You do not have the required permissions to view the files attached to this post.
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.
moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

Re: images from file

Post by moke@napconet.com »

The dll still does not load?? Any thoughts?
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: images from file

Post by John - Tracker Supp »

Please manually copy ALL of the PDF-Tools SDK dll's into the same folder as the executable file and run again - I suspect there is no system variable set for the folder where the dll's reside.

When you actually distribute an end user app you should view the relevant help file and topic provided to establish specifically what functions you are using and on which dll's these depend to ensure the distribution includes only required dll's - but for now this is a 'quick and dirty' means to ensure you can run the desired application.
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
moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

Re: images from file

Post by moke@napconet.com »

BTW all features of the demo vb code seem to work fine except images and metafiles. Also when running from the souce the code is looking for pxclib30.dll (errors.bas) I think to generate the error. When i ajdst it to pxclib40.dll I get ...

"Error [Operating system]: The system cannot find the specified path"

It would seem that the problem is with "images and metafiles" option which is the one i need to test the tiff conversion.
moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

Re: images from file

Post by moke@napconet.com »

i have done as you suggested with the copying all dlls previously. I still cannot get the images command to run.
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: images from file

Post by John - Tracker Supp »

Can you pls advise the specific message you get and also advise whether you are running a 32 or 64 bit system ?

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
moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

Re: images from file

Post by moke@napconet.com »

As stated above when I correct the source code in module "Error. bas" to point to the pxclib40.dll I get the msg

"Error [Operating system]: The system cannot find the specified path"

As also stated all dll's that I am aware of have been copied to the source folder. I am running XP - 32 bit.

I have further tracked the error to the point indicated in the code below in the module "Ex_images.bas"

Code: Select all

MsgBox "0"
    res = PXC_AddImageA(pdf, IMG_NAME, p)

    If (IS_DS_FAILED(res)) Then
            MsgBox "1"
        Ex_Images_P1 = res
            MsgBox "a1"
'ERROR HAPPENS HERE
        Exit Function
    End If
   
    PXC_GetImageDimension pdf, p, iw, ih
        MsgBox "2"
    PXC_PlaceImage cpage, p, I2L(1), PH - I2L(1), I2L(3), I2L(2)
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: images from file

Post by John - Tracker Supp »

Please see the link below for a full set of files - complete -which should be unzipped to any folder of your choice, assuming you have VB installed you will already have the required OCX installed and registered - if not, please run the reg_ocx.bat which will register the required OCX (32 bit) on your system - now the folder hierarchy and all dll's are in place with the required sample images folder, all should run as expected.

I suspect you copied Vasyl's modified example etc to a new folder - without the required sample images folder - hence the message received - had you replaced the original all would be well, or had you referred to the source code - you would have seen the images folder requirement etc.

www.docu-track.co.uk/VB_JV.zip

This has been tested here and runs just fine

Please advise if all is now well.
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
moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

Re: images from file

Post by moke@napconet.com »

I just came to the same conclusion. Thank you for the help...
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: images from file

Post by John - Tracker Supp »

Pleasure ;)
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