Hi!
When I load a bunch of images into the pdf viewer, how can I tell when it has done this and is ready?
Beqause for example I get an OLE error 82130001 if I try the set the Thumbnail pane visible before all is done with the loading and so on.
If would be nice to have a state propery or something alike to check.
How to see if PDFXCView is processing something?
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
- Tracker Supp-Stefan
- Site Admin
- Posts: 17941
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: How to see if PDFXCView is processing something?
Hello magthenop,
If you are using NewDocumentFromImages on success you will receive the unique document identifier of the newly created document in DataOut, so you should be checking for when this newDocID is set, and there is always the OnEven method to use
Best,
Stefan
If you are using NewDocumentFromImages on success you will receive the unique document identifier of the newly created document in DataOut, so you should be checking for when this newDocID is set, and there is always the OnEven method to use
Code: Select all
// create empty IPDFXCargs object
IPDFXCargs args;
DoVerb(NULL, ".ARGS", dataIn, dataOut, 0);
args = (IPDFXCargs)dataOut;
dataOut = NULL;
...
// create input files list
args.Add("C:\image1.jpg");
args.Add("C:\image2.png");
args.Add("C:\image3.tiff");
...
// create new document from the images
DoVerb(NULL, "NewDocumentFromImages", dataIn, dataOut, 0);
newDocID = dataOut;
Stefan
Re: How to see if PDFXCView is processing something?
I am using the NewDocumentFromImage, but when I then try to Show the Thumbnail pane after this command I get an OLE error, and I asume thats beqause the PDFXCView is not "ready" to recieve this command at that stage.
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: How to see if PDFXCView is processing something?
Hi, magthenop.
Please give us the simple example code for this action. It is possible that there are some errors in your code...... but when I then try to Show the Thumbnail pane
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Re: How to see if PDFXCView is processing something?
In essens this is whats going on:
If success, run this:
Code: Select all
Try
PDFRitning.DoVerb('', 'ExecuteCommand', 'NewDocumentFromImage', DataOut, 0);
except
on ex : EOleException do Begin
ShowErrorMessage('NewDocumentFromImage, OppnaBilder',ex);
End;
end;
Code: Select all
Try
PDFRitning.SetProperty('Commands[#32620].State','Offline',0); // Stäng av Select Text
except
on ex : EOleException do Begin
ShowErrorMessage('Stäng av Select Text, FixaBilden',ex);
End;
end;
Try
PDFRitning.SetProperty('Commands[#32614].State','Offline',0); // Stäng av Snapshot tool
except
on ex : EOleException do Begin
ShowErrorMessage('Stäng av Snapshot tool, FixaBilden',ex);
End;
end;
Try
PDFRitning.SetProperty('View.Bars[#32925].Visible',1,0); // Zoom
except
on ex : EOleException do Begin
ShowErrorMessage('Zoom, FixaBilden',ex);
End;
end;
Try
PDFRitning.SetProperty('Commands[#36346].State','Offline',0); // Avståndsmätning
except
on ex : EOleException do Begin
ShowErrorMessage('Avståndsmätning, FixaBilden',ex);
End;
end;
If FinnsKommentarer=True Then Begin
Try
PDFRitning.SetDocumentProperty(DocId,'View.Panes["Comments"].Visible',1,0); // Visa Comments panel
except
on ex : EOleException do Begin
ShowErrorMessage('Visa Comments panel, FixaBilden',ex);
End;
end;
End;
Try
PDFRitning.SetDocumentProperty(DocId,'View.Panes["Thumbnails"].Visible',1,0); // Visa Tummnaglar för sidor panelen
except
on ex : EOleException do Begin
ShowErrorMessage('Visa Tummnaglar för sidor panelen, FixaBilden',ex);
End;
end;
Try
PDFRitning.SetProperty('Commands[#36350].State','Offline',0); // Stäng av Summering av kommentarer
except
on ex : EOleException do Begin
ShowErrorMessage('Stäng av Summering tool, FixaBilden',ex);
End;
end;
Re: How to see if PDFXCView is processing something?
Hi!
After updating to the new 2.5.188 this problem har gone away.
Did also notice that there are two things in the new version that I could use, namely ContentMonitor and ContentReady to wait until an openening of a document is complete.
After updating to the new 2.5.188 this problem har gone away.
Did also notice that there are two things in the new version that I could use, namely ContentMonitor and ContentReady to wait until an openening of a document is complete.
- Tracker Supp-Stefan
- Site Admin
- Posts: 17941
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: How to see if PDFXCView is processing something?
Glad to hear that magthenop!
And Kudos to our dev guys for the new build!
Best,
Stefan
And Kudos to our dev guys for the new build!
Best,
Stefan