Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Wikipedia:Reference desk/Archives/Computing/2025 November 4

From Wikipedia, the free encyclopedia
Computing desk
< November 3 << Oct | November | Dec >> Current desk >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


November 4

[edit]

PDF copy paste is wrong

[edit]

https://ceoodisha.nic.in/repo/View_Eroll_2002/02/AC014/P014092.pdf

This is written in Odiya.

Now those who can read Odiya they can read names correctly, but lets say I copy paste some names then the copy paste is wrong.

Like I read Ajay Das but after copy paste it is pasted as Ajytrd Dosdf and those who cant read Odiya they will translate it as totally different name .. This is happening with all the names mentioned in this pdf.

I think there is some problem how the PDF was created. If I want to tell them as email, what should I tell them? Plantleaves1234 (talk) 12:55, 4 November 2025 (UTC)reply

I don't understand the language, but there is something weird going on with the document. If I copy-paste into Excel and then do a text to columns delimited by spaces, I get a seemingly decent copy of the original, but there's all kinds of extra characters showing up that are definitely not visible in the PDF. For example, the 178003 near the top right changes to 1780031 and an additional 1 gets added in the next column over. And the further you look, the more and weirder the errors become. Sorry, that's not helpful, but I can confirm there's something weird going on. Matt Deres (talk) 13:58, 4 November 2025 (UTC)reply
PDF is intended as a presentation format, embedding a page description language. As such, it's really only concerned with how to get documents to render reliably, on a wide variety of screens and printers. PDF doesn't really store data in a structure beyond what's necessary for rendering it, and how data is stored in PDFs varies greatly depending on what software was used to create it. It's really common to find invisible glyphs and stuff in weird orders, and sometimes to find that text has been duplicated, or glphs have been rendered into polylines (and thus aren't "text" at all). Sometimes glyphs are mapped to characters in a weird way, with custom CMAPs.
For this reason, trying to extract data from a PDF can be an unreliable, fragile process. Cut and paste is, as you've seen, only workable some of the time. People (who do this kind of thing for a living) will sometimes write script to parse the PDF and extract data, but doing so is brittle - if the creator changes their production system, it can change the order in which display elements are written into the PDF, invalidating the assumptions the parser script has had to make.
The proper solution isn't to fix the PDFs; PDFs are not a data interchange format. If this is data that the creator intends be read and processed by others (e.g. census data), it needs to be in a format intended for that. For example, the UK government seems to give their datasets either in OpenDocument or Excel XML; other organisations might use other XML formats, or maybe CSVs. So that's what you should ask them for. If they refuse, you're stuck with bodges. -- Finlay McWalter··–·Talk 16:29, 4 November 2025 (UTC)reply
There are free tools that make a pdf "searchable", based on OCR. However, none that I saw had an option for the Odia script.  ‑‑Lambiam 11:12, 5 November 2025 (UTC)reply