TH-Soft wrote:
Hi!
You can draw pages from other PDF files like you draw images - draw them anywhere at any angle and any size.
You may have to do some calculations to maintain the aspect ratio.
See the Two Pages on One sample:
http://pdfsharp.net/wiki/TwoPagesOnOne-sample.ashxLines 40 and 54 draw PDF pages. Check the lines above for prerequisites.
Thanks for reply.
Now I'm stuck at Line 21
Code:
XPdfForm form = XPdfForm.FromFile(filename);
I got below error.
Code:
ArgumentException: The specified file has no valid PDF file header.
Parameter name: path
I already check the pdf, it not set as read-only files. Even I follow straight away, copy the file and remove Read-Only attr, but still got the error.
It should be okay to read the files.
Here below is my code:
Code:
var filename = "sample.pdf";
var file = Path.Combine(Directory.GetCurrentDirectory(), filename);
File.Copy(Path.Combine("../MyPDFSourceFolder/", filename), file, true);
File.SetAttributes(file, File.GetAttributes(file) & ~FileAttributes.ReadOnly);
var form = XPdfForm.FromFile(file);