Page 1 of 1

Core Api PDF/A3 lost

Posted: Mon Oct 05, 2015 2:59 pm
by edvschu
Hello,

i write XMP Data into a PDF/A3. After that, it's no longer a PDF/A3.

I tried the following:
(1) Open the PDF/A3, do nothing and write in new file, PDF/A3 lost.
(2) Open the PDF/A3, do nothing and write in same file, PDF/A3 not lost.

Code: Select all

pDoc = pInst.OpenDocumentFromFile(sFilePath, Nothing, Nothing, 0, 0)
pDoc.WriteToFile(PdfFileOut, Nothing, 0)
What am I doing wrong?

Best Regards,
edvschu

Re: Core Api PDF/A3 lost

Posted: Mon Oct 05, 2015 10:18 pm
by Ivan - Tracker Software
Are you using latest build (315) of the Core API ? I just checked and cannot reproduce the issue.
Can you send me your file as it might be file specific issue?

Re: Core Api PDF/A3 lost

Posted: Tue Oct 06, 2015 9:59 am
by edvschu
I use last Build (315) of Core Api.

Problem with writing in same/new file are resolved. But writing XMP Data resulting in the loss of PDF/A3 Format.

I do this:

Code: Select all

Dim pDoc As LIBNAME.IPXC_Document = OpenDocumentFromFile(sFile, pdfInst)
If pDoc Is Nothing Then
   Return
End If

Dim Meta As LIBNAME.IPXC_XMPMetadata = pDoc.GetXMPMetadata
Dim sSchemaZUGFeRD As String = System.IO.File.ReadAllText(sFileDir & "ZUGFeRD_extension_schema.xmp")
Dim sptr As IntPtr = Marshal.StringToHGlobalAnsi(sSchemaZUGFeRD)
Dim iDataSize As UInteger = Convert.ToUInt32(sSchemaZUGFeRD.Length)
Dim memBlock As LIBNAME.IMemBlock = auxInst.CreateMemBlock()

memBlock.SetData(sptr, iDataSize)
Meta.SetXMP(memBlock)

pDoc.WriteToFile(sFileXMP)
pDoc.Close()
Can anyone help?

Regards,
edvschu

Re: Core Api PDF/A3 lost

Posted: Tue Oct 06, 2015 12:26 pm
by Sasha - Tracker Dev Team
Hi, edvschu.

We're looking into this problem and will answer you when we'll have an answer.

Re: Core Api PDF/A3 lost

Posted: Tue Oct 06, 2015 6:40 pm
by Ivan - Tracker Software
As I see your code replaces XMP metadata, not append it.
And your XMP block has no:

Code: Select all

		<rdf:Description rdf:about=""
				xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/">
			<pdfaid:part>3</pdfaid:part>
			<pdfaid:conformance>B</pdfaid:conformance>
		</rdf:Description>
block.

Also there some issues with editing PDF/A documents - some methods prevents PDF/A documents modification.
Will fix this issue, and will add a method to add blocks to existing XMP metadata.

Re: Core Api PDF/A3 lost

Posted: Wed Oct 07, 2015 7:31 am
by edvschu
Thanks for information.

Which method i must use for appending?

From Adobe there are an XMP SDK. I append these XMP Data on these PDF. The XMP Block was no required.
Must it be done differently with Core Api?

What do you mean with 'fix this issue'?

Regards,
edvschu

Re: Core Api PDF/A3 lost

Posted: Wed Oct 07, 2015 8:59 am
by Sasha - Tracker Dev Team
Hello, edvschu.

As Ivan said, we will add a method to append blocks to existing XMP metadata in the future build.
As for the 'issue fix' - it's about 'some methods prevent PDF/A documents modification'.

Re: Core Api PDF/A3 lost

Posted: Wed Oct 07, 2015 9:24 am
by edvschu
Now it is clear :D .

Re: Core Api PDF/A3 lost

Posted: Wed Oct 07, 2015 9:31 am
by Sasha - Tracker Dev Team
:)

Re: Core Api PDF/A3 lost

Posted: Thu Oct 15, 2015 2:54 pm
by John - Tracker Supp
Please post your Core API Questions in the correct forum to avoid confusion and delays

Thanks - we will move as appropriate.

thanks

Re: Core Api PDF/A3 lost

Posted: Thu Oct 13, 2016 9:37 am
by edvschu
Hello,
Sasha - Tracker Dev Team wrote:As Ivan said, we will add a method to append blocks to existing XMP metadata in the future build.
will this method yet to come?

Best regards,
edvschu

Re: Core Api PDF/A3 lost

Posted: Thu Oct 13, 2016 9:55 am
by Tracker Supp-Stefan
Hello edvschu,

I have asked Ivan to post an update here in this topic, but because of where he is (Western Canada) - the reply will come a bit later. Still - we will share with you any news as soon as we can!

Regards,
Stefan