Sql Server image file to PDF

  • Hi

    In my company doing university project. we are storing student answer script images in binary format in sqlserver database.suppose one answer script having 40 pages ,In my tables stored in 40 records(scanned copies).Like this we are storing 100000 answer scripts(i.e 100000*40).Now university requirement is combine all the 40 pages they want one single pdf file.like this they want all the answer scripts.How to achieve this requirements.I want background running the job all the pdf file to be download one folder.Please explain step by step.

  • what you are asking cannot be done in SQL.

    SQL does not have image processing, or export to pdf, so you'll need to create an application that does the work for you, which can store the results in SQL.

    you cannot just append the bytes of the images together the way you can with flat text files.

    so you need to use something like c# to do the following:

    because TIF image files support the concept of pages/frames, you want to create a blank TIF image.

    for each image related to a particular account, create a new frame int he tif, and put the converted image in the frame.

    once that is done, use a dll like pdfmetamorphposis or one of the dozens of pdf dlls you can find out there to convert the tif to pdf.

    save the pdf.

    then you need to save the image and related info back to sql, all as part of a loop of some sort.(for each datarow in datatable, i would assume)

    You could kind of do it in SQL if you created a suite of CLR functions that the above pieces, so then they can be called in SQL, but the work in a programming language still has to be accomplished.

    if your not programatically inclined, i think you might be able to do something like a mail merge in Word2010 , and save it as pdf.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply