Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6361491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:47:04+00:00 2026-05-24T23:47:04+00:00

For PDF/A documents which contain additional information (like barcode data) in their embedded metadata,

  • 0

For PDF/A documents which contain additional information (like barcode data) in their embedded metadata, is there a simple way to access this information from a Delphi application – instead of using a full-featured PDF reader / writer application library? (For example open source command line tools)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:47:05+00:00Added an answer on May 24, 2026 at 11:47 pm

    As far as I know the PDF metadata is just available in plain text in the PDF/A document.

    So you can search for the <x:xmpmeta pattern in the file, then the whole metadata is available here, until </x:xmpmeta>. Then you retrieve the XML content.

    function ExtractPDFMetadata(const aPDFFileName: TFileName): UTF8String;
    var tmp: RawByteString;
        i: integer;
    begin
      with TFileStream.Create(aPDFFileName,fmOpenRead) do 
      try
        SetLength(tmp,Size);
        Read(tmp[1],Size);
      finally
        Free;
      end;
      result := '';
      i := pos('<x:xmpmeta',tmp);
      if i=0 then exit;
      delete(tmp,1,i-1);
      i := pos('</x:xmpmeta>',tmp);
      if i=0 then exit;
      result := copy(tmp,1,i+12);
    end;
    

    Then this UTF8String could be used to parse the XML content, as usual.

    You can also locate this XML content using the “Metadata” kind of entry in the PDF catalog: this will be faster (don’t have the parse the file), but will need much extra coding.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several A4 PDF documents which I would like (two into one) glue
I have a link in a pdf-document (PDF1), which is embedded in a browser
I am using PDF documents for various purposes using iText library. Its like one
My program generates relatively simple PDF documents on request, but I'm having trouble with
Our company has thousands of PDF documents. How do we create a simple search
We have a requirement to generate PDF documents using information from a PDA /
I have a project which needs to generate PDF documents. I am using iTextSharp.
I'm trying to generate some LaTeX code which from thereon should generate PDF documents.
I would like to update my app to support the downloading of PDF documents,
I am running into some problems using CAM::PDF with PDF documents which are %PDF-1.6

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.