Skip to main content
Power Automate
    • Connectors
    • Templates
    • Take a guided tour
    • Digital process automation
    • Robotic process automation
    • Business process automation
    • Process advisor
    • AI Builder
  • Pricing
  • Partners
    • Blog
    • Documentation
    • Roadmap
    • Self-paced learning
    • Webinar
    • Business process and workflow automation topics
    • Overview
    • Issues
    • Give feedback
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • User groups
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Microsoft Power Automate Community
    • Welcome to the Community!
    • News & Announcements
    • Get Help with Power Automate
    • General Power Automate Discussion
    • Using Connectors
    • Building Flows
    • Using Flows
    • Power Automate Desktop
    • Process Advisor
    • AI Builder
    • Power Automate Mobile App
    • Translation Quality Feedback
    • Connector Development
    • Power Platform Integration - Better Together!
    • Power Platform Integrations
    • Power Platform and Dynamics 365 Integrations
    • Galleries
    • Community Connections & How-To Videos
    • Webinars and Video Gallery
    • Power Automate Cookbook
    • Events
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    • Community Engagement
    • Community AMA
    • Community Blog
    • Power Automate Community Blog
    • Community Support
    • Community Accounts & Registration
    • Using the Community
    • Community Feedback
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 
    • Microsoft Power Automate Community
    • Galleries
    • Power Automate Cookbook
    • Know where to split a PDF with multiple documents ...

    Know where to split a PDF with multiple documents in it

    02-19-2022 15:24 PM - last edited 02-19-2022 15:35 PM

    Power Apps JoeF-MSFT
    Power Apps
    3912 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    JoeF-MSFT
    Power Apps JoeF-MSFT
    Power Apps
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    Know where to split a PDF with multiple documents in it

    ‎02-19-2022 03:24 PM

    JoeFMSFT_0-1645313379206.png


    This flow takes a PDF that has multiple documents in it – for example, multiple invoices in a single PDF – and uses a delimiter word you provide to know where the PDF should be split or processed. It uses AI Builder text recognition (OCR) to read all the text from the PDF to then obtain the page ranges for the different documents in the PDF.

     

    You can customize this flow to use a connector that will do the actual splitting of the PDF like Adobe PDF Services, Encodian, Plumsail among others. Or you can directly specify the page range in supported AI Builder actions like Invoice Processing and Form Processing. To use this flow:

     

    1. You will need to have an AI Builder license to use this flow. Don’t have one? You can start a free trial at: https://aka.ms/tryaibuilder?utm_source=powerautomate-cookbook&utm_medium=post&utm_campaign=aib-split...

    2. Import the attached .zip file in this message into your Power Automate environment. 

    3. After you upload the flow, make sure you go to the ‘Initialize document delimiter variable’ action and define which text delimits the beginning of a new document. For examples, in this PDF example ‘Adatum multiple invoices.pdf’ we use the word ‘Invoice’ as the text that delimits the start of a new invoice.

      JoeFMSFT_0-1645312441906.png

       

      JoeFMSFT_1-1645312498087.png

       

    4. When running the flow, the actions ‘Page range for split’ and ‘Last page range for split’ will return the page ranges for each document within the PDF. You can add here any action to split of process the PDF by page range.

      JoeFMSFT_2-1645312582979.png

      JoeFMSFT_3-1645312607844.png

       

    Don't hesitate to ask questions in the comments section below! 💬

     

    WheretosplitaPDFwithmultipledocumentsinit_20220219232038.zip
    Labels:
    • Labels:
    • AI Builder
    • Connector
    • Form Processing
    • Invoice Processing
    • Page range
    • text recognition
    Message 1 of 14
    3,912 Views
    1 Kudo
    Reply
    • All forum topics
    • Previous Topic
    • Next Topic
    • « Previous
      • 1
      • 2
    • Next »
    Iro_
    Iro_ Advocate II
    Advocate II
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎04-14-2022 05:19 AM

    Hello,

     

    Thank you for this flow. 

    I'm trying to import it but I'm getting the following error:

    Iro__0-1649938747574.png

     

    Message 2 of 14
    3,372 Views
    0 Kudos
    Reply
    JoeF-MSFT
    Power Apps JoeF-MSFT
    Power Apps
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎04-15-2022 09:10 AM

    Hi @Iro_ ! Thanks for the question. 

     

    How are you importing the flow? You should import it from the My flows section in Power Automate. 

     

    JoeFMSFT_1-1650039005564.png

     

     

    Message 3 of 14
    3,361 Views
    0 Kudos
    Reply
    Prajakta05
    Prajakta05 Helper II
    Helper II
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎06-21-2022 03:05 AM

    Hello @JoeF-MSFT ,

     

    I'm dealing with a scenario where my PDF contains different forms, each form has different layout, also, I've trained different forms in different collection (1 form, 1 collection) Will it work in this case as well ?

    Also, each form starts with unique form number. We have 90 form numbers that are already known to us, can we use these form numbers as delimiters?

     

    Message 4 of 14
    3,025 Views
    0 Kudos
    Reply
    macdo
    macdo
    Regular Visitor
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎10-21-2022 09:50 AM

    Hi @JoeF-MSFT , the attached zip file gives an error when importing. Powerautomate requieres an xml and in this zip there json files.

    I'd appreciate your help by re uploading the file or describing more the flow.

    Thanks in advance and best regards.

    Message 5 of 14
    2,194 Views
    0 Kudos
    Reply
    JoeF-MSFT
    Power Apps JoeF-MSFT
    Power Apps
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎10-22-2022 07:40 AM

    Hi @macdo - thanks for asking!

     

    Did you select the Import Package (Legacy) option?

     

    JoeFMSFT_1-1666449615003.png

     

     

    Message 6 of 14
    2,181 Views
    0 Kudos
    Reply
    macdo
    macdo
    Regular Visitor
    In response to JoeF-MSFT
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎10-22-2022 07:58 AM

    Hi @JoeF-MSFT, didn't know that option, gonna try it, thanks so much for your help and fast reply.

    Best regards! 

    Message 7 of 14
    2,173 Views
    0 Kudos
    Reply
    kyledwheatley
    kyledwheatley
    Regular Visitor
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎11-09-2022 12:02 PM

    Is there solution for if the delimiter is used in the body of the document as well? i.e. INVOICE being both in the header and body? 

    Message 8 of 14
    2,064 Views
    0 Kudos
    Reply
    VD
    VD Helper IV
    Helper IV
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎12-13-2022 04:34 AM

    I am trying to split pdf if invoice have more than one page, however this solution is working fine to split all pages of large pdf into multiple pdf file.

    Invoice PDF have delimiter as Page 1/1 for single page and for multi page invoice Page 1/1, Page 1/2,... like that.

    How to do that? even in power automate desktop I tried but unable to solve this.

    Message 9 of 14
    1,856 Views
    0 Kudos
    Reply
    lucascroxatto
    lucascroxatto
    Frequent Visitor
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎02-05-2023 01:05 PM

    Hi @JoeF-MSFT , I have a 10 collection model. Some collections may have PDF with multiple invoices, and each collection with a different text that delimits the beginning of a new document.

     

    What would you suggest me doing?

    Message 10 of 14
    764 Views
    0 Kudos
    Reply
    • « Previous
      • 1
      • 2
    • Next »

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Pages
    • Power Automate
    • Power Virtual Agents

    • Sign up free
    • Sign in

    Browse

    • Templates
    • Connectors
    • Partners

    Downloads

    • Mobile
    • Gateway

    Learn

    • Documentation
    • Learn
    • Support
    • Community
    • Give feedback
    • Blog
    • Pricing

    • © 2023 Microsoft
    • Contact us
    • Trademarks
    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Terms & conditions
    California Consumer Privacy Act (CCPA) Opt-Out Icon Your California Privacy Choices