1. Roland Mühlberger
  2. PowerBuilder
  3. Wednesday, 25 March 2020 13:21 PM UTC

Has anybody of you been successful implementing Zugferd-compatible PDF documents using the Amyuni ActiveX in combination with PowerBuilder?

We can create the PDFCreactiveX control without any problems, but then run into runtime errors where we cannot find the reasons for.

Our sourcecode:

Long l_handle

TRY
    ole_pdf.Object.SetLicenseKey("AESCUDATA GmbH", "verylongkey")
    l_handle = ole_pdf.object.Open("d:\temp\pdf\amyuni.pdf", "")
    // l_handle yields 1
    ole_pdf.object.CreateObject(43, "invoice.xml")
    // -> leads to error event

Any help appreciated.

Roland

Accepted Answer
Roland Mühlberger Accepted Answer Pending Moderation
  1. Monday, 30 March 2020 08:18 AM UTC
  2. PowerBuilder
  3. # Permalink

Thanks for your responses, you are absolutely right, this is of course a question that should be asked over at the Amyuni support forum.

FWIW, we found the problem: it was partly a licensing issue, we needed to use the Amyuni eval license. And afterwards you need to find a way to set values into an associative string array, which can be done by using the method "Attribute", see below:

// set license key
s_company = "Amyuni PDF Creator Evaluation"
s_code = "get-from-amyuni"
oo_pdf.SetLicenseKey(s_company, s_code)
        
oo_pdf.Open(as_filePdf, "")
        
// Attach the xml to the current document
oo_pdf.CreateObject(ObjectTypeAttachment, as_fileXmlName)
oo_attachment = oo_pdf.GetObjectByName(as_fileXmlName)
oo_attachment.Attribute("Description", "(Invoice)")
oo_attachment.Attribute("Type", "text/xml")
// ...

Thanks again and all the best,

Roland

PS: @Roland Smith: thanks for the hint, we use the "PDF Converter" already successfully. For this certain problem, one has to use the "PDF Creator".

Comment
  1. Armeen Mazda @Appeon
  2. Monday, 30 March 2020 16:25 PM UTC
Thanks for sharing the solution!
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 25 March 2020 14:47 PM UTC
  2. PowerBuilder
  3. # 1

Hi Roland;

   Looks like a good question for the Amyuni support  people.

FYI: https://www.amyuni.com/WebHelp/Amyuni_PDF_Creator_for_ACTIVE_X/ZuGFeRD_Support/ZuGFeRD_Support.htm

Regards ... Chris

Comment
  1. John Fauss
  2. Wednesday, 25 March 2020 18:05 PM UTC
Chris, you & I responded at nearly the same moment, apparently.

:)
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 25 March 2020 14:48 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Roland - 

This sounds like a question that needs to be directed to AmyUni. I hope you find an answer soon.

Regards, John

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 25 March 2020 16:36 PM UTC
  2. PowerBuilder
  3. # 3

I have an example of using 'Amyuni PDF Converter' which is API function based, not ActiveX. Perhaps it will work better.

https://www.topwizprogramming.com/freecode_amyuni.html

 

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Monday, 30 March 2020 13:48 PM UTC
  2. PowerBuilder
  3. # 4

Have you asked appeon to include the capability to add the XML (and other files types) to the native PDF as an enhancement, so that you can build the ZUGFeRD format within PB?  Seems this is a something that should be part of PB

Comment
  1. Roy Bungert
  2. Tuesday, 26 May 2020 08:42 AM UTC
I would also like to see this as an extension in Powerbuilder
  1. Helpful 1
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.