File Size of the Current File

A forum for questions or concerns related to the PDF-XChange Core API SDK

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, 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.
Post Reply
mmasood
User
Posts: 101
Joined: Fri Sep 18, 2015 9:49 pm

File Size of the Current File

Post by mmasood »

Hi Alex,

I am using Core Api and C#. I am creating a new document and adding some pages to it from another document until I get to a predefined file size.

Currently I have to do this by saving the file to the disk and then calling FileInfo.Length to get the file size.

Q. Is there a way that I can get the file size from within the IPXC_Document class?

Regards,
M
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: File Size of the Current File

Post by Sasha - Tracker Dev Team »

Hello mmasood,

Sadly, there is no direct method of doing that. The thing is that when we are saving the document, different compression methods are being used for streams etc, to reduce the output file size. Calculating this on the go will prove difficult, because of that.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
mmasood
User
Posts: 101
Joined: Fri Sep 18, 2015 9:49 pm

Re: File Size of the Current File

Post by mmasood »

Hi Alex,

Is this feature on the to do list for any near future releases? If no then I will have to try to find a way around this.

Regards,
M
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: File Size of the Current File

Post by Sasha - Tracker Dev Team »

Hello mmasood,

To be sure, I will have to consult with one of our lead devs who is on vacation right now. He will be available from Monday though and then I can tell you more.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
mmasood
User
Posts: 101
Joined: Fri Sep 18, 2015 9:49 pm

Re: File Size of the Current File

Post by mmasood »

Hi Alex,

Were you able to get hold of the lead developer and get some information from him?

Regards,
M
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: File Size of the Current File

Post by Sasha - Tracker Dev Team »

Hello mmasood,

Just double checked this one - this won't be implemented, because you can't calculate it on the go without saving.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
mmasood
User
Posts: 101
Joined: Fri Sep 18, 2015 9:49 pm

Re: File Size of the Current File

Post by mmasood »

Thanks for the update :)
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: File Size of the Current File

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply