Hello, i create a New PdfDocument from a existing Document.
Code:
Dim document As PdfDocument = IO.PdfReader.Open(docPath, IO.PdfDocumentOpenMode.Modify)
document.Info.Title = "Created with PlanMass"
Dim page As PdfPage = document.Pages(0)
Dim gfx As XGraphics = XGraphics.FromPdfPage(page)
'expScale = CDbl(gfx.PdfPage.Width) / Dts.Canvas.Bitmap.Width
'For Each fig In Dts.Figure
' Select Case fig.Type
' Case MeasureTypes.Line
' If fig.PlanMassRow.LayersRow Is Layer AndAlso Not fig.IsText Then pdfCreateLine(gfx, fig)
' Case MeasureTypes.Area
' If fig.PlanMassRow.LayersRow Is Layer AndAlso Not fig.IsText Then pdfCreateArea(gfx, fig)
' Case MeasureTypes.Quantity
' If fig.PlanMassRow.LayersRow Is Layer AndAlso Not fig.IsText Then pdfCreateQuantity(gfx, fig)
' End Select
' If fig.PlanMassRow.LayersRow Is Layer AndAlso fig.IsText Then pdfCreateText(gfx, fig)
'Next
' Save the document...
Dim filename As String = String.Concat(System.IO.Path.GetDirectoryName(docPath), "\", "Export_", Layer.Name, "_", System.IO.Path.GetFileName(docPath))
document.Save(filename)
But the new Document is smaller then the Original. ~ 50%
What can i do?
Thanks Christian