Forum

Author Topic: Model exported to PDF format doesn't open and shows only blank page  (Read 4540 times)

michaelguest

  • Newbie
  • *
  • Posts: 9
    • View Profile
Hello there! I wrote a python script to export the model but for some reason when I open it in PDF it is blank. Please note I am using Adobe Acrobat. I then tried to export manually and it shows up. How come when I export it through script the PDF is blank? I am using the same parameters. Also my model is 200,000 faces. I have attached my code at the bottom thanks!


Also I read this
already https://agisoft.freshdesk.com/support/solutions/articles/31000135268-model-exported-to-pdf-format-doesn-t-open-and-shows-only-blank-page

Someone else has a similar issue but it never got answered

https://www.agisoft.com/forum/index.php?topic=3004.0


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15650
    • View Profile
Re: Model exported to PDF format doesn't open and shows only blank page
« Reply #1 on: March 06, 2020, 04:41:18 PM »
Hello michaelguest,

Is the chunk where from the model is exported georeferenced?
Best regards,
Alexey Pasumansky,
Agisoft LLC

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15650
    • View Profile
Re: Model exported to PDF format doesn't open and shows only blank page
« Reply #2 on: March 06, 2020, 06:13:39 PM »
Hello michaelguest,

I suggest to use the following code sample which defines the viewpoint location and orientation required for the 3D PDF export:

Code: [Select]
chunk = Metashape.app.document.chunk
view = Metashape.Viewpoint()
view.coo = chunk.transform.matrix.mulp(chunk.region.center)
view.rot = chunk.transform.matrix.rotation() * chunk.region.rot
view.mag = chunk.transform.matrix.scale() * chunk.region.size.norm() / (5 * view.height)
chunk.exportModel(path ="D:/test.pdf", format = Metashape.ModelFormatPDF, viewpoint = view)
Best regards,
Alexey Pasumansky,
Agisoft LLC