PDF Rendering Engine Bug Report

A forum for questions or concerns related to the PDF-XChange Core API SDK

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

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
monolith
User
Posts: 4
Joined: Tue Nov 22, 2016 4:21 pm

PDF Rendering Engine Bug Report

Post by monolith »

I've been learning the internals of PDF with the help of John Whitington's 'PDF Explained' (O'Reilly 2011) which uses pdftk to fixup hand-generated text files.

This forum section seems as good a place as any to file a technical bug report for your engine programming team. I really prefer your viewer to Adobe's for testing so hope this bug is fixed soon.

Experimenting with Form XObject's containing text objects uncovered a bug with your rendering engine's state machine - the text parameter state is reset when invoking the XObject with operator Do rather than inheriting it like the rest of the graphics state:

% page 1 content stream
obj 9 0
stream
% setup some text state which should be inherited
12 TL % leading
/FHV 10.0 Tf % select font & size
0.1 0.5 0.7 rg % fill colour
/X1 Do % call Form XObject to draw some text
endstream
endobj

% Form XObject
obj 10 0
<< /Type /XObject /SubType /Form etc >>
stream
BT
%12 TL <-- uncomment to set state inside text object
%/FHV 10.0 Tf <-- rather than inherit from content stream
72 144 Td % position text
(XObject text) Tj % show coloured text
(ABCdef)' % next line use leading state
ET
endstream
endobj

Tested with your latest public downloads of PDF Edit6 and Viewer (version 2.5 build 318.1) on Windows XP SP3.

Confirmed Adobe and GhostScript Gview work correctly as per PDF standard.

Attached a minimal PDF file which illustrates the bug.
Attachments
asciitest.pdf
This pdf is uncompressed ASCII readable in Notepad.
(1.38 KiB) Downloaded 131 times
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17822
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PDF Rendering Engine Bug Report

Post by Tracker Supp-Stefan »

Hello monolith,

Thanks for the report.
I will pass it to our devs for investigation.

Regards,
Stefan
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: PDF Rendering Engine Bug Report

Post by Ivan - Tracker Software »

We do handle text state parameters inheritance properly because these parameters have an influence on content items positions and handling them will cause some issue when the same XForm will be used twice or more with different text states. Currently, in most cases, we do have only one instance of content for such XForm. That helps us save memory.
But for resourceless XForms (XForm that has no own /Resources specified) we may have more than one content, and it seems we have to enhance this mechanism to handle XForms that requires external text state parameters.

There is no time to make this fix in build 319, which should be released soon but we will try to do that in the nearest future build.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
monolith
User
Posts: 4
Joined: Tue Nov 22, 2016 4:21 pm

Re: PDF Rendering Engine Bug Report

Post by monolith »

Thanks for the reply. I found the bug when creating a font sample page with the sample text encapsulated in the XObject but a different font selected each time outside the object, hence not as a resource of the XObject.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17822
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PDF Rendering Engine Bug Report

Post by Tracker Supp-Stefan »

Thank you for this monolith,

We appreciate you reported it and we will look at fixing this asap - but as Ivan said - it will probably be resolved for the build after 319.0.

Regards,
Stefan
Post Reply