Has anyone ever successfully set the parameters of a print file to automatically save a PDF using predefined setting and silently sending it to Bullzip?
I know it can be done but haven't figured out how to get there.
We currently have the following script that works with Amyuni but we need to have a little more control that Bullzip understands.
I've found this link on Bullzip's site on how to do it using asp.net but am not sure how to incorporate this logic in to A5.
Appreciate any advice!
I know it can be done but haven't figured out how to get there.
We currently have the following script that works with Amyuni but we need to have a little more control that Bullzip understands.
Code:
' delete PrintOptions DIM PrintOptions as P With PrintOptions .Concatenate = .f. .HasWatermark = .f. .MultilingualSupport = .f. .EmbedFonts = .t. .LinearizeForWeb = .f. .Colors2GrayScale = .f. .ConvertHyperlinks = .f. .WatermarkType = "Text" .WatermarkText = "D R A F T" .WatermarkFontName = "Times New Roman" .WatermarkFontSize = 172 .WatermarkRotation = 450 .WatermarkColorHex = "E8FED2" .WatermarkHorizPos = 120 .WatermarkVertPos = -120 .WatermarkOnTop = .f. .WatermarkPDF = "" .Encrypt = .f. .OwnerPassword = "" .UserPassword = "" .CanPrint = .t. .CanModifyDocument = .t. .CanCopy = .t. .CanAddNotes = .t. .Use128BitKey = .t. .JpegQuality = "No Compression" End with ' filter = "TRACKING_NUM = '" + Calc_track.value + "'" ' '***************************************************************************************** '* Save report "GPS Reports" for the currently selected record to a PDF '* (Example: R:\Document Scans 2011\GPS Reports\Smith John - 11-C01234GC - 123456 GPS.pdf) '* Overwrite file if exists and change upload status to false '***************************************************************************************** ' DIM vfilename as C record_number = current_record_number() query.filter = "TRACKING_NUM = '" + Calc_track.value + "'" query.order = "" ' vpath = "R:\Document Scans " + date_format(date(),"yyyy") + chr(92) + "GPS Reports" 'Confirm that file path exists or create if does not IF .not. dir_create_recurse(vpath) THEN ui_msg_box("ERROR","Path not valid",UI_STOP_SYMBOL+UI_OK) end END IF ' vfilename = vpath + chr(92) + alltrim(remspecial(d_last.value)) + " " + alltrim(remspecial(d_first.value)) + " - " + alltrim(remspecial(Case_No.value)) + " - " + alltrim(remspecial(summons_id.value)) + " GPS" ' 'Check for duplicate before processing vkey = alltrim(summons_id.value)+vfilename+".pdf" IF exist(vkey,"document_files","Dupchk") THEN 'Overwrite existing file Report.SaveAs("Gps_Save2","PDF",query.filter,query.order,vfilename,.F.,PrintOptions) ' xbasic_wait_for_idle() 'Change upload status to false DIM doctbl as P doctbl = table.open("document_files",FILE_RW_SHARED) doctbl.index_primary_put("Dupchk") doctbl.fetch_find(vkey) doctbl.change_begin() doctbl.dateStamp = date() doctbl.fileuploaded = .f. doctbl.change_end(.t.) doctbl.close() ELSE Report.SaveAs("Gps_Save2","PDF",query.filter,query.order,vfilename,.F.,PrintOptions) ' xbasic_wait_for_idle() ' 'Attach Document to record ' DIM doctbl as P doctbl = table.open("document_files",FILE_RW_SHARED) doctbl.enter_begin() doctbl.summons_id = alltrim(summons_id.value) doctbl.case_no = alltrim(Case_No.value) doctbl.defendant = alltrim(defendant.value) doctbl.filename = word(vfilename,-1,chr(92))+".pdf" doctbl.filepath = vfilename+".pdf" doctbl.filecat = "GPS Report" doctbl.dateStamp = date() doctbl.fileuploaded = .f. doctbl.enter_end(.t.) doctbl.close() END IF
Appreciate any advice!
Comment