Printer Driver is creating only PDF instead of PDFA

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
stefan.sievers
Posts: 2
Joined: Mon May 27 2019

Printer Driver is creating only PDF instead of PDFA

Post by stefan.sievers »

Hello,
I have a strange behaviour of the Amyuni Printer Driver. On certain machines my C# code creates a PDFA as designed but on some machines the converter only creates a normal PDF. What can cause this behaviour?
The code is identical, I compared the registry enties. Everything seems identical.
Is there a way to create any logging or debug information from the print process?
I am also considering using the new version 6.0, but my fear is that the above described behaviour wil not change.
Perhaps I'm missing any other prerequisites ...
OS is Windows 10, Version of Amyuni Printer Driver is 4.5.0.0.

Any help is very strongly appreciated.
Thanks Stefan
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Re: Printer Driver is creating only PDF instead of PDFA

Post by Jose »

Hi,

In order to troubleshoot this issue further, I suggest that we take your application out of the equation.

The VBS code snippet below uses the BatchConvert() to print a txt file with the PDF Converter and set the PDF/A option. Can you try running the VBS script on your end and verify if you are able to PDF/A documents on all your PCs?


'=========================Save text With VBS extension=========================

Const IO_NODUPLICATES = &H1
Const IO_DOWNSAMPLE = &H2
Const IO_CONVERTTOCMYK = &H4
Const IO_OUTPUTPDFA = &H8
Const IO_XMPMETADATA = &H10
Const IO_OUTPUTPDFA8 = &H20
Const IO_COMPRESSJBIG2 = &H200 'Allowed Only with PDF/A-1 and PDF/A-3

'Please check FileNameOptions for the complete version of the flags
Const NoPrompt = &H1
Const UseFileName = &H2
Const EmbedFonts = &H10
Const MultilingualSupport = &H80
Const EmbedStandardFonts = &H200000
Const EmbedLicensedFonts = &H400000

'Constants for Activation codes
Const strLicenseTo = "Amyuni Tech Evaluation"
Const strActivationCode = "07EFCDAB01000100AC41A4BA2046B16F7B4436B737C321BECEB38B37B26EA0FCA05A08CD6E65271D441575F7C6F139E75182B855A5D1"
Const AMYUNIPRINTERNAME = "Amyuni PDF Converter"

' Declare a new cdintfex object if it does not exist in the form.
Set PDF = CreateObject("CDIntfEx.CDIntfEx.6.0")

'Get a reference to the installed printer.
'This will fail if the printer name passed to the DriverInit method is
'not found in the printer’s folder
PDF.DriverInit AMYUNIPRINTERNAME

'The SetDefaultPrinter function sets the system default printer to the one
'initialized by the DriverInit functions.
PDF.SetDefaultPrinter

'Resulting PDF document stored here
PDF.DefaultDirectory = "C:\Temp\"

'Resulting PDF document stored here
PDF.DefaultFileName = "C:\Temp\amyuni.pdf"

'Set Image conversion options
'IO_COMPRESSJBIG2 It cannot be used with PDF/A standard
PDF.SetPrinterParamInt "ImageOptions", IO_OUTPUTPDFA8 Or IO_XMPMETADATA

'Set parameters for PDF/A-3b
Dim part
part = 3 'part = 3
Dim conformance
conformance = Asc("B") 'Conformance "Level B"
PDF.SetPrinterParamInt "PDFALevel", 256 * conformance Or part

'Apply Settings
PDF.SetDefaultConfig

'Set Printer options
PDF.FileNameOptionsEx = NoPrompt Or UseFileName Or EmbedFonts _
Or MultilingualSupport Or EmbedStandardFonts _
Or EmbedLicensedFonts

'The EnablePrinter() method needs to be called right before each print job.
'Calling the EnablePrinter() method will start a 20 second time-out value
PDF.EnablePrinter strLicenseTo, strActivationCode

'The BatchConvert method converts a number of files to PDF, RTF, HTML, Excel or JPeg formats in batch mode.
'This function launches the application that is associated with a specific file and issues a print command to convert the document.
'create a TXT file in your c:\temp directory
PDF.BatchConvert "C:\Temp\sampletext.txt"

'The RestoreDefaultPrinter function resets the system default printer
'to the printer that was the default before the call to SetDefaultPrinter.
PDF.RestoreDefaultPrinter

'This function will simply detach from an existing printer because the handle was created using DriverInit
'PDF.DriverEnd

'Destroy pdfDoc object
Set PDF = Nothing
'===========================================================================
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite
stefan.sievers
Posts: 2
Joined: Mon May 27 2019

Re: Printer Driver is creating only PDF instead of PDFA

Post by stefan.sievers »

Thanks for the answer. This helped me a lot. I udgraded my driver to version 6 and now it runs on all my environments.
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Re: Printer Driver is creating only PDF instead of PDFA

Post by Jose »

Hi,

Glad to have been able to help you out.

Thanks
Jose
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite
Post Reply