[Poppler-bugs] [Bug 107182] Add support for reading PDF/A, PDF/X version from the information dictionary (glib backend)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Aug 11 09:23:47 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=107182

--- Comment #10 from Evangelos Rigas <e.rigas at cranfield.ac.uk> ---
(In reply to Albert Astals Cid from comment #9)
> I see you're using regexec which is not available on windows since it's a
> posix thing.
> 
> I don't really care much for windows personally, but people get annoyed when
> we break the build too much.
> 
Makes total sense!

> Can you try using the C++11 regexp support that should be more widely
> supported?
> https://en.cppreference.com/w/cpp/regex
> 
> Sorry about that :/
Done! Changed regex to C++11 regexp and added documentation reference in glib.


P.S. Weirdly enough, I couldn't convert to and from an std::string to
GooString.
In line 522, instead of: std::string pdfsubver = pdfSubtypeVersion->toStr();
I had to go with:

std::string pdfsubver(pdfSubtypeVersion->getCString(), // Which immitates the 
                      pdfSubtypeVersion->getLength()); // toStr() declaration.
Upon compilation it was throwing an error that toStr is not member of Class
GooString.

And in line 555 instead of GooString *conf = new GooString(match.str(3));
I went with: GooString *conf = new GooString(match.str(3).c_str());

However, performance-wise the two versions are the same.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20180811/5b7be111/attachment.html>


More information about the Poppler-bugs mailing list