Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Fri Jan 25, 2019 12:57 pm

First of all, congratulations to the developers for this great component.

I'm using it to generate PDF documents containing a 3D model. I have seen that from Acrobat Reader it is possible to generate comments on a specific coordinate of the 3D model, and I would like to know if this is possible to do it directly from code using Spire.PDF.

Thank you very much for your help!

[email protected]
 
Posts: 1
Joined: Fri Jan 25, 2019 12:46 pm

Mon Jan 28, 2019 9:34 am

Hi,

Thanks for your inquiry and sorry for the lately reply as weekend.
Sorry that our Spire.PDF doesn't support adding 3D comments at present. We will add the new feature to our future upgrade list. Once it is achieved in the future, we will let you know. Besides, could you please provide a desired file so that our DEV team can better investigate it? Thanks in advance.

Sincerely,
Anna
E-iceblue support team
User avatar

Anna.Zhang
 
Posts: 73
Joined: Thu Sep 27, 2018 3:20 am

Thu Jan 12, 2023 4:03 am

Hi,

Sorry for the long silence. Thanks for your patient waiting.
I'm glad to tell you that our spire.pdf has supported adding 3D comments. Welcome to download and test Spire.PDF Pack(Hot Fix) Version:9.1.0.
Website link: https://www.e-iceblue.com/Download/download-pdf-for-net-now.html
Nuget link: https://www.nuget.org/packages/Spire.PDF/9.1.0

Sample code:
Code: Select all
//Create a new Pdf document.
            PdfDocument doc = new PdfDocument();

            //Add a new page to it.
            PdfPageBase page = doc.Pages.Add();

            //Draw a rectangle on the page to define the canvas area for the 3D file.
            Rectangle rt = new Rectangle(0, 80, 200, 200);

            //Initialize a new object of Pdf3DAnnotation, load the .u3d file as 3D annotation.
            Pdf3DAnnotation annotation = new Pdf3DAnnotation(rt, @"..\..\..\..\..\..\Data\CreatePdf3DAnnotation.u3d");
            annotation.Activation = new Pdf3DActivation();
            annotation.Activation.ActivationMode = Pdf3DActivationMode.PageOpen;

            //Define a 3D view mode.
            Pdf3DView View = new Pdf3DView();
            View.Background = new Pdf3DBackground(new PdfRGBColor(Color.Purple));
            View.ViewNodeName = "3DAnnotation";
            View.RenderMode = new Pdf3DRendermode(Pdf3DRenderStyle.Solid);
            View.InternalName = "3DAnnotation";
            View.LightingScheme = new Pdf3DLighting();
            View.LightingScheme.Style = Pdf3DLightingStyle.Day;

            //Set the 3D view mode for the annotation.
            annotation.Views.Add(View);

            //Add the annotation to Pdf.
            page.AnnotationsWidget.Add(annotation);

            String result = "CreatePdf3DAnnotation_out.pdf";

            //Save the document
            doc.SaveToFile(result);


Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3044
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.PDF

cron