A program for splitting a docx file into parts of no more than a specified size

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

A program for splitting a docx file into parts of no more than a specified size

#1 Post by Eugene Lutsenko »

Does anyone know how to make a program in Alaska to split a docx file into parts no larger than a given size? These parts should consist of a whole number of pages.

Sample algorithm:
1. Split the source file into pages.
2. Start forming the 1st part. Add pages to the 1st part until its size exceeds the specified one.
3. Write the file of the 1st part without the last page.
4. Start forming the 2nd part from this page. Etc.

There are online services that divide docx files into pages. It remains to combine them into files of several pages in such a way that the resulting files do not exceed a certain specified size.

Or maybe someone knows where to download such a program?

k-insis
Posts: 94
Joined: Fri Jan 28, 2011 4:07 am

Re: A program for splitting a docx file into parts of no more than a specified size

#2 Post by k-insis »

There exist some online docx splitters ( products.aspose.app )

If you need to do it xbase source, than easiest way would be using object of Ms Office Word itself.

so in create object
xoApp := CreateObject("Word.Application")

then open source docx, and open two file copies of source docs (to retain styles ) , select single pages and write them into (switching two files) and checking fileSizeOf(x)

Mind... that it would probably produce lower quality documents - formatting of page breaks, even/odd pages headrs and footers would be all over place, widow/orphan control would stab itself...

First question would be why splitting docx in first place? reduce size for email? It is easier to change mail account settings than to split files into subpar smaller documents.



Eugene Lutsenko wrote: Mon May 02, 2022 12:18 pm Does anyone know how to make a program in Alaska to split a docx file into parts no larger than a given size? These parts should consist of a whole number of pages.

Sample algorithm:
1. Split the source file into pages.
2. Start forming the 1st part. Add pages to the 1st part until its size exceeds the specified one.
3. Write the file of the 1st part without the last page.
4. Start forming the 2nd part from this page. Etc.

There are online services that divide docx files into pages. It remains to combine them into files of several pages in such a way that the resulting files do not exceed a certain specified size.

Or maybe someone knows where to download such a program?

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: A program for splitting a docx file into parts of no more than a specified size

#3 Post by Eugene Lutsenko »

k-insis wrote: Tue May 03, 2022 10:54 pm ...First question would be why splitting docx in first place? reduce size for email? It is easier to change mail account settings than to split files into subpar smaller documents....
Thank you, k-insis!

I need it in order to translate it into English and place it on my page in https://www.researchgate.net/profile/Eugene-Lutsenko his monographs and textbooks, both published and unpublished. There are quite a lot of them: about 100. I use a wonderful translator for translation with the preservation of the structure of the text design: https://www.onlinedoctranslator.com/app ... ionprocess.

However, it only translates files smaller than 10 MB. And PDF greatly spoils the design.

So far I have posted only small works in English: https://www.researchgate.net/project/Wo ... in-English

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: A program for splitting a docx file into parts of no more than a specified size

#4 Post by skiman »

Hi Eugene,

For the translation you can use https://translate.google.com/?sl=ru&tl=en&op=docs to translate. This way you won't have all these advertisements. Limit is the same, since the other site is also using Google.
Best regards,

Chris.
www.aboservice.be

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: A program for splitting a docx file into parts of no more than a specified size

#5 Post by Eugene Lutsenko »

skiman wrote: Wed May 04, 2022 12:17 am Hi Eugene,

For the translation you can use https://translate.google.com/?sl=ru&tl=en&op=docs to translate. This way you won't have all these advertisements. Limit is the same, since the other site is also using Google.
thank you very much!

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: A program for splitting a docx file into parts of no more than a specified size

#6 Post by Eugene Lutsenko »

skiman wrote: Wed May 04, 2022 12:17 am Hi Eugene,

For the translation you can use https://translate.google.com/?sl=ru&tl=en&op=docs to translate. This way you won't have all these advertisements. Limit is the same, since the other site is also using Google.
skiman!
Or maybe you know a translator that preserves the structure of the text design without limiting the size of the translated file?

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: A program for splitting a docx file into parts of no more than a specified size

#7 Post by skiman »

Hi Eugene,

No sorry, I don't think that will be available. Maybe when using the API of Google. But this won't be free I suppose.

Splitting a Word document seems also not easy. Looks as it is difficult to split without loosing the layout.
Best regards,

Chris.
www.aboservice.be

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: A program for splitting a docx file into parts of no more than a specified size

#8 Post by Eugene Lutsenko »

Hi, skiman! I found a powerful universal Russian translator that translates files without size restrictions. However, he has a free period of 6 days. But during this time it is quite possible to translate what I need, which is what I am doing now.

https://www.promt.ru/

Post Reply