Having problems converting tif images to pdf
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
Having problems converting tif images to pdf
Dear People: We have an in house VB 6 application that exports images from Filenet (mostly tiff/multi tiff images); our management wants to add a convert to pdf option to this tool, so when they export images, they also get the pdf version. In our company, we have a license for pdf exchange so my boss asked me to look for an alternative involving pdf exchange; I downloaded the PDF XCHANGE 4 API files and I made changes to our program.
this the logic:
Populate a list with the names of the tiff images
for every member of the list, create a pdf
Very simple as you can see; the strange thing is that If I run the program, only the last image of the list is exported; if I go into debug mode and I step tru all the list members, all the pdf files are created; I think the issue could be with the shellexec printto piece of code; if I can get this code to work, the company is willing to buy the tool, thanks a lot.
JO
If pdfyesorno = 1 Then
Dim fn As String
Dim D As Long
Dim D2 As Long
Dim DD As Byte
Dim P As Printer
Dim bVal As Boolean
Dim s As String
Dim fname5 As String
Dim ListCount2 As Integer
Dim CountListRecords2 As Integer
ListCount2 = List3.ListCount
'fname = "C:\example.pdf"
Dim pfdin, pdfout As String
CountListRecords2 = 1
PDFPrinter.ResetDefaults
PDFPrinter.Option("Save.File") = fname5
PDFPrinter.Option("Save.SaveType") = "Save"
PDFPrinter.Option("Save.ShowSaveDialog") = "No"
PDFPrinter.Option("Save.WhenExists") = "Overwrite"
bVal = True ' doCompress.value
If (bVal = True) Then
With PDFPrinter
.Option("Compression.Graphics") = "Yes"
.Option("Compression.Text") = "Yes"
.Option("Compression.ASCII") = "No"
.Option("Compression.Color.Enabled") = "Yes"
.Option("Compression.Color.Method") = "Auto"
.Option("Compression.Indexed.Enabled") = "Yes"
.Option("Compression.Indexed.Method") = "Auto"
.Option("Compression.Mono.Enabled") = "Yes"
.Option("Compression.Mono.Method") = "Auto"
End With
Else
PDFPrinter.Option("Compression.Graphics") = "No"
PDFPrinter.Option("Compression.Text") = "No"
End If
bVal = False 'doEmbedd.value
PDFPrinter.Option("Fonts.EmbedAll") = IIf(bVal = True, 1, 0)
bVal = True 'doRun.value
PDFPrinter.Option("Save.RunApp") = bVal
If bVal = True Then
PDFPrinter.Option("Save.RunCustom") = "No"
End If
' To Hide progress window uncomment the next line
PDFPrinter.Option("Saver.ShowProgress") = "No"
'main loop
Do While CountListRecords2 <= ListCount2
' (App.Path & "\NewMultipageImage\PDFExport")
pdfin = (App.Path & "\NewMultipageImage\") & CStr(List3.List(CountListRecords2 - 1))
pdfout = (App.Path & "\NewMultipageImage\PDFExport\") & CStr(List3.List(CountListRecords2 - 1)) & ".pdf"
PDFPrinter.ResetDefaults
PDFPrinter.Option("Save.SaveType") = "Save"
PDFPrinter.Option("Save.ShowSaveDialog") = "No"
PDFPrinter.Option("Save.WhenExists") = "Overwrite"
PDFPrinter.Option("Save.File") = pdfout
'Sleep 10000
exptopdf = ShellExecute(0, "printto", pdfin, """" + pname + """", vbNull, SW_MINIMIZE)
'Sleep 10000
CountListRecords2 = CountListRecords2 + 1
Loop
End If ' of user selecting pdf button
' End If ' of List count
'total_no = 0
' total_nodocIDs = 0
' total_related = 0
MsgBox "Process Completed Successfully!"
End If
this the logic:
Populate a list with the names of the tiff images
for every member of the list, create a pdf
Very simple as you can see; the strange thing is that If I run the program, only the last image of the list is exported; if I go into debug mode and I step tru all the list members, all the pdf files are created; I think the issue could be with the shellexec printto piece of code; if I can get this code to work, the company is willing to buy the tool, thanks a lot.
JO
If pdfyesorno = 1 Then
Dim fn As String
Dim D As Long
Dim D2 As Long
Dim DD As Byte
Dim P As Printer
Dim bVal As Boolean
Dim s As String
Dim fname5 As String
Dim ListCount2 As Integer
Dim CountListRecords2 As Integer
ListCount2 = List3.ListCount
'fname = "C:\example.pdf"
Dim pfdin, pdfout As String
CountListRecords2 = 1
PDFPrinter.ResetDefaults
PDFPrinter.Option("Save.File") = fname5
PDFPrinter.Option("Save.SaveType") = "Save"
PDFPrinter.Option("Save.ShowSaveDialog") = "No"
PDFPrinter.Option("Save.WhenExists") = "Overwrite"
bVal = True ' doCompress.value
If (bVal = True) Then
With PDFPrinter
.Option("Compression.Graphics") = "Yes"
.Option("Compression.Text") = "Yes"
.Option("Compression.ASCII") = "No"
.Option("Compression.Color.Enabled") = "Yes"
.Option("Compression.Color.Method") = "Auto"
.Option("Compression.Indexed.Enabled") = "Yes"
.Option("Compression.Indexed.Method") = "Auto"
.Option("Compression.Mono.Enabled") = "Yes"
.Option("Compression.Mono.Method") = "Auto"
End With
Else
PDFPrinter.Option("Compression.Graphics") = "No"
PDFPrinter.Option("Compression.Text") = "No"
End If
bVal = False 'doEmbedd.value
PDFPrinter.Option("Fonts.EmbedAll") = IIf(bVal = True, 1, 0)
bVal = True 'doRun.value
PDFPrinter.Option("Save.RunApp") = bVal
If bVal = True Then
PDFPrinter.Option("Save.RunCustom") = "No"
End If
' To Hide progress window uncomment the next line
PDFPrinter.Option("Saver.ShowProgress") = "No"
'main loop
Do While CountListRecords2 <= ListCount2
' (App.Path & "\NewMultipageImage\PDFExport")
pdfin = (App.Path & "\NewMultipageImage\") & CStr(List3.List(CountListRecords2 - 1))
pdfout = (App.Path & "\NewMultipageImage\PDFExport\") & CStr(List3.List(CountListRecords2 - 1)) & ".pdf"
PDFPrinter.ResetDefaults
PDFPrinter.Option("Save.SaveType") = "Save"
PDFPrinter.Option("Save.ShowSaveDialog") = "No"
PDFPrinter.Option("Save.WhenExists") = "Overwrite"
PDFPrinter.Option("Save.File") = pdfout
'Sleep 10000
exptopdf = ShellExecute(0, "printto", pdfin, """" + pname + """", vbNull, SW_MINIMIZE)
'Sleep 10000
CountListRecords2 = CountListRecords2 + 1
Loop
End If ' of user selecting pdf button
' End If ' of List count
'total_no = 0
' total_nodocIDs = 0
' total_related = 0
MsgBox "Process Completed Successfully!"
End If
- Ivan - Tracker Software
- Site Admin
- Posts: 3549
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: Having problems converting tif images to pdf
ShellExecute returns without waiting for any executed process, you are starting a new iteration with the new pdfout file name, overwriting file name of the previous job.
Possible solutions are:
1) use Sleep(...) to wait some time, but you cannot say how much time is appropriate - i.e. isn't too much and isn't too little;
2) wait for printer's event after ShellExecute before starting new job (you can wait for OnDocSpooled event)
or
3) you can use pxclib40.dll library (one of our developer toolkits - but this may require additional licensing and software developer coding) to create a PDF file from the images without using the printer output option.
hth
Possible solutions are:
1) use Sleep(...) to wait some time, but you cannot say how much time is appropriate - i.e. isn't too much and isn't too little;
2) wait for printer's event after ShellExecute before starting new job (you can wait for OnDocSpooled event)
or
3) you can use pxclib40.dll library (one of our developer toolkits - but this may require additional licensing and software developer coding) to create a PDF file from the images without using the printer output option.
hth
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.
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.
Re: Having problems converting tif images to pdf
Ivan: thanks for the quick response. i used sleep for 10 seconds and it was not enough; I will try higher numbers.
About option 2; i am sorry but I didn't undestand it, do you have any examples?
About option 3; I called your tech support and I was told that doing it this way was the easiest but as you know, I don't have a lot of control; in this case, with our current solution, need to buy a license (1000-2000 bucks); any idea on how much will be if we use the dll (I preffer this method); any examples for vb6.
thanks a lot,
Jo
About option 2; i am sorry but I didn't undestand it, do you have any examples?
About option 3; I called your tech support and I was told that doing it this way was the easiest but as you know, I don't have a lot of control; in this case, with our current solution, need to buy a license (1000-2000 bucks); any idea on how much will be if we use the dll (I preffer this method); any examples for vb6.
thanks a lot,
Jo
- John - Tracker Supp
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
- Contact:
Re: Having problems converting tif images to pdf
The DLL is part of our PDF-Tools SDK for Developers and the cost is $599 - you cannot buy just that library DLL etc - you would need the SDK.
Also do note that unless using the SDK's and licensing in some way - your license does not allow you to call our products from the command line or access the API in anyway - so if you need to script any automated functionality not already provided in the End user versions - a developers license is required.
Hope that helps
Also do note that unless using the SDK's and licensing in some way - your license does not allow you to call our products from the command line or access the API in anyway - so if you need to script any automated functionality not already provided in the End user versions - a developers license is required.
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
Best regards
Tracker Support
http://www.tracker-software.com
Re: Having problems converting tif images to pdf
Ivan: what we want the tool to do is to create pdf files from any format (tiff, doc, xls, ppt); can this by done by using this dll? Any code examples for vb^?
Thanks a lot,
JO
Thanks a lot,
JO
- Ivan - Tracker Software
- Site Admin
- Posts: 3549
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: Having problems converting tif images to pdf
If you want to create PDF from any formats, you have to use driver.
Please check examples distributed with the Driver API, and you will find how to handle events from the driver.
Please check examples distributed with the Driver API, and you will find how to handle events from the driver.
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.
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.
Re: Having problems converting tif images to pdf
Ivan: I checked the samples and I was not able to find anything for Visual Basic; you mentioned the use of Event Onfilesaved; do you have a VB 6 example; I still don't have a solution and our management is pushing me for a solution; if there is no way to do it by using pdf Xchange, I will have to look for other alternative,
thanks for your help.
Jo
thanks for your help.
Jo
- John - Tracker Supp
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
- Contact:
Re: Having problems converting tif images to pdf
Assuming you have downloaded our developers SDK - you will find examples for VB (even in the trial version) - see the attached ...
If you have only licensed/downloaded the end users version - you will not see these as the end user version does not allow use of the developers API at all and is not licensed for this purpose.
Hope that helps
If you have only licensed/downloaded the end users version - you will not see these as the end user version does not allow use of the developers API at all and is not licensed for this purpose.
Hope that helps
- Attachments
-
- VBExamples.zip
- VB Examples
- (13.19 KiB) Downloaded 291 times
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
Best regards
Tracker Support
http://www.tracker-software.com
- Paul - Tracker Supp
- Site Admin
- Posts: 6897
- Joined: Wed Mar 25, 2009 10:37 pm
- Location: Chemainus, Canada
- Contact:
Re: Having problems converting tif images to pdf
Hi josej90,
which SDK did you look in? As Ivan mentioned you need to look in the Drivers API SDK. It is a separate download and install and has it's own examples. Perhaps that's the issue? This Drivers APT can be licensed alongside Viewer functionality in the PDF-XChange Pro SDK Bundle.
hth
which SDK did you look in? As Ivan mentioned you need to look in the Drivers API SDK. It is a separate download and install and has it's own examples. Perhaps that's the issue? This Drivers APT can be licensed alongside Viewer functionality in the PDF-XChange Pro SDK Bundle.
hth
Best regards
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Re: Having problems converting tif images to pdf
Hi: I am confused with your different products; i downloaded the PDF Xchange 4 API, is this the correct one?
C:\Program Files\Tracker Software\PDF-XChange 4 API\Examples\APIExamples\VBExamples\VbExCOM
I will check the link you sent me.
Jo
C:\Program Files\Tracker Software\PDF-XChange 4 API\Examples\APIExamples\VBExamples\VbExCOM
I will check the link you sent me.
Jo
Re: Having problems converting tif images to pdf
Hi, I confirmed that I have that version installed; the provided example works with one file being sent to the printer at a time but in my code, I am sending a lot of files simultaneously and only one file is being created.
Any ideas? How do I connect to the printer to check for status so I can send the next file once the printer is ready to accept?
Thanks.
JO
Any ideas? How do I connect to the printer to check for status so I can send the next file once the printer is ready to accept?
Thanks.
JO
- John - Tracker Supp
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
- Contact:
Re: Having problems converting tif images to pdf
Hi,
There are various switches with the API to perform differing functions and apply the required properties - please see the "save' Method appropriate to the Driver API in the manual supplied - I believe this will set as required.
HTH
There are various switches with the API to perform differing functions and apply the required properties - please see the "save' Method appropriate to the Driver API in the manual supplied - I believe this will set as required.
HTH
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
Best regards
Tracker Support
http://www.tracker-software.com
Re: Having problems converting tif images to pdf
Hi, I am not sure I follow your suggestion and I apologize for my lack of understanding.
I have tried to simplify the issue to see if you can replicate it:
I have 2 tiff files in a directory
example1.tif
example2.tif
for every file, I have a loop that calls the function below for every file:
Print_to_pdf(filename)
Sub Print_to_pdf(fi_name)
Set PDFPrinter = PDFPFactory.Printer("", "PDF-XChange 4.0 Sample", "<YOUR REG CODE>", "<YOUR DEV CODE>")
pname = PDFPrinter.Name
PDFPrinter.SetAsDefaultPrinter
Dim fn As String
Dim D As Long
Dim D2 As Long
Dim DD As Byte
Dim P As Printer
Dim bVal As Boolean
Dim s As String
Dim pfdin, pdfout As String
PDFPrinter.Option("Save.SaveType") = "Save"
PDFPrinter.Option("Save.ShowSaveDialog") = "No"
PDFPrinter.Option("Save.WhenExists") = "Overwrite"
PDFPrinter.Option("Save.RunApp") = "No"
pdfin = (App.Path & "\NewMultipageImage\") & fi_name
pdfout = (App.Path & "\NewMultipageImage\PDFExport\") & fi_name & ".pdf"
PDFPrinter.Option("Save.File") = pdfout
exptopdf = ShellExecute(0, "printto", pdfin, """" + pname + """", vbNull, SW_MINIMIZE)
End Sub
If I place an stop in the code to debug, the two pdf files are produced; If I do a normal run, only the last file is produced.
Any ideas and thanks for your help.
I have tried to simplify the issue to see if you can replicate it:
I have 2 tiff files in a directory
example1.tif
example2.tif
for every file, I have a loop that calls the function below for every file:
Print_to_pdf(filename)
Sub Print_to_pdf(fi_name)
Set PDFPrinter = PDFPFactory.Printer("", "PDF-XChange 4.0 Sample", "<YOUR REG CODE>", "<YOUR DEV CODE>")
pname = PDFPrinter.Name
PDFPrinter.SetAsDefaultPrinter
Dim fn As String
Dim D As Long
Dim D2 As Long
Dim DD As Byte
Dim P As Printer
Dim bVal As Boolean
Dim s As String
Dim pfdin, pdfout As String
PDFPrinter.Option("Save.SaveType") = "Save"
PDFPrinter.Option("Save.ShowSaveDialog") = "No"
PDFPrinter.Option("Save.WhenExists") = "Overwrite"
PDFPrinter.Option("Save.RunApp") = "No"
pdfin = (App.Path & "\NewMultipageImage\") & fi_name
pdfout = (App.Path & "\NewMultipageImage\PDFExport\") & fi_name & ".pdf"
PDFPrinter.Option("Save.File") = pdfout
exptopdf = ShellExecute(0, "printto", pdfin, """" + pname + """", vbNull, SW_MINIMIZE)
End Sub
If I place an stop in the code to debug, the two pdf files are produced; If I do a normal run, only the last file is produced.
Any ideas and thanks for your help.
- John - Tracker Supp
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
- Contact:
Re: Having problems converting tif images to pdf
I'll get one of our guys to take a look ASAP - however one thing springs to mind is the file name variable refreshed with the new image file name as opposed to retaining the first file printed, as I am sure you will already appreciate - if not it will be replaced each time by the latest file ...
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
Best regards
Tracker Support
http://www.tracker-software.com
- Paul - Tracker Supp
- Site Admin
- Posts: 6897
- Joined: Wed Mar 25, 2009 10:37 pm
- Location: Chemainus, Canada
- Contact:
Re: Having problems converting tif images to pdf
Hi josej90,
Ivan has been working on this this morning, it's requiring quite a substantial amount of time. We will get this done as soon as possible and update you here.
hth
Ivan has been working on this this morning, it's requiring quite a substantial amount of time. We will get this done as soon as possible and update you here.
hth
Best regards
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
- Ivan - Tracker Software
- Site Admin
- Posts: 3549
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: Having problems converting tif images to pdf
Please check attached sample (note I'm not VB programmer) which implements waiting for driver's event before printing next file.
HTH
HTH
- Attachments
-
- VbEx2.zip
- (159.15 KiB) Downloaded 286 times
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.
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.
Re: Having problems converting tif images to pdf
Ivan, I checked the executable you sent me and it doesn't do anything; I adapted the waittoprinter code in my application and the code below:
Private Sub WaitForPrinter()
Do Until bConvertFinished
DoEvents
Loop
End Sub
goes into an endless loop; in other words, the events below are never executed:
Private Sub PDFPrinter_OnError(ByVal JobID As Long, ByVal dwErrorCode As Long)
bConvertFinished = True
End Sub
Private Sub PDFPrinter_OnFileSaved(ByVal JobID As Long, ByVal lpszDocName As String)
bConvertFinished = True
End Sub
This is very strange but I think it could be due to our specific environment:
My development environment is a server:
Windows 2003 sp 2
Running on Xeon R CPU
5150 @ 2.66 gigahz
4 G RAM
Our client workstations are
XP 2002 sp 3
Latitude D630
Intel Core 2
2 G RAm
We use PDF exchange 3 PRO in the workstations but not in our development server.
My conclusion is that the events are triggered for some files but not for all; any ideas
Private Sub WaitForPrinter()
Do Until bConvertFinished
DoEvents
Loop
End Sub
goes into an endless loop; in other words, the events below are never executed:
Private Sub PDFPrinter_OnError(ByVal JobID As Long, ByVal dwErrorCode As Long)
bConvertFinished = True
End Sub
Private Sub PDFPrinter_OnFileSaved(ByVal JobID As Long, ByVal lpszDocName As String)
bConvertFinished = True
End Sub
This is very strange but I think it could be due to our specific environment:
My development environment is a server:
Windows 2003 sp 2
Running on Xeon R CPU
5150 @ 2.66 gigahz
4 G RAM
Our client workstations are
XP 2002 sp 3
Latitude D630
Intel Core 2
2 G RAm
We use PDF exchange 3 PRO in the workstations but not in our development server.
My conclusion is that the events are triggered for some files but not for all; any ideas
Re: Having problems converting tif images to pdf
Ivan: It looks like the printer events are not correctly triggered in the server but they are OK in the workstation and I guess I can live with that. I am having a related problem when printing the tif files which by default are opened with Filenet IDM find (is an IBM software that handles images, similar to paint); when I run the process, for every file sent to the printer, the printer properties show and I had to press Enter to continue (If I am exporting 5 files, I will see this screen 5 times); my temporary solution was to change the tiff association to Paint or Windows Picture, but I guess the users will complain having to make this change.
As far as I know, this is the only application I have tested that behaves this way. Do you have any suggestions??
thanks a lot,
Jo
As far as I know, this is the only application I have tested that behaves this way. Do you have any suggestions??
thanks a lot,
Jo
- Ivan - Tracker Software
- Site Admin
- Posts: 3549
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: Having problems converting tif images to pdf
Can you compare on both your workstation and server settings on Advanced page for PDF-XChange printer when you open "Printer properties" dialog from "Printer and Faxes" control panel?It looks like the printer events are not correctly triggered in the server but they are OK in the workstation and I guess I can live with that
Looks like it doesn't print to specified printer, but to the end-user "PDF-XChange 4.0" printer.I am having a related problem when printing the tif files which by default are opened with Filenet IDM find...
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.
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.
Re: Having problems converting tif images to pdf
Ivan: I have the process working Ok for tif, excel, word and other formats; the printing is not working for text files; it looks like when sending the text file to the virtual printer, the printer never responds is ready (in other words, the events for the printer are not triggered; any ideas?
thanks,
JO
thanks,
JO
- John - Tracker Supp
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
- Contact:
Re: Having problems converting tif images to pdf
Hi Jo..
From what application are you loading/printing the .txt file ?
From what application are you loading/printing the .txt file ?
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
Best regards
Tracker Support
http://www.tracker-software.com
Re: Having problems converting tif images to pdf
Hi; the default was notepad and it was hanging; I changed the default application to wordpad and still getting the same issue; the virtual driver doesn't trigger the on error or onfile saved events; any suggestions.
thanks,
JO
thanks,
JO
- John - Tracker Supp
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
- Contact:
Re: Having problems converting tif images to pdf
Hi,
Can you please supply us with a small sample application with all required non Windows/Tracker binary files compiled (exe/dll's etc) and also the project source files - including the .txt files you are trying to convert and we will take a look and try and indenftify where the issues lie - to be honest there are just too many other dev's using this for it to be a bug so for now - without having investigated your code - I suspect the problem is there ...
Please ensure there are no serials/license info in your source for others to view - and zip and attach to your reply.
Also please advise the Hardware (32/64 bit?) and also what version of Windows in use.
thanks
Can you please supply us with a small sample application with all required non Windows/Tracker binary files compiled (exe/dll's etc) and also the project source files - including the .txt files you are trying to convert and we will take a look and try and indenftify where the issues lie - to be honest there are just too many other dev's using this for it to be a bug so for now - without having investigated your code - I suspect the problem is there ...
Please ensure there are no serials/license info in your source for others to view - and zip and attach to your reply.
Also please advise the Hardware (32/64 bit?) and also what version of Windows in use.
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
Best regards
Tracker Support
http://www.tracker-software.com
- Ivan - Tracker Software
- Site Admin
- Posts: 3549
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: Having problems converting tif images to pdf
Can you try manually run from command line:
notepad /pt "you file name" "PDF-XChange 4.0"
notepad /pt "you file name" "PDF-XChange 4.0"
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.
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.
Re: Having problems converting tif images to pdf
The application connects to filenet and exports images as tiff, text files, excel, etc; so the application will not run in your environment unless you have filenet. It works for all the formats but text files.
I run the notepad /pt "thisone.txt" "PDF-XChange 4.0" and the file is saved as a pdf; the strange thing is that the pdf file doesn't have the watermark added by your sample dlls (IF I run the program, the images will have the watermark).
Our workstations also have pdf Xchange 3 Pro and pdf Xchange 4 Pro; is there a possiblity these products are interfering with my application; I tried deleting pdf Xchange 4 Pro (add/remove programs) but the menus are still present at All Programs menus; I may need to delete some entries from the registry I guess.
thanks,
JO
I run the notepad /pt "thisone.txt" "PDF-XChange 4.0" and the file is saved as a pdf; the strange thing is that the pdf file doesn't have the watermark added by your sample dlls (IF I run the program, the images will have the watermark).
Our workstations also have pdf Xchange 3 Pro and pdf Xchange 4 Pro; is there a possiblity these products are interfering with my application; I tried deleting pdf Xchange 4 Pro (add/remove programs) but the menus are still present at All Programs menus; I may need to delete some entries from the registry I guess.
thanks,
JO
Re: Having problems converting tif images to pdf
Guys: We are about to abandon this effort and look for a different alternative. Is there a product in your company that will allow our users to select a directory with different files (excel, text, word, tiff) and convert all the files into pdf in one shot?
JO
JO
- John - Tracker Supp
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
- Contact:
Re: Having problems converting tif images to pdf
Hi Jose,
we are completely perplexed by your issues and the very odd point here is we have many many dev's doing just as you wish to do - and our end user products offer just the same functionality.
Can I ask you to perform one small test to establish if the problem is system or Application specific.
Please download our end user PDF-XChange PRO product - this offers a small utility called Office2PDF which does pretty much what you need - please take a look at this and the 'watched folders' functionality and advise if this works - if it does and I suspect it will - the issue has to be with your application ...
In which case - please zip up as simple an example of your app as you can - compiled and source project - with all supporting files and we will take a look as soon as possible.
You can download PDF-XChange PRO from the link below - it will be functioning demo mode (trial stamps on output) - but for the purposes of this test that will not matter - it may also be best if you email your project to support@pdf-xchange.com so we dont have any licensing issues if your serials etc are included for all to see.
Please include a link back to this forum post for ref purposes.
PDF-XChange PRO
https://www.pdf-xchange.com/PDFX4.zip
Thanks
we are completely perplexed by your issues and the very odd point here is we have many many dev's doing just as you wish to do - and our end user products offer just the same functionality.
Can I ask you to perform one small test to establish if the problem is system or Application specific.
Please download our end user PDF-XChange PRO product - this offers a small utility called Office2PDF which does pretty much what you need - please take a look at this and the 'watched folders' functionality and advise if this works - if it does and I suspect it will - the issue has to be with your application ...
In which case - please zip up as simple an example of your app as you can - compiled and source project - with all supporting files and we will take a look as soon as possible.
You can download PDF-XChange PRO from the link below - it will be functioning demo mode (trial stamps on output) - but for the purposes of this test that will not matter - it may also be best if you email your project to support@pdf-xchange.com so we dont have any licensing issues if your serials etc are included for all to see.
Please include a link back to this forum post for ref purposes.
PDF-XChange PRO
https://www.pdf-xchange.com/PDFX4.zip
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
Best regards
Tracker Support
http://www.tracker-software.com
Re: Having problems converting tif images to pdf
Dear People: We ended up purchasing the 4 api drivers but still having the same issue; I am attaching a zip file with a trimmed version of our program; we were sending multiple files and your recommendation was to query the printer and when the printer was ready, to send the other document. I am not getting the on save and other printer events to respond, so the printer processes one file and it goes into limbo; I would really appreciate a solution for this issue.
thanks,
JO
thanks,
JO
- Attachments
-
- sendtotracker.zip
- (132.74 KiB) Downloaded 218 times
-
- sendtotracker.zip
- (132.74 KiB) Downloaded 226 times
- Tracker Supp-Stefan
- Site Admin
- Posts: 17910
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Having problems converting tif images to pdf
Hi JO,
Could you please make sure that you are using build 5.0.263 of our Drivers, and if not - download and install that and you should start getting the proper event notifications.
If you've purchased a Drivers API license recently it should be for v5 and not v4, and if purchased in the last 13 months - you should be eligible for a free upgrade to v5. Simply log in with your account on our website to obtain that.
Best,
Stefan
Could you please make sure that you are using build 5.0.263 of our Drivers, and if not - download and install that and you should start getting the proper event notifications.
If you've purchased a Drivers API license recently it should be for v5 and not v4, and if purchased in the last 13 months - you should be eligible for a free upgrade to v5. Simply log in with your account on our website to obtain that.
Best,
Stefan
Re: Having problems converting tif images to pdf
STEFAN: I installed the 5 drivers and I got errors in my code; it seems that there are significant changes in drivers 5 that I would have to make adjustements in my code (not sure where); I ended up un installing 5 and re installing 4 to make it work. Based on the code I sent you, Can y ou tell me what the changes are (for version 5)?
JO
JO
- Ivan - Tracker Software
- Site Admin
- Posts: 3549
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: Having problems converting tif images to pdf
Can you say which application is associated with the .tif extension on your machine?
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.
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.
- Ivan - Tracker Software
- Site Admin
- Posts: 3549
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: Having problems converting tif images to pdf
It would be good if you can analyze the return value of the ShellExecute call and wait for the printer only if it was successful (i.e. return value >= 32).
I tried to run your code on my machine and got 31 as the return from ShellExecute. What this means can be seen here:(http://msdn.microsoft.com/en-us/library ... 85%29.aspx):
I tried to run your code on my machine and got 31 as the return from ShellExecute. What this means can be seen here:(http://msdn.microsoft.com/en-us/library ... 85%29.aspx):
SE_ERR_NOASSOC
There is no application associated with the given file name extension. This error will also be returned if you attempt to print a file that is not printable.
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.
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.
Re: Having problems converting tif images to pdf
Stefan: I understand your point but I still have the question of differences between api 4 vs 5; read my post again and let me know what changes I have to make to the vb6 project I added.
thanks,
JO
thanks,
JO
-
- User
- Posts: 205
- Joined: Fri May 18, 2012 8:41 pm
Re: Having problems converting tif images to pdf
Hi josej90,
Thanks for your post. We don't publish a specific list of new features between version 4 and version 5, most of our resources are allocated to finishing the version 3 of the XChange Viewer. However if there is a specific function that you are looking for, you can take a look at the online manual for Drivers API version 5 here: https://help.pdf-xchange.com/develo ... ory:Driver. From the same link, there is also the possibility to download the manual in format pdf.
Thanks.
HTH
Thanks for your post. We don't publish a specific list of new features between version 4 and version 5, most of our resources are allocated to finishing the version 3 of the XChange Viewer. However if there is a specific function that you are looking for, you can take a look at the online manual for Drivers API version 5 here: https://help.pdf-xchange.com/develo ... ory:Driver. From the same link, there is also the possibility to download the manual in format pdf.
Thanks.
HTH
Re: Having problems converting tif images to pdf
Hi; I am not asking for a list of new features; I un installed api4 and install api 5 and I got all sorts of error; my original question is that based on the attached program (requested by you and posted in a previous posting), what changes need to be made to that code in order to make it work; if you spend some time reviewing the code I posted, you may be able to help me.
JO
JO
-
- User
- Posts: 205
- Joined: Fri May 18, 2012 8:41 pm
Re: Having problems converting tif images to pdf
Hi josej90,
Thank you for your post.
Regarding to your questions:
1. Disable all the references to type libraries you are not using, for example:
3. Replace PXCComLib by PXCComLib5
If you don't want to have the watermarks on your pdf documents, enter a valid Reg Code and Dev code at:
Set PDFPrinter = PDFPFactory.Printer("", "PDF-XChange 2012", "<YOUR REG CODE>", "<YOUR DEV CODE>")
Thanks.
Sincerely,
Thank you for your post.
Regarding to your questions:
If you are having 'all sorts of error', we are really interested in knowing what those are.I un installed api4 and install api 5 and I got all sorts of error
Three changes are needed as it is shown in our Visual Basic 6.0 example for PDF-XChange 2012 API :what changes need to be made to that code in order to make it work
1. Disable all the references to type libraries you are not using, for example:
- PDF-XChange 4.0 Type Library
- PDF Filter 1.0 Type Library
- PDFPrevHndlr 1.0 Type Library
- PDFShell 1.0 Type Library
- PDFShellServer 1.0 Type Library
- PDFViewUtils 1.0 Type Library
3. Replace PXCComLib by PXCComLib5
If you don't want to have the watermarks on your pdf documents, enter a valid Reg Code and Dev code at:
Set PDFPrinter = PDFPFactory.Printer("", "PDF-XChange 2012", "<YOUR REG CODE>", "<YOUR DEV CODE>")
Thanks.
Sincerely,
Re: Having problems converting tif images to pdf
Do I need to uninstall v 4.0 and install v 5.0?
JO
JO
- Tracker Supp-Stefan
- Site Admin
- Posts: 17910
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Having problems converting tif images to pdf
Hello JO,
If you only need the latest SDK - I would recommend removing the old one first - as this will minimise the possible conflicts and left over files of the previous version.
Best,
Stefan
If you only need the latest SDK - I would recommend removing the old one first - as this will minimise the possible conflicts and left over files of the previous version.
Best,
Stefan
Re: Having problems converting tif images to pdf
People: We have been able to fix this issue; we decided to put it in the back burner in order to finish other projects; at this time we need to get a resolution for our problem, would it be possible for one of you to remote into our servers and take a look at our issue.
thanks,
JO
501-340-3160
thanks,
JO
501-340-3160
-
- User
- Posts: 205
- Joined: Fri May 18, 2012 8:41 pm
Re: Having problems converting tif images to pdf
Hi josej90,
Thank you for your post. Several issues were dealt in this forum thread and as you mentioned in your last post, you were able to successfully solve these problems. At this point, it is hard to tell from your description what are the remaining issues you need a resolution for. Please let us know what those are (if any) and we will be happy to help you.
Thanks.
Sincerely,
Thank you for your post. Several issues were dealt in this forum thread and as you mentioned in your last post, you were able to successfully solve these problems. At this point, it is hard to tell from your description what are the remaining issues you need a resolution for. Please let us know what those are (if any) and we will be happy to help you.
Thanks.
Sincerely,
Re: Having problems converting tif images to pdf
Nico, I meant to say that WE HAVE NOT BEEN ABLE TO SOLVE THIS ISSUE; sorry about the misunderstanding; we purchased this product only for this funcionality and we haven't been able to make it work; at this point, the best approach is for you guys to take a look on what I have in our servers (remote session); is that possible?
To summarize, I have written a vb6 application to connects to filenet (image repository); the application downloads tiff files to the hard drive, after that, we are using your tool to convert those images to pdf; the images are sent sequentially and as suggested by you, we have a routine that checks if the printer is ready to accept the next file, if so, the file is sent.
This is working for other formats (word, excel, powerpoint) but not for tif images (Use IDM find software from IBM) or text files (using notepad); as a workaroiund, we change the file type for TIF files to be opened by Paint or Windows Picture or fax viewer, and the files are processed; for the text files we have no workaround; the pdf is created but the printer never responds as being ready for the next file.
Again, I think the best way to tackle this is for you guys to take a look.
Thanks,
JO
To summarize, I have written a vb6 application to connects to filenet (image repository); the application downloads tiff files to the hard drive, after that, we are using your tool to convert those images to pdf; the images are sent sequentially and as suggested by you, we have a routine that checks if the printer is ready to accept the next file, if so, the file is sent.
This is working for other formats (word, excel, powerpoint) but not for tif images (Use IDM find software from IBM) or text files (using notepad); as a workaroiund, we change the file type for TIF files to be opened by Paint or Windows Picture or fax viewer, and the files are processed; for the text files we have no workaround; the pdf is created but the printer never responds as being ready for the next file.
Again, I think the best way to tackle this is for you guys to take a look.
Thanks,
JO
- John - Tracker Supp
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
- Contact:
Re: Having problems converting tif images to pdf
Hi Jo,
If I can jump in here quickly - slightly off topic, if you are converting images to PDF - our advice would not be to use our Drivers API - but our PDF-Tools SDK - this is a library method and involves no printer and is much more efficient and quicker - and technically sounder because there is no need to open a viewer to print ...
Can I suggest that you download our PDF-Tools SDK (if you dont have it already) and take a look at the examples and doc's for this - the functionality is in the library for the pxclib40.dll
If this means you have purchased the wrong product we can resolve this once you are content this is the best way to proceed.
HTH
If I can jump in here quickly - slightly off topic, if you are converting images to PDF - our advice would not be to use our Drivers API - but our PDF-Tools SDK - this is a library method and involves no printer and is much more efficient and quicker - and technically sounder because there is no need to open a viewer to print ...
Can I suggest that you download our PDF-Tools SDK (if you dont have it already) and take a look at the examples and doc's for this - the functionality is in the library for the pxclib40.dll
If this means you have purchased the wrong product we can resolve this once you are content this is the best way to proceed.
HTH
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
Best regards
Tracker Support
http://www.tracker-software.com
Re: Having problems converting tif images to pdf
The first thing I did before starting this project was to call your company and asked about the best solution for our problem; using this tool was recommended by your company; we have spent hours trying to make this work and now you are telling me that I am using the wrong product (please read the whole thread, why this idea wasn't given at the begining?).
I really appreciate your input, but as I said, due to the amount of resources we have used to implement this, I prefer to continue with this solution.
I am pretty sure that if one of you take a look at our setting, you should be able to find the reason as of why this is not working.
JO
I really appreciate your input, but as I said, due to the amount of resources we have used to implement this, I prefer to continue with this solution.
I am pretty sure that if one of you take a look at our setting, you should be able to find the reason as of why this is not working.
JO
Re: Having problems converting tif images to pdf
I need to escalate this issue, can you please tell me what is the best way to do it?
- John - Tracker Supp
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
- Contact:
Re: Having problems converting tif images to pdf
I understand your frustration Jose,
But the problem is we do not use filenet so cannot exactly reproduce your enviroment and test - so if you want us to look at I need you to do the following and if you do so I will ensure that as soon as we have - a developer here is assigned to you to assist until the problem is resolved.
1: Please modify one of our examples to do as you require in a local enviroment so we can install here and analyze where the issue lies if any.
2: Please provide both the source and compiled files with example TIF or text files and advsie us what we need in regards using an external viewer to output the print job and replicate your system there.
3: Please advise which specific version of our Drivers API you are using (I assume its Version 4?)
Once we have all we need to 100% exactley reproduce a simple test app doing as you need we will take a look at and do our utmost to assist you in resolving.
Please do not complicate by introducing any other features or comments other than those specifically relating to your existing problem and please do not refer to prior messages as this thread has become far too confusing and complex to keep jumping back into historical posts to get up to speed.
Once you have all this ready - please zip and send to us by email or post here (but if you post here please remove all license info) and we will do our utmost to respond ASAP
Thanks
But the problem is we do not use filenet so cannot exactly reproduce your enviroment and test - so if you want us to look at I need you to do the following and if you do so I will ensure that as soon as we have - a developer here is assigned to you to assist until the problem is resolved.
1: Please modify one of our examples to do as you require in a local enviroment so we can install here and analyze where the issue lies if any.
2: Please provide both the source and compiled files with example TIF or text files and advsie us what we need in regards using an external viewer to output the print job and replicate your system there.
3: Please advise which specific version of our Drivers API you are using (I assume its Version 4?)
Once we have all we need to 100% exactley reproduce a simple test app doing as you need we will take a look at and do our utmost to assist you in resolving.
Please do not complicate by introducing any other features or comments other than those specifically relating to your existing problem and please do not refer to prior messages as this thread has become far too confusing and complex to keep jumping back into historical posts to get up to speed.
Once you have all this ready - please zip and send to us by email or post here (but if you post here please remove all license info) and we will do our utmost to respond ASAP
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
Best regards
Tracker Support
http://www.tracker-software.com
Re: Having problems converting tif images to pdf
John: I will work on a small version for you guys but I think my boss will not be happy with this solution since I sent you a copy in the past (sorry but I had to reffer to the thread); I sincerely think that remote control is the answer, is that an option with your support?
JO
JO
Re: Having problems converting tif images to pdf
John: HEre is a small version of the program; as you will see, the program sends a file to the api and then waits for the printer to respond that the file has been processed, it then sends the following file; the problem is that the printer is never responding that the file was processed.
I am having problems uploading the zip file, your browse button is not doing anything and If i type the filename, stays there forever. can I email you the file?
Jo
I am having problems uploading the zip file, your browse button is not doing anything and If i type the filename, stays there forever. can I email you the file?
Jo
Re: Having problems converting tif images to pdf
I sent the zip file to your support email
- John - Tracker Supp
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
- Contact:
Re: Having problems converting tif images to pdf
OK thanks - will discuss here with the project team and come back 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
Best regards
Tracker Support
http://www.tracker-software.com
- Ivan - Tracker Software
- Site Admin
- Posts: 3549
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: Having problems converting tif images to pdf
Can you tell me which application is associated with .tif files on your machine?
You can get this from the registry. For example, on my machine I have:
HKEY_CLASSES_ROOT\.tif
@ = "Photoshop.TIFFFile.12"
HKEY_LOCAL_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tif
\UserChoice\ProgId = "PhotoViewer.FileAsscoc.Tiff"
HKEY_CLASSES_ROOT\Photoshop.TIFFFile.12
\shell\edit
\shell\open
\shell\preview
HKEY_CLASSES_ROOT\PhotoViewer.FileAsscoc.Tiff
\shell\open
as you can see, on my machine for .tif file's there is no handler for the verb 'printto', and, as result ShellExecute will fail, and for sure the WaitForPrinter will never end.
You have to modify your code a bit:
But for sure it will only solve the problem with waiting for non existent events, but not with printing TIFF files from a third party app.
You can get this from the registry. For example, on my machine I have:
HKEY_CLASSES_ROOT\.tif
@ = "Photoshop.TIFFFile.12"
HKEY_LOCAL_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tif
\UserChoice\ProgId = "PhotoViewer.FileAsscoc.Tiff"
HKEY_CLASSES_ROOT\Photoshop.TIFFFile.12
\shell\edit
\shell\open
\shell\preview
HKEY_CLASSES_ROOT\PhotoViewer.FileAsscoc.Tiff
\shell\open
as you can see, on my machine for .tif file's there is no handler for the verb 'printto', and, as result ShellExecute will fail, and for sure the WaitForPrinter will never end.
You have to modify your code a bit:
Code: Select all
exptopdf = ShellExecute(0, "printto", pdfin, """" + pname + """", vbNull, SW_MINIMIZE)
If (exptopdf > 32) Then ' please check the documentation fo ShellExecute API: http://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx
WaitForPrinter
End If
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.
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.