Page 1 of 1

Can't save with required PDF Version

Posted: Thu Feb 06, 2020 10:04 am
by rit750104
Hi.

I created PdfConformance.PDF1_2 with gdPicturePDF.NewPDF, and created a new PDF file.
When I checked the created PDF file with the GetPDFAConformance method, it was PDF Version 1.3.
How do I create a PDF file as a regular PDF Version 1.2?

Re: Can't save with required PDF Version

Posted: Mon Feb 10, 2020 11:03 am
by loicaigon
Hi,

Thank you for letting us know. Let me check with the engineers and come back to you asap.

Re: Can't save with required PDF Version

Posted: Mon Feb 10, 2020 2:10 pm
by Hugo
Hi there,

Would you be able to submit a code snippet isolating the issue so we may reproduce it on our end please?

Regards,

Re: Can't save with required PDF Version

Posted: Wed Feb 12, 2020 6:42 am
by rit750104
Hi there,

I wrote the code as below.

Code: Select all

using (var oGdPictureImaging = new GdPictureImaging())
{
	int m_SrcImageID = oGdPictureImaging.CreateGdPictureImageFromFile(this.txtSrcFile.Text);
	int iPageCount = oGdPictureImaging.GetPageCount(m_SrcImageID);

	using (var oGdPicturePDF = new GdPicturePDF())
	{
		oGdPicturePDF.NewPDF(PdfConformance.PDF1_2);
		Console.WriteLine(oGdPicturePDF.GetPDFAConformance());

		for (int iPage = 1; iPage <= iPageCount; iPage++)
		{
			oGdPictureImaging.SelectPage(m_SrcImageID, iPage);
			oGdPicturePDF.AddImageFromGdPictureImage(m_SrcImageID, false, true);
			Application.DoEvents();
		}

		string destFile = this.txtDestFolder.Text + "\\" + System.IO.Path.GetFileNameWithoutExtension(this.txtSrcFile.Text) + ".pdf";
		oGdPicturePDF.SaveToFile(destFile);

		oGdPicturePDF.CloseDocument();
		oGdPictureImaging.ReleaseGdPictureImage(m_SrcImageID);
	}
}
The completed PDF file is displayed as PDF version 1.3 even when viewing the document properties of Acrobat Reader.

Thank you.

Re: Can't save with required PDF Version

Posted: Wed Feb 12, 2020 2:55 pm
by Hugo
Thank you very much for your code snippet.

As you can see from our documentation the lowest version you can use for PDF Conformance is V1.4 as mentioned in our documentation:
https://www.gdpicture.com/guides/gdpicture/Gd ... ce%29.html

As of recently we have changed this and you are allowed to create PDF V1.3 files.

We'll change this soon in our documentation. Unfortunately anything below V1.3 is unavailable.

Regards

Re: Can't save with required PDF Version

Posted: Wed Feb 12, 2020 6:05 pm
by rit750104
Hello, Hugo.
Thank you for your reply.
I overlooked that part of the documentation.
Thank you for the valuable information.