Can't save with required PDF Version

Discussions about PDF management.
Post Reply
rit750104
Posts: 3
Joined: Thu Feb 06, 2020 6:52 am

Can't save with required PDF Version

Post by rit750104 » Thu Feb 06, 2020 10:04 am

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?

loicaigon
Posts: 35
Joined: Mon Oct 21, 2019 9:11 am

Re: Can't save with required PDF Version

Post by loicaigon » Mon Feb 10, 2020 11:03 am

Hi,

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

Hugo
Posts: 227
Joined: Tue Dec 18, 2018 10:09 am

Re: Can't save with required PDF Version

Post by Hugo » Mon Feb 10, 2020 2:10 pm

Hi there,

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

Regards,

rit750104
Posts: 3
Joined: Thu Feb 06, 2020 6:52 am

Re: Can't save with required PDF Version

Post by rit750104 » Wed Feb 12, 2020 6:42 am

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.

Hugo
Posts: 227
Joined: Tue Dec 18, 2018 10:09 am

Re: Can't save with required PDF Version

Post by Hugo » Wed Feb 12, 2020 2:55 pm

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

rit750104
Posts: 3
Joined: Thu Feb 06, 2020 6:52 am

Re: Can't save with required PDF Version

Post by rit750104 » Wed Feb 12, 2020 6:05 pm

Hello, Hugo.
Thank you for your reply.
I overlooked that part of the documentation.
Thank you for the valuable information.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest