PXCp_ET_GetElement returns 0 for position

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics or PDF-XChange Viewer SDK if appropriate.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
marcovdlinden
User
Posts: 45
Joined: Thu May 06, 2010 7:40 am

PXCp_ET_GetElement returns 0 for position

Post by marcovdlinden »

Hi,

We're calling PXCp_ET_GetElement to acquire the text position on the page

Code: Select all

...
tElement.mask		= PTEM_Text | PTEM_Offsets | PTEM_Matrix | PTEM_TextParams | PTEM_FontInfo;
...
HRESULT h = PXCp_ET_GetElement( pMdData->m_pPdfDoc, dwTemp, &tElement, 0 );
This works well except for some PDF documents, there matrix.e and matrix.f are zero (everything is zero except scaling .a and .d are 1) for every element in the document.

Anyone got an Idea why this might be?
Attachments
problem.pdf
The file in question all text objects on page one return 0,0 for x,y
(136.74 KiB) Downloaded 632 times
Last edited by marcovdlinden on Thu Nov 24, 2011 3:22 pm, edited 1 time in total.
Marco
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_ET_GetElement returns 0 for position

Post by Tracker Supp-Stefan »

Hello marcovdlinden,

We will need a sample file (and a specific page number if it has more than one page) for testing at our end.

Best,
Stefan
marcovdlinden
User
Posts: 45
Joined: Thu May 06, 2010 7:40 am

Re: PXCp_ET_GetElement returns 0 for position

Post by marcovdlinden »

checking with the pdf owner, when I get permission I'll add it.
Marco
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_ET_GetElement returns 0 for position

Post by Tracker Supp-Stefan »

Thanks for the update marcovdlinden,

We would be waiting for your follow up on this!

Best,
Stefan
marcovdlinden
User
Posts: 45
Joined: Thu May 06, 2010 7:40 am

Re: PXCp_ET_GetElement returns 0 for position

Post by marcovdlinden »

Got permission, I added the document to my first post.
Marco
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_ET_GetElement returns 0 for position

Post by Tracker Supp-Stefan »

Thanks marcovdlinden,

Passed to one of my colleagues and we will investigate this and advise as soon as we have any news.

Best,
Stefan
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_ET_GetElement returns 0 for position

Post by Tracker Supp-Stefan »

Thanks for the sample marcovdlinden,

I just learned that this problem was resolved and that the fix will be in the next build (200).

Best,
Stefan
marcovdlinden
User
Posts: 45
Joined: Thu May 06, 2010 7:40 am

Re: PXCp_ET_GetElement returns 0 for position

Post by marcovdlinden »

Thanks. thats good news.
Marco
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_ET_GetElement returns 0 for position

Post by Tracker Supp-Stefan »

:)
marcovdlinden
User
Posts: 45
Joined: Thu May 06, 2010 7:40 am

Re: PXCp_ET_GetElement returns 0 for position

Post by marcovdlinden »

quick offtopic question,
as far as I know we are not notified of new builds.
Is there a mailing list or something like that?
We would like to addopt this new build once its released :)
Marco
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_ET_GetElement returns 0 for position

Post by Tracker Supp-Stefan »

Hello marcovdlinden,

Yes - if you have an account on our website - you can subscribe for our newsletter, and monthly e-mails. The new build (#200) is planned for mid December as far as I know at this point.

Best,
Stefan
Tracker
marcovdlinden
User
Posts: 45
Joined: Thu May 06, 2010 7:40 am

Re: PXCp_ET_GetElement returns 0 for position

Post by marcovdlinden »

We now have a different PDF document where the Offsets always return 0.
Might this be a related problem, and will this also be fixed in 200?

Or should I create a new topic for this?
Marco
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_ET_GetElement returns 0 for position

Post by Tracker Supp-Stefan »

Thanks for the update marcovdlinden,

I am checking with the colleagues if this is related, and if not - we will see what we can do to fix it.

Best,
Stefan
marcovdlinden
User
Posts: 45
Joined: Thu May 06, 2010 7:40 am

Re: PXCp_ET_GetElement returns 0 for position

Post by marcovdlinden »

Ok if this is not related I can ask if I can upload the PDF in question.
Marco
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_ET_GetElement returns 0 for position

Post by Tracker Supp-Stefan »

Hello marcovdlinden,

We released build 200 last night, so please do check if your second problem is also resolved, and if it is not - please do consider sending us the sample file - and we will see to get this resolved in the next build.

Best,
Stefan
marcovdlinden
User
Posts: 45
Joined: Thu May 06, 2010 7:40 am

Re: PXCp_ET_GetElement returns 0 for position

Post by marcovdlinden »

The second problem of offset zero for all elements still occurs (build 200 and 201).

Attached is an example document, striped down to the bare basics (but the entire original pdf had this problem) to reproduce this problem.

When we process the element acquired with PXCp_ET_GetElement we get offset 0 for all characters.
Mask used: PTEM_Text | PTEM_Offsets | PTEM_Matrix | PTEM_TextParams | PTEM_FontInfo

Try the "healthcare" text and it returns all 0's for all character offsets.
Attachments
2012-03-20 offset zero example.pdf
offset 0 for all characters on the entire document.
(11 KiB) Downloaded 546 times
Marco
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_ET_GetElement returns 0 for position

Post by Tracker Supp-Stefan »

Hello Marco,

We will need to check this a bit further and will post back here as soon as we have any additional info/comments.

Best,
Stefan
marcovdlinden
User
Posts: 45
Joined: Thu May 06, 2010 7:40 am

Re: PXCp_ET_GetElement returns 0 for position

Post by marcovdlinden »

ok thanks.
Marco
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_ET_GetElement returns 0 for position

Post by Tracker Supp-Stefan »

Hi Marco,

We've created a ticket for this case and a developer has been assigned:
#1452: PXCp_ET_GetElement returns 0 for position
and will try to resolve it as soon as possible. We will update this topic when there is any further info.

Best,
Stefan
marcovdlinden
User
Posts: 45
Joined: Thu May 06, 2010 7:40 am

Re: PXCp_ET_GetElement returns 0 for position

Post by marcovdlinden »

Do you have any idea on what the cause is of this problem.
The reason I'm asking is, since this happens only with some documents, might there be a temporary work around, till you resolve this?

I'm guessing that the way this PDF was created is giving some problems, might there be specific settings when generating the original PDF that could avoid this problem?

note that this particular document was not generated with your tools.
Marco
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_ET_GetElement returns 0 for position

Post by Tracker Supp-Stefan »

Hello Marco,

Yes it's quite possible that there is something specific to the file that is causing this.
Our ticketing system is temporary offline - so I can't check the latest comments in there - but as soon as it's back on - I will see to post an update here.

Best,
Stefan
User avatar
Lzcat - Tracker Supp
Site Admin
Posts: 677
Joined: Thu Jun 28, 2007 8:42 am

Re: PXCp_ET_GetElement returns 0 for position

Post by Lzcat - Tracker Supp »

Hello Marco.
There is problem in your file (not critical for viewing or text ectraction) and xcpro was not avble to handle it correctly. According to PDF specification Font Descriptor dictionary must contain FontName entry (missing in your file). From next build (202) xcpro will ignore absence of this entry, so Offsets will be filled correctly.
HTH.
Victor
Tracker Software
Project manager

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
marcovdlinden
User
Posts: 45
Joined: Thu May 06, 2010 7:40 am

Re: PXCp_ET_GetElement returns 0 for position

Post by marcovdlinden »

Ok, good to know what the cause is.

And even better that xcpro will be able to handle this.

Thanks for the fix.
Marco
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_ET_GetElement returns 0 for position

Post by Tracker Supp-Stefan »

:)
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6836
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: PXCp_ET_GetElement returns 0 for position

Post by Paul - Tracker Supp »

Hi marcovdlinden,

We have addressed this issue in the last build. Can you update and confirm this works at your end please?

regards
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
marcovdlinden
User
Posts: 45
Joined: Thu May 06, 2010 7:40 am

Re: PXCp_ET_GetElement returns 0 for position

Post by marcovdlinden »

Hi Paul,

All test doc's that I have available work now. Thanks for the fix.
Marco
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_ET_GetElement returns 0 for position

Post by Tracker Supp-Stefan »

Great to hear that marcovdlinden!

Best,
Stefan
Post Reply