Page 1 of 1

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

Posted: Mon May 02, 2022 12:18 pm
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?

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

Posted: Tue May 03, 2022 10:54 pm
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?

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

Posted: Tue May 03, 2022 11:15 pm
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

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

Posted: Wed May 04, 2022 12:17 am
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.

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

Posted: Wed May 04, 2022 1:44 am
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!

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

Posted: Wed May 04, 2022 10:02 pm
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?

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

Posted: Thu May 05, 2022 1:05 am
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.

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

Posted: Thu May 05, 2022 10:59 am
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/