View Issue Details

IDProjectCategoryView StatusLast Update
0031092FPCFCLpublic2016-12-14 23:38
ReporterOndrej PokornyAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version3.1.1Product Build 
Target Version3.2.0Fixed in Version3.1.1 
Summary0031092: fpPDF: poSubsetFont breaks international characters
DescriptionSome international characters are rendered wrongly (with a square around the character - e.g. ř), some cause an endless loop when saving the PDF.
Steps To ReproduceSee the attached project - you can comment out some characters.
TagsNo tags attached.
Fixed in Revision35131
FPCOldBugId
FPCTarget
Attached Files

Activities

Ondrej Pokorny

2016-12-09 18:28

developer  

fpPDF_subset.zip (173,887 bytes)

Graeme Geldenhuys

2016-12-13 16:32

reporter   ~0096744

Last edited: 2016-12-13 16:33

View 2 revisions

* I've fix the endless loop (this causes quite a bit of new code).
* I also fixed the broken international characters - partly to blame by the incorrect workings of the endless loop issue.

Attached is the "normal.pdf" and the "subset.pdf" as as produced by the test application using my latest code.

These changes should be in FPC Trunk shortly.

Graeme Geldenhuys

2016-12-13 16:32

reporter  

normal.pdf (180,857 bytes)

Graeme Geldenhuys

2016-12-13 16:32

reporter  

subset.pdf (22,704 bytes)

Ondrej Pokorny

2016-12-13 19:58

developer  

subset-error.png (27,883 bytes)
subset-error.png (27,883 bytes)

Ondrej Pokorny

2016-12-13 20:00

developer   ~0096748

Thank you Graeme! Could you please try to open the subset.pdf file in Acrobat Reader?

I get a "font GRAEAA+[...] cannot be read" error and the document misses characters (see subset-error.png) - I opened the file that you uploaded here.

Graeme Geldenhuys

2016-12-13 21:22

reporter  

subset-2.pdf (19,966 bytes)

Graeme Geldenhuys

2016-12-13 21:30

reporter   ~0096749

@Ondrey: Yes, I always test with multiple PDF readers. As I committed my work I made one or two minor changes, but don't know if that improved things with the reader. Attached is the subset-2.pdf - generate with the latest code (committed in a private repository). It works with Gmail's built in viewer, xpdf, Acrobat Reader X for Win7, Foxit Reader, Evince and Atril.

Incidentally, I retested the original subset.pdf [file from this bug report]. It displayed and rendered 100% correct on all the above PDF viewer too.

What version of Acrobat Reader do you have, and on what version of Windows? Saying that, I only have win2000, winXP and Win7 available here for testing.

Graeme Geldenhuys

2016-12-13 21:30

reporter  

shot.png (31,545 bytes)
shot.png (31,545 bytes)

Graeme Geldenhuys

2016-12-13 21:32

reporter  

shot-2.png (28,547 bytes)
shot-2.png (28,547 bytes)

Graeme Geldenhuys

2016-12-13 21:41

reporter   ~0096750

Looking at the Acrobat Reader X screenshot again, I only now noticed that the letter spacing is a bit wonky. Yet in all the other readers I tested, everything appeared perfect (like the normal.pdf file). Tomorrow I'll double check the glyph width code.

Ondrej Pokorny

2016-12-13 22:31

developer   ~0096753

subset-2.pdf: still the same error in Reader DC. I confirm that the file is opened fine in Opera.

Ondrej Pokorny

2016-12-13 22:34

developer   ~0096754

OS: Win10, software: Acrobat Reader DC 2015.020.20042

Graeme Geldenhuys

2016-12-14 18:26

reporter   ~0096782

@Ondrey: Okay I think I solved the problem. At least it works perfectly now, and no more wonky text, even with my Acrobat Reader X.

Please test the attached "subset-3.pdf" and let me know if it works for you too.

Graeme Geldenhuys

2016-12-14 18:27

reporter  

subset-3.pdf (22,440 bytes)

Ondrej Pokorny

2016-12-14 18:32

developer   ~0096783

Graeme, "subset-3.pdf" opens without errors. Thank you for your efforts!

Michael Van Canneyt

2016-12-14 18:43

administrator   ~0096784

Applied all the patches from Graeme.
Generated PDF looks OK, except maybe it starts from the bottom instead of the top of the page.

Ondrej Pokorny

2016-12-14 19:59

developer   ~0096795

Michael, did you really commit all changes from Graeme? The current trunk seems to generate subset-2.pdf (the old file) instead of subset-3.pdf (the latest file).

Graeme Geldenhuys

2016-12-14 20:06

reporter   ~0096796

@Ondrej: I just committed the latest changes to Michael's private repository. I wanted to wait until I got confirmation from you - which I only saw now. So Michael committed some improvements from my earlier work, but they were not the fix for subset-3.pdf. I've just sent Michael a private email, notifying him about the fcl-pdf update. Everything should be in FPC Trunk as soon as Michael gets another free moment.

Sorry for the confusion.

Michael Van Canneyt

2016-12-14 23:22

administrator   ~0096797

Committed latest changes of Graeme.

Ondrej Pokorny

2016-12-14 23:38

developer   ~0096798

The latest commit is OK, thank you!

Issue History

Date Modified Username Field Change
2016-12-09 18:28 Ondrej Pokorny New Issue
2016-12-09 18:28 Ondrej Pokorny File Added: fpPDF_subset.zip
2016-12-09 18:50 Michael Van Canneyt Assigned To => Michael Van Canneyt
2016-12-09 18:50 Michael Van Canneyt Status new => assigned
2016-12-13 16:32 Graeme Geldenhuys Note Added: 0096744
2016-12-13 16:32 Graeme Geldenhuys File Added: normal.pdf
2016-12-13 16:32 Graeme Geldenhuys File Added: subset.pdf
2016-12-13 16:33 Graeme Geldenhuys Note Edited: 0096744 View Revisions
2016-12-13 19:58 Ondrej Pokorny File Added: subset-error.png
2016-12-13 20:00 Ondrej Pokorny Note Added: 0096748
2016-12-13 21:22 Graeme Geldenhuys File Added: subset-2.pdf
2016-12-13 21:30 Graeme Geldenhuys Note Added: 0096749
2016-12-13 21:30 Graeme Geldenhuys File Added: shot.png
2016-12-13 21:32 Graeme Geldenhuys File Added: shot-2.png
2016-12-13 21:41 Graeme Geldenhuys Note Added: 0096750
2016-12-13 22:31 Ondrej Pokorny Note Added: 0096753
2016-12-13 22:34 Ondrej Pokorny Note Added: 0096754
2016-12-14 18:26 Graeme Geldenhuys Note Added: 0096782
2016-12-14 18:27 Graeme Geldenhuys File Added: subset-3.pdf
2016-12-14 18:32 Ondrej Pokorny Note Added: 0096783
2016-12-14 18:43 Michael Van Canneyt Fixed in Revision => 35126
2016-12-14 18:43 Michael Van Canneyt Note Added: 0096784
2016-12-14 18:43 Michael Van Canneyt Status assigned => resolved
2016-12-14 18:43 Michael Van Canneyt Fixed in Version => 3.1.1
2016-12-14 18:43 Michael Van Canneyt Resolution open => fixed
2016-12-14 18:43 Michael Van Canneyt Target Version => 3.2.0
2016-12-14 19:59 Ondrej Pokorny Note Added: 0096795
2016-12-14 19:59 Ondrej Pokorny Status resolved => feedback
2016-12-14 19:59 Ondrej Pokorny Resolution fixed => reopened
2016-12-14 20:06 Graeme Geldenhuys Note Added: 0096796
2016-12-14 23:22 Michael Van Canneyt Fixed in Revision 35126 => 35131
2016-12-14 23:22 Michael Van Canneyt Note Added: 0096797
2016-12-14 23:22 Michael Van Canneyt Status feedback => resolved
2016-12-14 23:22 Michael Van Canneyt Resolution reopened => fixed
2016-12-14 23:38 Ondrej Pokorny Note Added: 0096798
2016-12-14 23:38 Ondrej Pokorny Status resolved => closed