FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
[WD19] How to save a pdf to a temp file.
[WD19] How to save a pdf to a temp file.
Débuté par Curtis, 27 mar. 2015 17:33 - 5 réponses
Connectez-vous…
Curtis
#1
Posté le 27 mars 2015 - 17:33
I have tried fSaveBuffer and fWrite to no avail.
sFile is string = "C:\ emp.pdf" nFileID is int = fOpen(sFile, foCreate) If nFileID <> -1 THEN // Can not figure out how to save an image fClose(nFileID) END
Signaler
0
0
Fabrice Harari
#2
Posté le 27 mars 2015 - 19:08
Hi Curtis
it would be easier if you could explain what you are trying to do... I do not understand what "saving a pdf to a temp file" means...
If you want to make a copy of the pdf file, use fcopyfile
If you want to extract each page of the pdf as an image, load it page by page in an image field (using the ..numpage property) and save the image with dsaveimgeJPG
if you want to do something else, tell us what it is
Best regards
Signaler
0
0
Curtis
#3
Posté le 27 mars 2015 - 20:24
More information: I scan a piece of paper and add it to an Image control with TwainToControl(). At this point I would like to save the image as a PDF to disk, but I do not want to use TwainToPDF() because users have the option to rotate the image and I do not want to do another scan.
The scanned images are being added to an analysis file as image memos. So alternatively, if there is a way to save an image in memory as an image memo that would be more effecient. I do not know if this is possible. As it stands I am saving the file to disk, writing to the analysis file, then deleting the file from disk.
Signaler
0
0
Fabrice Harari
#4
Posté le 28 mars 2015 - 14:10
Hi Curtis
iPrintImage is your friend... with a pdf as the target, of course
Best regards
Signaler
0
0
Curtis
#5
Posté le 30 mars 2015 - 15:40
As far as I can tell iPrintImage is only for printing to a printer?
Signaler
0
0
Fabrice Harari
#6
Posté le 31 mars 2015 - 02:50
Hi Curtis
without seeing all of your code and window, I can't be sure, but if the print result is blurry, it's probably because your jpg image is too small... And the size of the image is the size of the image control in which you are scanning...
So you should increase the size of your field (you can set it outside of your window if need be) in order to have a much better quality
Best regards
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte