PdfDocument class

Does the PdfDocument class here have the same abilities like the PdfDocument from Gembox.Pdf? I honestly am a bit unsure why i can’t just pass the “document” and have to save it because its not convertible between gembox.pdf and gembox.document. So i thought about replacing gembox.pdf completly if Document gives the same functionality :slight_smile: its absolutly possibel that i’m a bit underdeveloped and have overseen some things so a feedback would be apprechiated :smiley:

Kindly
K.

Hi,

GemBox.Document doesn’t have PdfDocument class, it has DocumentModel class.

The difference is that PdfDocument from GemBox.Pdf represents fixed document content:
https://www.gemboxsoftware.com/pdf/docs/document-structure.html
In other words, document elements are positioned on a specific page and on the specific coordinates of the page.

While GemBox.Document represents flowed document content (perhaps the easiest way to think of it is as HTML elements):
https://www.gemboxsoftware.com/document/docs/content-model.html

Regards,
Mario

Uhhh thank you very much that makes sense :smiley: yes sorry for my wrong wording thats a issue i fight with ;D

Now i wonder why i get the Unhandled exception. System.PlatformNotSupportedException: File extension ‘.pdf’ is supported only on WPF platforms (Windows OS). while running on windows :open_mouth: do i have to specify it somewhere or what could cause it? Could it be that my .net version is to high or my windows version ? (.net8 win11)

You’re loading a PDF file into DocumentModel using the default PDF reader, is that correct?

In that case, change the targeted framework in your CSPROJ file from “net8.0” to “net8.0-windows”:

<PropertyGroup>
  <OutputType>Exe</OutputType>
  <TargetFramework>net8.0-windows</TargetFramework>
</PropertyGroup>

Also, please read the “Support level for reading PDF format” section on the following help page:
https://www.gemboxsoftware.com/document/docs/supported-file-formats.html#support-level-for-reading-pdf-format

It has important information about which PDF reader you should use in which situation (for which task).

Regards,
Mario

thank you very much for the infos <3