A forced-restart of your iPad is the first action to perform - as this will often resolve a latent software issue:
- On an iPad with a Home button: Press and hold the top button and the Home button at the same time. When the Apple logo appears, release both buttons.
- On other iPad models: Press and quickly release the volume up button, press and quickly release the volume down button, then press and hold the top button. When the Apple logo appears, release the button.
When the line appears across the screen, take a screenshot. Once the screenshot has been captured, examine the image. Is the line visible in the screenshot? Rotating the orientation of the iPad by 90° will ensure that the line in the captured image does not coincide with line on the screen.
If the line is present on-screen, but not the screenshot, then you have a hardware fault - requiring repair.
If the line is present on-screen and the screenshot, then the issue is related to software.