![]() ![]() If you are looking for support for Foxit PDF SDK, please click here. Then the selected blocks will be joined together as one block. Click the Join command in the Format context tab, or right-click the selected blocks and select Join Text Boxes. This article refers to a deprecated product. The text blocks you selected will be numbered. Result = (PDFLibrary.PageHeight() * row) / BMP.Height() If (rgbValues(byteOffset + counter) 255) Then A 24bpp image will look red.įor counter As Integer = 0 To bmpData.Stride - 1 Tip: Foxit can work with non-PDF files, such as PowerPoint and Word, too. Tip: Hold down the CTL key to select multiple files within the same folder. Save the new PDF to the location of your choice. Copy(ptr, rgbValues, 0, bytes)ĭim byteOffset = (BMP.Height - 1) * bmpData.Stride Open Foxit Click File Click Create Click Combine Files Add the files you want to combine Click Combine The new, combined PDF will open in Foxit. ' Declare an array to hold the bytes of the bitmapĭim bytes As Integer = Math.Abs(bmpData.Stride) * BMP.Height Private Function MeasurePageContentHeight(PDFLibrary As DebenuPDFLibraryAX1113.PDFLibrary) As Doubleĭim bmpBytes() As Byte = PDFLibrary.RenderPageToVariant(96, PDFLibrary.SelectedPage, 0)ĭim bmpStream As New System.IO.MemoryStream(bmpBytes)ĭim rect As New Rectangle(0, 0, BMP.Width, BMP.Height)ĭim bmpData As = BMP.LockBits(rect, _ĭ, BMP.PixelFormat) ' Measures the height of the page content in the current measurement units QP.DrawCapturedPage(captureID(thisPageNumber - 1), 0, currentPosition, QP.PageWidth(), QP.PageHeight())ĬurrentPosition = currentPosition + pageHeight(thisPageNumber - 1) ![]() ' Draw the captured page (use the full height) ' Look up the page number in the pagesToDraw arrayĭim thisPageNumber As Integer = pagesToDraw(thisPageIndex - 1) ' removed from the document as they are capturedĭim pagesToDraw() As Integer = įor thisPageIndex As Integer = 1 To UBound(pagesToDraw) ' Capture page 1 each time because the pages are ' Capture all the pages (but not the new blank page) PageHeight(page - 1) = MeasurePageContentHeight(QP) ' Measure the height of all the pages (but not the new blank page) ' First create a new page at the end of the document If QP.LoadFromFile("C:\temp\mutli_page_content.pdf", "") = 1 Then Private Sub btnMergePageContent_Click(sender As Object, e As EventArgs) Handles btnMergePageContent.Clickĭim QP As New DebenuPDFLibraryAX1113.PDFLibrary NET which demonstrates how to determine the content position / height for a page (using pixel analysis) and then draw that content onto the one page in a way that does not overlay the content on other content. Here is some sample code written Visual Basic. This also allows you to add footers/headers and other template content. content from page 1, 5, 8 is required to be combined) you can combine this content into one page using The CapturePage and DrawCapturedPage functions. There’s various different ways this can be done, but one way is to have a template with different content on each page of a document and then based on certain criteria (i.e. Sometimes it’s necessary to customize the content of a document on the fly from templates. Merge content from multiple pages into one page ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |