We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

pdf file properties

Thread ID:

Created:

Updated:

Platform:

Replies:

120901 Oct 26,2015 06:22 PM UTC Nov 10,2015 05:04 AM UTC ASP.NET Web Forms 9
loading
Tags: PDF
mohammad miran
Asked On October 26, 2015 06:22 PM UTC

Can anyone please suggest me how to find the properties of a pdf file in C# language. For ex, a user uploads a pdf file of 5 pages. how to find the font , format (pdf or pdf/a) and other various properties of that uploaded file.
will be very helpful if code snippet is provided.

Thanks.
Miran

Praveenkumar H [Syncfusion]
Replied On October 27, 2015 06:04 AM UTC

Hi Miran,

Thank you for using syncfusion products,

You can get the various information from the PDF document by loading into the class “PdfLoadedDocument”, please refer the below code snippet.

PdfLoadedDocument doc = new PdfLoadedDocument("../../Data/sample.pdf");

//Get the used fonts from the document

PdfUsedFont[] usedFonts=doc.UsedFonts;

//get the conformance level of the document

PdfConformanceLevel conformance = doc.Conformance;

//Get the document information such document title,subject etc

PdfDocumentInformation information= doc.DocumentInformation;

For more information please refer the class reference of  PdfLoadedDocument”.

With Regards,
Praveen


mohammad miran
Replied On October 28, 2015 09:55 AM UTC

Hi Miran,

Thank you for using syncfusion products,

You can get the various information from the PDF document by loading into the class “PdfLoadedDocument”, please refer the below code snippet.

PdfLoadedDocument doc = new PdfLoadedDocument("../../Data/sample.pdf");

//Get the used fonts from the document

PdfUsedFont[] usedFonts=doc.UsedFonts;

//get the conformance level of the document

PdfConformanceLevel conformance = doc.Conformance;

//Get the document information such document title,subject etc

PdfDocumentInformation information= doc.DocumentInformation;

For more information please refer the class reference of  PdfLoadedDocument”.

With Regards,
Praveen


Hi Praveen ,

Thanks for your reply, it was helpful.
I am facing another issue that is while using the Syncfusion dlls in a separate console project it is giving me an error of assembly/dll not found. The dlls used are the same ones which are used in my project.
I wanted to do some POC stuff but not able to proceed.
Below is the error thrown at build time.
The type or namespace name 'Pdf' does not exist in the namespace 'Syncfusion' (are you missing an assembly reference?) 

Thanks
Miran

Praveenkumar H [Syncfusion]
Replied On October 29, 2015 06:28 AM UTC

Hi Miran,

Thank you for your update,

Currently the Essential PDF doesn’t support the “.Net frame work with Client profile” so change this to “.Net framework” , refer the below screenshot.



Please try the above step and let me know the results.

With Regards,
Praveen

mohammad miran
Replied On October 29, 2015 01:52 PM UTC

Hi Miran,

Thank you for your update,

Currently the Essential PDF doesn’t support the “.Net frame work with Client profile” so change this to “.Net framework” , refer the below screenshot.



Please try the above step and let me know the results.

With Regards,
Praveen

Hi Praveen ,
Thanks for prompt reply. I was able to proceed with it. But however I am getting error in below line of code
PdfConformanceLevel conformance = doc.Conformance;
I am unable to get the conformance of the uploaded file i.e. whether the file is pdf or pdf/a. I am using version 9 of syncfusion dlls.
Also if a sample project can be made available for parsing the pdf and reading/modifying its properties and saving it.

Thanks
Miran

Praveenkumar H [Syncfusion]
Replied On October 30, 2015 07:03 AM UTC

Hi Miran,

We are able to reproduce the issue “Exception occurs when getting conformance level from existing document”. We have logged a report on this and will fix the issue internally, also the fix will be included in our upcoming Vol 4 release, which has been scheduled to be rolled out in the end of December.

We have also created an incident internally to have a follow up with this issue.


Please find the attached sample for parsing and modifying the existing document.

http://www.syncfusion.com/downloads/support/forum/120901/ze/PdfFileTesting-1271588662.zip


Regards,

Praveen


mohammad miran
Replied On November 3, 2015 03:45 PM UTC

Hi Miran,

Thank you for your update,

Currently the Essential PDF doesn’t support the “.Net frame work with Client profile” so change this to “.Net framework” , refer the below screenshot.



Please try the above step and let me know the results.

With Regards,
Praveen

Hi Praveen ,
Thanks for prompt reply. I was able to proceed with it. But however I am getting error in below line of code
PdfConformanceLevel conformance = doc.Conformance;
I am unable to get the conformance of the uploaded file i.e. whether the file is pdf or pdf/a. I am using version 9 of syncfusion dlls.
Also if a sample project can be made available for parsing the pdf and reading/modifying its properties and saving it.

Thanks
Miran

Hi Praveen,

Thanks for the acknowledgement.
can you please put some highlight on the below issue-
while parsing a pdf file of 900 pages , time taken is 7 minutes where as when the same file when converted to pdf/a format and then parsed it takes 30 minutes. Is there any particular way for parsing a pdf/a file. Also let me know if using the higher versions of syncfusion dlls(for ex, 11.0,) will be beneficial for parsing pdf files in terms of time taken,features available and efficiency.

Thanks
Miran

Praveenkumar H [Syncfusion]
Replied On November 4, 2015 07:05 AM UTC

Hi Miran,

Can you please share us the PDF/A document which has 900 pages, it will help us to investigate the reason for time taken.
We have improved and fixed the lot of bugs related to document parsing in the latest version, so the latest version is efficient than previous version of Essential PDF. We suggesting you to use latest version

Please let us know if you need further assistance.

With Regards,
Praveen

mohammad miran
Replied On November 9, 2015 03:45 PM UTC

Hi Miran,

Can you please share us the PDF/A document which has 900 pages, it will help us to investigate the reason for time taken.
We have improved and fixed the lot of bugs related to document parsing in the latest version, so the latest version is efficient than previous version of Essential PDF. We suggesting you to use latest version

Please let us know if you need further assistance.

With Regards,
Praveen

Hi Praveen,

Thanks for the update.
Can you please help me  in the below issue-
How to insert a text hyperlink to a pdf file. For example I am generating a pdf file with the content as "Welcome to Hello World". 
Now my requirement is that the text "World" should be a hyperlink and on clicking it a url will open in a new browser.

I tried with PdfTextWebLink  property but it is not coming in the C# code. I am using syncfusion dlls of version 9.
Sample code will be helpful.

Thanks
Miran


KarthikeyanC [Syncfusion]
Replied On November 10, 2015 05:04 AM UTC

Hi Miran.
Thank you for your update.
PdfTextWebLink is only available after Version 10 of Essential Studio, we suggest you to update to latest version to make use of it. Please refer the below UG documentation for adding the hyperlink in PDF document.
http://help.syncfusion.com/file-formats/pdf/working-with-hyperlinks

Regards,
Karthikeyan.C

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;