Autodesk Forge Viewer: pdf calibration - autodesk-forge

why do I measure different values if I calibrate the pdf on and off the drawing lines
calibration on lines
measure after
calibration outside lines
measure after
pdf file
Thanks for more information
I expected same measure value

Related

Unable to give draw balloon on DWG file using Autodesk Viewer

We are attempting to create a balloon on a DWG file but are unsure how to do so in Autodesk Viewer. Could you possibly offer a solution or do you have any resources for this in the Autodesk team?
Also, how to get callout API on the normal Autodesk Viewer?
We are referring circle as a balloons which consists of numbers!
We implemented callouts in Autodesk Construction Cloud, but we couldn't find a way to convert a rectangle of callouts to a circle (Balloons).
First of all, when we're viewing a drawing with Viewer, we're actually viewing a non-modifieble translation of the original desing.
You can find the detailed process at https://aps.autodesk.com/en/docs/model-derivative/v2/tutorials/prep-file4viewer/
From there, you have two options:
Modify the source file and prepare the new version for Viewer
Add the ballon and callouts to the model scene
For option 1 you'll need to use Design Automation API for AutoCAD.
You can refer to the documentation
For option 2 you can add SVG to the scene, take advantage markupcore extensions or integrate your custom markup

Saving PDF Calibration in Autodesk Forge Viewer

Does the Calibration measurements performed on the PDF file in Autodesk Forge Viewer can be saved along with the PDF, so that opening the PDF again can show the saved calibrations.
Thanks!
You can get the calibration factor with this function :
var calibrationFactor = viewer.getExtension("Autodesk.Measure").calibrationTool.getCalibrationFactor()
And then you can apply it using :
viewer.getExtension("Autodesk.Measure").calibrationTool.setCalibrationFactor(calibrationFactor)

How to know file size of translated SVF file in forge viewer

I have using for forge API services for Revit and Naviswork files display. In that how to check translated SVF file size.
Please provide the solution to check file size of translated SVF file.
Thanks.
As soon as you load a model of the Viewer, it will show the memory used (see console output). As the viewer loads files on demand, the total SVF size (on disk) should not affect your app.

Why Layer detection isn't possible in Autodesk forge Api for PDF files?

I want to import PDF file in Model derivative API and work with different layers. But it is not detecting layers in PDF models as it does in DWG files. Layer manager option is not visible. What to do?
In cases where the Model Derivative service isn't extracting enough information from your input files, you have a couple of options:
if your input file is a AutoCAD, Revit, Inventor, or 3ds Max file, consider extracting the additional information using the Design Automation service
if your input file is a PDF, consider:
viewing the PDF directly in the viewer (see this blog post for more details)
using a 3rd party library (e.g., pdf.js) to extract the additional info yourself

VIEW JPEG and PDF together in Forge 2D viewer

Is there any documentation for converting a JPEG file via Model Derivative API and viewing it as an underlay of another 2D PDF drawing, in Forge 2D Viewer?
JPEG files aren't supported accordingly to this page. PDF is supported and translating a PDF is not different from other file types. Here is a step by step documentation to do it.
Now back on JPEG, the Model Derivative API will not handle JPEG format, but you can still display JPEG in the Autodesk Forge Viewer using native THREE.JS API. All you need to do is to assign the JPEG to a THREE.JS mesh and add the mesh to the THREE.JS scene in the Viewer.