PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem in Print Offset

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Bug Reports - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
msathiaraj



Joined: 22 Jun 2007
Posts: 1

PostPosted: Fri Jun 22, 2007 10:54 am    Post subject: Problem in Print Offset Reply with quote

Hi,
I have created one Business Card (pdf format). Then i created a pdf file through codes which has multiple instance of the prepared car. The code which creates the final file is ..

Public Sub myCreatePrintVersionPDF(ByVal strFileName As String, _
ByVal Rows As Integer, _
ByVal Cols As Integer, _
ByVal Xmargin As Integer, _
ByVal Ymargin As Integer, _
ByVal CardWidth As Integer, _
ByVal CardHeight As Integer, _
ByVal HorizontalPitch As Integer, _
ByVal VerticalPitch As Integer, _
ByVal HorizontalSpace As Integer, _
ByVal VerticalSpace As Integer)

' Get fresh copy of the source PDF file
Dim SourceFile As String = strFileName
' Create the output document
Dim outputDocument As New PdfDocument()
Dim gfx As XGraphics
Dim form1 As XPdfForm = XPdfForm.FromFile(SourceFile)
Dim page1 As PdfPage = outputDocument.AddPage()


'Setting values for test instead of passing parameters
Xmargin = 10
Ymargin = 10
Rows = 4
Cols = 1
HorizontalSpace = 10
VerticalSpace = 10
CardWidth = form1.Width
CardHeight = form1.Height
HorizontalPitch = CardWidth + HorizontalSpace
VerticalPitch = CardHeight + VerticalSpace


'page1.Width = XUnit.FromMillimeter(Xmargin + HorizontalPitch * Cols)
'page1.Height = XUnit.FromMillimeter(Ymargin + VerticalPitch * Rows)

page1.Width = XUnit.FromPoint(Xmargin + HorizontalPitch * (Cols + 1) - HorizontalSpace + Xmargin)
page1.Height = XUnit.FromPoint(Ymargin + VerticalPitch * (Rows + 1) - VerticalSpace + Ymargin)

gfx = XGraphics.FromPdfPage(page1)
Dim Row, Col As Integer
For Row = 0 To Rows
For Col = 0 To Cols
'gfx.DrawImage(form1, New XRect(10, i * (form1.Height + 5) + 10, form1.Width, form1.Height))
gfx.DrawImage(form1, Xmargin + HorizontalPitch * Col, Ymargin + VerticalPitch * Row, form1.Width, form1.Height)
Next Col
Next Row
outputDocument.Save("C:\PrintVersionPDF.pdf")
gfx.Dispose()
outputDocument.Close()
outputDocument.Dispose()


End Sub


The Problem is the PDF file gets generated as expected but the left portion of the business card gets truncated. Is there any soulution for this.
_________________
FROM PDF
Back to top
View user's profile Send private message
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Mon Jun 25, 2007 8:10 am    Post subject: Reply with quote

Hi!
I'm not sure if I understand your problem.

If the PDF file looks correct, but something is missing from the print-out then this is a printer problem or printer feature.

Every printer has a non-printing area. Typically this is 7mm (approx. 0.25") for laser printers, but can be 3cm (more than 1") for the bottom margin on ink jet printers.
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Bug Reports - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com