PDF-XChange - Tracker PDF Viewer - TIFF-XChange - Image-XChange - XMF-XChange - Raster-XChange - Support

Moderators: TrackerSupp-Daniel, Tracker Support, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Paul - Tracker Supp, Ivan - Tracker Software, Sean - Tracker, 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.
 
HomerWu
User
Topic Author
Posts: 67
Joined: Fri Nov 25, 2016 8:19 am

Why is the operation so slow?

Tue Dec 05, 2017 1:55 am

hello,

I created a preciew control to preview the watermark and header&footer,after user changed the value,then update the doc,and my logic is as below:

1.remove old watemark
2.remove old header&footer (yes,user can change both the watermark para and header&footer para in the same form)
3.add header&footer
4.add watermark
5.invalidatepage

i found remove watermark/header&footer and add watermark/header&footer cost almost a minute(my document has only 58 pages).
do you have any suggestion to help me?
the attachmens are part of log file and our preview form.
Attachments
log.png
header&footer.png
watermark.png
 
User avatar
Sasha - Tracker Dev Team
User
Posts: 3280
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Why is the operation so slow?

Tue Dec 05, 2017 7:57 am

Hello HomerWu,

Well that's because you are doing it like that. Why can't you remove all of the watermarks/HaFs in one go and then add the needed watermarks and HaFs in another go - should be a couple of seconds.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
 
HomerWu
User
Topic Author
Posts: 67
Joined: Fri Nov 25, 2016 8:19 am

Re: Why is the operation so slow?

Tue Dec 05, 2017 9:42 am

Hello Sasha,

So how can i remove all of the watermarks/HaFs in one go and add the needed watermarks and HaFs in another go?i 'm now using the operations op.document.removeHeaderAndFooter、 op.document.removeWatermarks
、op.document.addHeaderAndFooter、 op.document.addWatermarks one by one :roll:
 
User avatar
Sasha - Tracker Dev Team
User
Posts: 3280
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Why is the operation so slow?

Tue Dec 05, 2017 9:47 am

Hello HomerWu,

Just remove them from all of the pages and add them to all of the pages - that's all.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Who is online

Users browsing this forum: No registered users and 1 guest