How to extract page to file with file named with specific text in the current page?  SOLVED

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: Daniel - PDF-XChange, PDF-XChange Support, Vasyl - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

maikhanhmst
User
Posts: 7
Joined: Thu Oct 08, 2020 10:51 am

How to extract page to file with file named with specific text in the current page?

Post by maikhanhmst »

Hi all,

I want to extract page to file with the file shall be named with text combined from two location in the current page - the page is extracting.

The situation is the location may vary and fixed.

Anyone have any advise to my problem, please share it to me.

Many thanks.

KM
Last edited by maikhanhmst on Sat May 20, 2023 12:16 am, edited 1 time in total.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19846
Joined: Mon Jan 12, 2009 8:07 am

Re: How to extract page to file with file named with specific test in the current page?

Post by Stefan - PDF-XChange »

Hello maikhanhmst,

I am afraid that it is not currently possible to use text from a specific location on a document's page(s) as part of the file name. Sorry.

Kind regards,
Stefan
maikhanhmst
User
Posts: 7
Joined: Thu Oct 08, 2020 10:51 am

Re: How to extract page to file with file named with specific test in the current page?

Post by maikhanhmst »

Hello Stefan,

Many thanks for your information.

Regards,
KM
User avatar
rakunavi
User
Posts: 1671
Joined: Sat Sep 11, 2021 5:04 am

Re: How to extract page to file with file named with specific test in the current page?  SOLVED

Post by rakunavi »

Hello maikhanhmst,

The Extract pages feature allows you to specify the title of the bookmark as a file name, so if you can create the desired file name as a bookmark in advance, your goal will be achieved.

Therefore, your request might be be replaced with how to create the desired file name as bookmarks.

For example, if you have text in a certain position that you want to use as part of a file name, you can do the following.

  1. Make two copies of the file.
  2. Crop the first copy of the file so that only the first text you want to use as the file name is displayed.
  3. Save the first file as a text file.
  4. Crop the second file you copied so that only the second text you want to use as the file name is displayed.
  5. Save the second file as a text file.
  6. Merge the two text files line by line.
  7. Edit the file in bookmark text format for PDF-XChange Editor, and then execute "Generate Bookmarks From Text File" feature.

  8. Extract each page by specifying the bookmark title as the filename in the Extract Pages dialog.
If the text is positioned in different places, it would be more efficient to create one bookmark at a time with the "Use Selected Text as Title" option enabled on Options menu of Bookmarks pane, instead of cropping as described in the above procedure. After combining two bookmarks per page into one bookmark, the above procedure should do the trick.

Since different people may have different skills in editing text files, etc., this is only a rough outline of the procedure. Also, the above procedure is meaningful only if the file has at least several hundred pages, and if it has only a few pages, it would be much faster to do it all by hand.

I have only described what I would try if I were in your shoes.

Hoping that the above information will be of some help to you.

Best regards,
rakunavi
TOP desires for PDFXCE
forum.pdf-xchange.com/viewtopic.php?t=39665 LassoTool
forum.pdf-xchange.com/viewtopic.php?t=38554 CmtGarbled
forum.pdf-xchange.com/viewtopic.php?t=37353 FulScrMultiMon
forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19846
Joined: Mon Jan 12, 2009 8:07 am

Re: How to extract page to file with file named with specific text in the current page?

Post by Stefan - PDF-XChange »

Hello rakunavi,

Many thanks for the suggestion!

@maikhanhmst - please do let us know if the above helps!?

Kind regards,
Stefan
maikhanhmst
User
Posts: 7
Joined: Thu Oct 08, 2020 10:51 am

Re: How to extract page to file with file named with specific test in the current page?

Post by maikhanhmst »

rakunavi wrote: Sat May 20, 2023 12:24 am Hello maikhanhmst,

The Extract pages feature allows you to specify the title of the bookmark as a file name, so if you can create the desired file name as a bookmark in advance, your goal will be achieved.

Therefore, your request might be be replaced with how to create the desired file name as bookmarks.

For example, if you have text in a certain position that you want to use as part of a file name, you can do the following.

  1. Make two copies of the file.
  2. Crop the first copy of the file so that only the first text you want to use as the file name is displayed.
  3. Save the first file as a text file.
  4. Crop the second file you copied so that only the second text you want to use as the file name is displayed.
  5. Save the second file as a text file.
  6. Merge the two text files line by line.
  7. Edit the file in bookmark text format for PDF-XChange Editor, and then execute "Generate Bookmarks From Text File" feature.

  8. Extract each page by specifying the bookmark title as the filename in the Extract Pages dialog.
If the text is positioned in different places, it would be more efficient to create one bookmark at a time with the "Use Selected Text as Title" option enabled on Options menu of Bookmarks pane, instead of cropping as described in the above procedure. After combining two bookmarks per page into one bookmark, the above procedure should do the trick.

Since different people may have different skills in editing text files, etc., this is only a rough outline of the procedure. Also, the above procedure is meaningful only if the file has at least several hundred pages, and if it has only a few pages, it would be much faster to do it all by hand.

I have only described what I would try if I were in your shoes.

Hoping that the above information will be of some help to you.

Best regards,
rakunavi
Hello rakunavi,

Sorry for my late reply. I faced the same problem, so I decided to visit the forum to find the answer. And then I found my own post with your kind reply here—haha.

Thank you so much! It seems to have solved my problem, but not perfectly. Some pages are missing content in the cropped area, and the text is broken into multiple lines in the text file. But it's not a big problem. I'm trying to get perfect results.

Cheer!!!
User avatar
rakunavi
User
Posts: 1671
Joined: Sat Sep 11, 2021 5:04 am

Re: How to extract page to file with file named with specific text in the current page?

Post by rakunavi »

Hello maikhanhmst,

Thank you for your feedback. People use the program in different ways, it is very helpful to know that. Also, knowing how on target my comments were is very important to the quality of my postings.

Best regards,
rakunavi
TOP desires for PDFXCE
forum.pdf-xchange.com/viewtopic.php?t=39665 LassoTool
forum.pdf-xchange.com/viewtopic.php?t=38554 CmtGarbled
forum.pdf-xchange.com/viewtopic.php?t=37353 FulScrMultiMon
forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19846
Joined: Mon Jan 12, 2009 8:07 am

How to extract page to file with file named with specific text in the current page?

Post by Stefan - PDF-XChange »

:)
Mathew
User
Posts: 567
Joined: Thu Jun 19, 2014 7:30 pm

Re: How to extract page to file with file named with specific test in the current page?

Post by Mathew »

rakunavi wrote: Sat May 20, 2023 12:24 am The Extract pages feature allows you to specify the title of the bookmark as a file name, so
....
  1. Make two copies of the file.
  2. Crop the first copy of the file so that only the first text you want to use as the file name is displayed.
  3. Save the first file as a text file.
  4. Crop the second file you copied so that only the second text you want to use as the file name is displayed.
  5. Save the second file as a text file.
  6. Merge the two text files line by line.
  7. Edit the file in bookmark text format for PDF-XChange Editor, and then execute "Generate Bookmarks From Text File" feature.
  8. Extract each page by specifying the bookmark title as the filename in the Extract Pages dialog.
...
This tool will create bookmarks from text in specific areas on pages (steps 1-7) so you could use @rakunavi's method with two steps:
  1. Run Bookmarks by Page Areas to generate the bookmarks
    image.png
  2. Extract each page by specifying the bookmark title as the filename in the Extract Pages dialog.
You do not have the required permissions to view the files attached to this post.
User avatar
rakunavi
User
Posts: 1671
Joined: Sat Sep 11, 2021 5:04 am

Re: How to extract page to file with file named with specific text in the current page?

Post by rakunavi »

Hello Mathew, thank you for the great advice.

As always, I am impressed with your god-like scripts and precise comments. What a wonderful person you are! :o
I always admire your perfectly timed comments.

Best regards,
rakunavi
TOP desires for PDFXCE
forum.pdf-xchange.com/viewtopic.php?t=39665 LassoTool
forum.pdf-xchange.com/viewtopic.php?t=38554 CmtGarbled
forum.pdf-xchange.com/viewtopic.php?t=37353 FulScrMultiMon
forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
Mathew
User
Posts: 567
Joined: Thu Jun 19, 2014 7:30 pm

Re: How to extract page to file with file named with specific text in the current page?

Post by Mathew »

Not sure my timing is perfect, but oh wow! a massive compliment. Thank you. :D

Your extensive knowledge and detailed explanations, and bug reports are extremely valuable and very much appreciated by me too :) Usually by the time I run into a bug, you've already reported it. And at least half the time I think I need to make a script to do something that -- lo! -- there's a post by you explaining how to do it without a script. Thank you!
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 10998
Joined: Wed Jan 03, 2018 6:52 pm

How to extract page to file with file named with specific text in the current page?

Post by Daniel - PDF-XChange »

:)
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com