PDF Editor 6.0.318 - Programatically print a PDF silently without print UI. SOLVED
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
PDF Editor 6.0.318 - Programatically print a PDF silently without print UI.
I have a PDF already loaded via code and the below code stopped working and it used to with build 318. Can you help guide me in the right direction to fixing this, please and thanks?
The line "op = pdfCtrl.Inst.CreateOp(2553)" produces Nothing and fails when it is called at Dim input As "PDFXEdit.ICabNode = op.Params.Root("Input")"
Private Sub PerformSilentPrint()
Try
Dim op As PDFXEdit.IOperation = Nothing
op = pdfCtrl.Inst.CreateOp(2553)
Dim doc As PDFXEdit.IPXV_Document = pdfCtrl.Doc
Dim input As PDFXEdit.ICabNode = op.Params.Root("Input")
input.Add().v = doc
Dim opExecFlags As Integer = 0
pdfCtrl.Inst.AsyncDoAndWaitForFinish(op, CUInt(opExecFlags))
Catch ex As Exception
End Try
End Sub
The line "op = pdfCtrl.Inst.CreateOp(2553)" produces Nothing and fails when it is called at Dim input As "PDFXEdit.ICabNode = op.Params.Root("Input")"
Private Sub PerformSilentPrint()
Try
Dim op As PDFXEdit.IOperation = Nothing
op = pdfCtrl.Inst.CreateOp(2553)
Dim doc As PDFXEdit.IPXV_Document = pdfCtrl.Doc
Dim input As PDFXEdit.ICabNode = op.Params.Root("Input")
input.Add().v = doc
Dim opExecFlags As Integer = 0
pdfCtrl.Inst.AsyncDoAndWaitForFinish(op, CUInt(opExecFlags))
Catch ex As Exception
End Try
End Sub
- Tracker Supp-Stefan
- Site Admin
- Posts: 17941
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: PDF Editor 6.0.318 - Programatically print a PDF silently without print UI.
Hello docu-track99,
You had posted in the end user forums - and those are not as actively monitored by our devs as the SDK section.
I've now moved your topic to the correct place and will ask a colleague to take a look!
Cheers,
Stefan
You had posted in the end user forums - and those are not as actively monitored by our devs as the SDK section.
I've now moved your topic to the correct place and will ask a colleague to take a look!
Cheers,
Stefan
- Tracker Supp-Stefan
- Site Admin
- Posts: 17941
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: PDF Editor 6.0.318 - Programatically print a PDF silently without print UI.
Hello docu-track99,
The reply I got was that you should not use number ID values as those will differ from build to build.
Regards,
Stefan
The reply I got was that you should not use number ID values as those will differ from build to build.
Regards,
Stefan
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Re: PDF Editor 6.0.318 - Programatically print a PDF silently without print UI.
Ok, I need help with changing my code then. If I can't use the number then what should be the proper process or how can I get the ID to use?
Thanks,
Steve.
Thanks,
Steve.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: PDF Editor 6.0.318 - Programatically print a PDF silently without print UI.
Hello Steve,
The proper way would be to use the same method as you used to get the 2553 number - Str2ID method.
Cheers,
Alex
The proper way would be to use the same method as you used to get the 2553 number - Str2ID method.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Re: PDF Editor 6.0.318 - Programatically print a PDF silently without print UI.
Thanks for your response. I have used the Str2ID before but I need the string to pass into it. The code I have shared with you came from you so I never new what the ID represented as a string. Please let me know.
Thanks.
Thanks.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: PDF Editor 6.0.318 - Programatically print a PDF silently without print UI.
Hello Steve,
I could not have passed the number value like that as a parameter. It probably might of been a numerical variable that was converted from the string representation of the ID. Though there still was an ID that it was converted from. Anyways, what operation are you using here?
Cheers,
Alex
I could not have passed the number value like that as a parameter. It probably might of been a numerical variable that was converted from the string representation of the ID. Though there still was an ID that it was converted from. Anyways, what operation are you using here?
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Re: PDF Editor 6.0.318 - Programatically print a PDF silently without print UI.
Hi,
The code was given to me by this forum to use about a year ago but since we upgraded to 318 it stopped working. I really don't know what 2553 is supposed to represent that is why I am asking you to for your assistance so I can get it working again. The code provided allowed our program to print an opened PDF silently without the print dialogue appearing.
Does this make sense now?
The code was given to me by this forum to use about a year ago but since we upgraded to 318 it stopped working. I really don't know what 2553 is supposed to represent that is why I am asking you to for your assistance so I can get it working again. The code provided allowed our program to print an opened PDF silently without the print dialogue appearing.
Does this make sense now?
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: PDF Editor 6.0.318 - Programatically print a PDF silently without print UI.
Hello Steve,
Then it seems that it is the op.document.printPages.
Cheers,
Alex
Then it seems that it is the op.document.printPages.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Re: PDF Editor 6.0.318 - Programatically print a PDF silently without print UI. SOLVED
It works: Here is my working code.
Private Sub PerformSilentPrint()
Try
Dim op As PDFXEdit.IOperation = Nothing
op = pdfCtrl.Inst.CreateOp(pdfCtrl.Inst.Str2ID("op.document.printPages"))
Dim doc As PDFXEdit.IPXV_Document = pdfCtrl.Doc
Dim input As PDFXEdit.ICabNode = op.Params.Root("Input")
input.Add().v = doc
Dim opExecFlags As Integer = 0
pdfCtrl.Inst.AsyncDoAndWaitForFinish(op, CUInt(opExecFlags))
Catch ex As Exception
End Try
End Sub
Private Sub PerformSilentPrint()
Try
Dim op As PDFXEdit.IOperation = Nothing
op = pdfCtrl.Inst.CreateOp(pdfCtrl.Inst.Str2ID("op.document.printPages"))
Dim doc As PDFXEdit.IPXV_Document = pdfCtrl.Doc
Dim input As PDFXEdit.ICabNode = op.Params.Root("Input")
input.Add().v = doc
Dim opExecFlags As Integer = 0
pdfCtrl.Inst.AsyncDoAndWaitForFinish(op, CUInt(opExecFlags))
Catch ex As Exception
End Try
End Sub
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: PDF Editor 6.0.318 - Programatically print a PDF silently without print UI.
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ