Hello,
i' trying to import PDF pages and position them into a new PDF document and found some inconviniences:
1.
Example: I want to import 2 DINA4 portrait pages and position them side by side onto a new documents DINA3 page.
Is there a way import the DINA4 pagedata from an already loaded or created PDF document without using AddImportedPageData which loads it from a physical file ? (File = includes the DINA4 pages)
Dim DINA3Page
Dim DINA3Document
Set DINA3Document = CreateObject("DynamicPDF.Document")
Set DINA3Page = DINA3Document.Addpage()
Set MyPageData = DINA3Page.AddImportedPageData(File, 1, 0, 0)
I would like to do something like:
Dim DINA4Page
Dim DINA4Document
Set DINA4Document = CreateObject("DynamicPDF.Document")
DINA4Document.LoadPDF File
Dim DINA3Page
Dim DINA3Document
Set DINA3Document = CreateObject("DynamicPDF.Document")
Set DINA3Page = DINA3Document.Addpage()
' Defining a DINA3 landscape page
DINA3Page.DefaultPageHeight = 28.35*29.7
DINA3Page.DefaultPageWidth = 28.35*42
Set DINA4Page = DINA4Document.GetPage(1)
Set MyPageData = DINA3Page.AddImportedPageData(DINA4Page, 0, 0)
Is there a way to do somthing like that ?
2. It seems that the origin (0,0) of the coordinate system of the landscape DINA3Page is not in the top left corner.
When i import pagedata like
Set MyPageData = DINA3Page.AddImportedPageData(File, 1, 0, 0)
the AddImportedPageData method should position the imported page to origin of the DINA3 page but it is positioned to the middle of the DINA3 page. That's confusing me. Is the origin not in the top left corner of the DINA3 page ?
3. When i import pagedata into a new document like
Set MyPageData = DINA3Page.AddImportedPageData(File, 1, 0, 0)
MyPageData.width shows the width of the imported page.
MyPageData.height showsthe height of the imported page.
But MyPageData.angle does not represent the rotation angle of the imported page. Therefore i do not know if the source page which i want to import has a rotation value.
Is it possible to change that ?
Otherwise:
To get rotation value of the imported page i would have to load the page from file, then get the rotation value, then import the pagedata from file and set the MyPageData.angle.
Thanks, Olaf
Importing Pages
Re: Importing Pages
Support · Jul 17, 2009Hello,
Currently the COM product will take the file path to get the ImportedPageData. We may support other inputs in a future version but currently we do not have any immediate plans on this.
The ImportedPageData will be placed with respect to the center of the page and not with the left top corner. It takes the XOffset, and YOffset as parameters and not the X, Y position. You can refer to the PlacePDFs example downloaded with the product download which uses this ImportedPageData.
It is not possible to get the Angle of the page from the ImportedPageData.Angle. This can be used to set the angle to imported page data. In order to retrieve the angle you will have to load the PDF and get the angle.
Thanks,
ceTe Software Support Team.