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

u3d file in PDF document?

Thread ID:

Created:

Updated:

Platform:

Replies:

131363 Jul 6,2017 03:41 PM UTC Jul 21,2017 10:37 AM UTC WPF 7
loading
Tags: PDF
fff
Asked On July 6, 2017 03:41 PM UTC

Hi all,

Any small wpf example on how to insert an u3d into a pdf ?
Documentation has nothing, and forum has just a broken link to a winform sample

Seems SF lib has a lot of parameters for that, but these are hard to guess

--> wpf ? any sample ?

Thanks,
Fabrice

Sowmiya Loganathan [Syncfusion]
Replied On July 7, 2017 12:17 PM UTC

Hi Fabrice, 

We have created simple sample to “Insert an U3D into PDF document” in WPF platform. 

Please find the sample from the below link. 

Please run the sample and let us know if you need further assistance on this. 

Regards, 
Sowmiya L 


fff
Replied On July 9, 2017 05:25 PM UTC

Hi Sowmiya,

Thanks for the sample - this is the minimal that is at the "Annotation" section.

This sample is using the default Acrobat Reader view:

  • object is centered correctly (this is the VERY good point)
  • object has no lightning
  • background is so dark that almost nothing is visible

The last two are not OK of course. So two options I spend the 2 days to investigate without success so far:

option #1: try to use the default view, but changing is background+lightning+rendering

No success so far. For example, your sample http://help.syncfusion.com/cr/cref_files/windowsforms/pdf/Syncfusion.Pdf.Base~Syncfusion.Pdf.Interactive.Pdf3DBackground.html

does not work, creating an "Either ViewNodeName or CameraToWorldMatrix properties must be specified." error, same error as in many samples in your pdf3d documentation ... likely some breaking changes have been introduced since. (you should escalate on that likely)

Option #2: create additionnal view

This work great to set background+lightning+rendering, ... BUT

Can't work out how to set the cameraToModel matrix, so that the object is centered whatever/wherever the loaded model is. So final user may see an empty view :(

Maybe there is another way with some ViewNodeName to point the camera to the object automatically, but can't work it out either !?


--> Can you help on either method #1 or method #2 ?


Thanks,

Fabrice


Sowmiya Loganathan [Syncfusion]
Replied On July 10, 2017 12:05 PM UTC

Hi Fabrice,  

We have created sample to “Insert an U3D into PDF Document with Pdf3DView” by set the value to the CameraToWorldMatrix. Either ViewNodeName or CameraToWorldMartix must be specified for the creation of Pdf3DView with changing Background, Lighting and Rendering. 

Please find the Sample from the below link :  

Please run the sample in your side and let us know if you need further assistance on this. 

Regards, 
Sowmiya L 


fff
Replied On July 10, 2017 12:55 PM UTC

Hi Sowmiya,

Yes this is like my option #2 that I have now done many timles in the last days.

Please read my previous message: this with fixed cameraToWorld matrix is NOT solving the problem (again read previous to see why)

If you like option #2 as you just did: do you have a way to focus on object, either with node (you mention it but you do not say a solution) or to set automatically the correct matrix to any object that can possibly be located in any direction in the 3D space?

Or do you have an option #1 with corrected bug ? (and benefit from Adobe automatic camera orientation + focus)

Thanks in advance,

Fabrice



Sowmiya Loganathan [Syncfusion]
Replied On July 12, 2017 12:05 PM UTC

Hi Fabrice,  

We have created sample to “Insert an U3D into PDF Document with Pdf3DView” by focus on object with the ViewNodeName. In the creation of additional view with ViewNodeName, Internal name of the Pdf3DView must be specified.  

Please find the Sample from the below link : 

Option 1:  
As we said earlier we must specify the ViewNodeName and internal name to avoid the exception, please refer the updated sample 

Option 2: 
We cannot set the C2W matrix automatically.We have to provide the matrix value manually in the below format. 
[left_x left_y left_z up_x up_y up_z view_x view_y view_z trans_x trans_y trans_z] 

Please run the sample and check whether your requirement achieved at your end. Let us know if you need further assistance on this. 

Regards, 
Sowmiya L 


fff
Replied On July 20, 2017 01:57 PM UTC

Thanks a lot Sowmiya !

(For others: the project file has some error when reconstructing in VS2015, but the .cs content is perfectly usable)


"Funny" how a simple view.ViewNodeName = "whatever_here_at_least_1_char";

 that brings nothing to the 3D & camera definition ... makes it works (was not in your online examples at time of writing ; should be added to make your examples work)


Thanks again & hope it will help others also.

Fabrice




Sowmiya Loganathan [Syncfusion]
Replied On July 21, 2017 10:37 AM UTC

Hi Fabrice, 

Thank you for your suggestion. We will update the sample in our UG documentation. 

Please let us know if you need further assistance. 

Regards, 
Sowmiya L 


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

;