I will tackle this issue. Hopefully not in a too far future.
I would recommend that you use the watch option on the wxPdfDocument GitHub repository. Then you will be automatically informed, when new features are added.
For now, I call it a day.
I will tackle this issue. Hopefully not in a too far future.
WOW!!!utelle wrote: ↑Fri Nov 20, 2020 1:47 pm A first implementation of PDF/A-1B support is now available at the wxPdfDocument GitHub repository.
Code: Select all
Absolute real value must be less than or equal to 32767.0
DeviceRGB may be used only if the file has a PDF/A-1 OutputIntent that uses an RGB colour space
Code: Select all
PDF/A-1b:2005
HasDocID is required but missing
DocIDMissing is set, but shouldn't be
XMPMetaData is required but missing
TransparencyGroup is set, but shouldn't be
CIDFontSubsetWithoutCIDSet is set, but shouldn't be
CIDFontTrueTypeWithoutCIDToGIDMap is set, but shouldn't be
HasOutputIntentGTS_PDFA1 is required but missing
InfoMeetsPDFA1b_2005 is required but missing
RealOverflow14 is set, but shouldn't be
For the first message, I have no clue, unfortunately.cutecode wrote: ↑Fri Nov 20, 2020 4:48 pm The same resultCode: Select all
Absolute real value must be less than or equal to 32767.0 DeviceRGB may be used only if the file has a PDF/A-1 OutputIntent that uses an RGB colour space
At least some of the error messages can be explained by the fact, that PDF/A-1B mode was not in effect.cutecode wrote: ↑Fri Nov 20, 2020 4:48 pm I checked this file on this site
https://bfo.com/blog/2017/11/08/verify_pdfa_online/
It gives more errorsCode: Select all
PDF/A-1b:2005 HasDocID is required but missing DocIDMissing is set, but shouldn't be XMPMetaData is required but missing TransparencyGroup is set, but shouldn't be CIDFontSubsetWithoutCIDSet is set, but shouldn't be CIDFontTrueTypeWithoutCIDToGIDMap is set, but shouldn't be HasOutputIntentGTS_PDFA1 is required but missing InfoMeetsPDFA1b_2005 is required but missing RealOverflow14 is set, but shouldn't be
No. If the PDF/A-1B mode of wxPdfDocument is correctly enabled the transparency info will not be written to the PDF document.
Code: Select all
// Create wxPdfDC instance as you already did in your code (the instance name in your code may be different)
wxPdfDC dc;
// Start creation of document
dc.StartDoc("...");
// Access the underlying wxPdfDocument instance immediately *after* method StartDoc has been called
wxPdfDocument* pdfDoc = dc.GetPdfDocument();
// Enable PDF/A-1B conformance
pdfDoc->SetPdfA1Conformance(true);
// Disable page compression
// This makes it easier for me to analyse the PDF content of your generated PDF document.
// Compression should be enabled for production mode.
pdfDoc->SetCompression(false);
// ... continue with generating the PDF document ...
Code: Select all
CIDFontSubsetWithoutCIDSet is set, but shouldn't be
CIDFontTrueTypeWithoutCIDToGIDMap is set, but shouldn't be
RealOverflow14 is set, but shouldn't be
Code: Select all
<ns2:message>
Absolute real value must be less than or equal to 32767.0
For all CIDFont subsets referenced within a conforming file, the font descriptor dictionary shall include a
CIDSet stream identifyi...</ns2:message>
Well, at least the list of remaining errors is rather short. I will have to take a look at the PDF documentation to find out what needs to be done to avoid these errors or whether there exists some sort of workaround.cutecode wrote: ↑Fri Nov 20, 2020 9:34 pm hello. now I have these errorsCode: Select all
CIDFontSubsetWithoutCIDSet is set, but shouldn't be CIDFontTrueTypeWithoutCIDToGIDMap is set, but shouldn't be RealOverflow14 is set, but shouldn't be
Code: Select all
pdfDoc->SetFontSubsetting(false);
I will try to find out which font information is requested, whether wxPdfDocument has access to it, and whether it's feasible to add it to the PDF document.cutecode wrote: ↑Fri Nov 20, 2020 9:39 pm and my service responed thisCode: Select all
<ns2:message> Absolute real value must be less than or equal to 32767.0 For all CIDFont subsets referenced within a conforming file, the font descriptor dictionary shall include a CIDSet stream identifyi...</ns2:message>
I found out that your code seems to draw a rectangle right at the beginning using very large coordinatescutecode wrote: ↑Fri Nov 20, 2020 9:39 pmCode: Select all
Absolute real value must be less than or equal to 32767.0
Code: Select all
42.00 34.00 71769.72 71457.64 re B
Code: Select all
CIDFontSubsetWithoutCIDSet is set, but shouldn't be
CIDFontTrueTypeWithoutCIDToGIDMap is set, but shouldn't be
RealOverflow14 is set, but shouldn't be
Hm, the offending rectangle is still in the page content. And for the font subsetting is still used. The latter could be a bug in wxPdfDocument not taking into account the global setting for font subsetting.cutecode wrote: ↑Fri Nov 20, 2020 11:05 pm I set
pdfDoc->SetFontSubsetting(0);
and removed those lines but the same errors
Code: Select all
CIDFontSubsetWithoutCIDSet is set, but shouldn't be CIDFontTrueTypeWithoutCIDToGIDMap is set, but shouldn't be RealOverflow14 is set, but shouldn't be
Code: Select all
wxPdfFontManager::GetFontManager()->SetDefaultSubset(false);
Code: Select all
CIDFontTrueTypeWithoutCIDToGIDMap is set, but shouldn't be
RealOverflow14 is set, but shouldn't be
Code: Select all
CIDFontTrueTypeWithoutCIDToGIDMap is set, but shouldn't be
Good news.
Obviously it is not enough to embed a complete font, but additional information is even then required - at least for TrueType fonts.cutecode wrote: ↑Sat Nov 21, 2020 1:45 pm 1 error leftCode: Select all
CIDFont TrueType Without CIDToGIDMap is set, but shouldn't be
An adjusted implementation of PDF/A-1B conformance is now available. PDF/A-1B mode should now work with TrueType Unicode and OpenType Unicode fonts.utelle wrote: ↑Sat Nov 21, 2020 10:18 pmObviously it is not enough to embed a complete font, but additional information is even then required - at least for TrueType fonts.cutecode wrote: ↑Sat Nov 21, 2020 1:45 pmCode: Select all
CIDFont TrueType Without CIDToGIDMap is set, but shouldn't be
Well, I have to inspect the PDF reference manuals once again, how to prepare the required TrueType font data for inclusion in the resulting PDF document. Solving the issue will probably take a few days, but be assured that a solution will be provided.